WPF Series -5- Binding ComboBox or ListBox to Enum

In our WPF application we wanted to bind ComboBox and ListBox controls to enums. The WPF way to set up such a binding is described here. This solution works absolutely fine but it requires the definition of an ObjectDataProvider for every enum. This in turn leads to lower maintainability and the code is not reusable. […]

WPF Series -4- MahApps.Metro and MahApps.Metro.Resources

To have a modern look and feel we decided to align our WPF application to Microsoft Metro style. To achieve this, we used the open source toolkit MahApps.Metro. MahApps.Metro is a toolkit for creating Metro / Modern UI styled WPF applications. The MahApps.Metro project was started back in 2011 by Paul Jenkins. The source is […]

WPF Series -3- MVVM Pattern

As mentioned in the previous post of this series the WPF application we implemented follows the MVVM pattern. MVVM stands for Model-View-ViewModel. The MVVM patterns intent is to provide a clean separation of concerns between UI and the business logic. It can be used on all XAML platforms. About MVVM Pattern Microsoft describes the motivation […]

WPF Series -2- WPF Application Design

Beside the vision and the requirements you also have to have an idea how the WPF application should look like in the end. For that purpose we created a few mock ups during first exchange with the customer in the early stages of the project. In the same stage we also created a process diagram […]

WPF Series -1- Project Setup

Before starting development we first had to set up a new WPF project. The projects target framework is .NET Framework 4.6.2 and we used Microsoft Visual Studio Community 2015 as IDE. In this post I’ll quickly go through the necessary steps for setting up a WPF project at d-fens. Source Code Repository Creation For version […]

WPF Series – Introduction

In the first half of 2017 we implemented a WPF project for one of our customers. The aim of the project was to develop a Surface Pro compatible desktop application for data collection in context of civil engineering. The application allows the user to create, save, edit and export protocols of specific buildings. Furthermore it’s […]

[HOWTO] Control the GPIO Interface of a Raspberry Pi 3 using UWP

In a project of ours I stumbled across the topic on how to control the GPIO interface of a Raspberry Pi 3 using the Windows.Devices.Gpio namespace. The mentioned namespace contains a class called GpioController. This class enables you to establish connection to any pin on the Raspberry Pi. You have to use the static method […]

Install Log4Net on UWP Application

As I was working on a project, I had to check if we can use Log4Net for an UWP Application which will run on a Windows 10 IoT device. For setting up the UWP Application, I used Visual Studio 2015 Community Edition. In the new project dialog I chose Blank App (Universal Windows) and used […]

Fix Null Reference Exception in XAML Designer

During developing a user control for a WPF UI I encountered a strange null reference exception in the XAML designer. Strange thing was, that when I started the application and switched to the control which contained the user control, everything worked fine. I could’ve just ignored this problem. However since it is very inconvenient writing […]

Manual JWT Validation against Azure Active Directory

For our current WebApi project we decided to implement OAuth2 authentication with Azure Active Directory. As our API needs to support other authentication mechanisms like Basic and Negotiate beside OAuth2 we implemented multiple authentication filters that, where each filter is responsible for a specific authentication mechanism. One of these authentication filters, the BearerAuthenticationFilter, is responsible […]