WPF Series -13- Advanced Installer

The last post in this series deals with the packaging of a WPF application. To simplify the installation of our WPF application we decided to package the application as MSI (Microsoft Installer) using Advanced Installer. In the following I show you the most important steps in using Advanced Installer. Prerequisites Download Advanced Installer Install Visual […]

WPF Series -12- Global Exception Logging

During development and debugging of our WPF application some exceptions occurred which were not caught by the code. Such unhandled exceptions are not logged automatically. In order to obtain information about any unhandled exceptions in production and to simplify error analysis, we looked for a way to handle and log unhandled exceptions. After some research […]

WPF Series -11- Custom MetroDialog

After a long break it’s finally time to continue with the WPF series. Today I’ll show you how we implemented a custom metro dialog. Our dialog contains 2 comboboxes and gets displayed during data export to determine the accuracy of the data to be exported. Let’s have a look at the code. AccuracySelectionDialog.xaml First we […]

[NoBrainer] Simplifying Sparx Enterprise Architect Development with C# Interactive (CSI)

CSharpInteractiveConsole

Developing an AddIn for Sparx Enterprise Architect is tedious, even with the existence of support such as the great work of Geert Bellekens. However, since Visual Studio 2015 we can use the C# Interactive Console which allows us to fire up an instance of Enterprise Architect and test our code interactively before putting it into […]

WPF Series -10- InkCanvas with initial StrokeCollection

One of the requirements our WPF project had to meet describes the ability to create a sketch of the sewage shaft for which data is collected. The functional acceptance criteria are the following. There has to be an area on the form to create a sketch of the sewage shaft using Surface Pen, touchscreen or […]

WPF Series -9- CustomListBox

When we used ListBox controls in our WPF project we faced the same problem as described in the previous post. Like DataGrid, ListBox control also has a property called SelectedItems, which isn’t a dependency property and therefore not bindable too. This post shows how ListBox control can be extended with a bindable version of the […]

WPF Series -8- CustomDataGrid

According to MVVM pattern the ViewModel interacts with the Model but doesn’t know anything about its View. As a result dependency properties of controls get bound to ViewModel properties by specifying bindings in the corresponding View (XAML). DataGrid control has a property called SelectedItems, which in multi selection mode holds the items that are selected. […]

WPF Series -7- ViewModel Validation using DataAnnotations

As we often use Data Annotations for basic validation purposes in context of C#/.NET applications (i.e. required, max length, …), we searched for a solution that allows using Data Annotations in WPF ViewModels for client side validation. Fortunately we found such a solution, which I would like to describe in this blog post. Implement IDataErrorInfo […]

[HOWTO] React to Unhandled Exceptions in UWP

While developing an UWP application I wanted to log unhandled exceptions. My coach mentioned that in WPF you can register a exception handler to handle unhandled exceptions globally. In UWP it works exactly the same way. Add Unhandled Exception Handler NOTE: This solution does not prevent your app from crashing and exiting. This solution only […]

WPF Series -6- Globalization of Enums

In the previous blog post of this series I wrote about binding ComboBox or ListBox to an enum. Using just the approach described there exposes the enum values directly in the corresponding ComboBox or ListBox. Because the enum values do not always have descriptive names or because they are language specific, it’s usually more appropriate […]