DispatcherUnhandledException catches children window Exception before try catch (ShowDialog)

Problem Application.DispatcherUnhandledException is a solution provided by the .NET Framework to manage any Unmanaged Exception bubbling up to the root of your application (App.AppStartup). Whilst using this solution I faced a problem when opening new windows from the Dispatcher of the UI Thread. When performing a try/catch around a Window.ShowDialog(), the DispatcherUnhandledException will be invoked…

0

Insert a WebBrowser in a Word Document! Or how to insert a WPF/ Winform Custom UserControl in a Word Document

 This post provides an example on how to insert custom control inside a Word Document using VSTO. You might for example insert controls as button or a whole user interface inside your document. These controls might either be Winform or WPF control. VSTO allows developers to insert Winform controls inside their document. Create the project…

0

WPF - Select canvas UIElement

This post goal is to demonstrate how to deal with canvas drawing and selection of items in the canvas. ! This post will be updated for further information. In the MainWindow.xaml just create a Canvas and a CheckBox. <Window x:Class=”TestCanvas.MainWindow” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” Title=”MainWindow” Height=”350″ Width=”525″> <Grid> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition Height=”6*”></RowDefinition> </Grid.RowDefinitions> <CheckBox Content=”Enable drawing” IsChecked=”True”…

0