[WPF] Convert binding errors into exceptions

If you've done a bit of XAML in your life, you may have seen that the WPF engine has a big tendency to swallow errors that happens in the bindings. Ignored binding errors To illustrate the issue, let's start with a simple example: <Label Content="{Binding UserName}" /> This…

READ MORE

[WPF] Fix blurry images

This is a very annoying design flaw in WPF: by default, when you include a bitmap image in a view, it appears blurry. Here I'll describe why it behaves like this, and then give a solution. Showing the problem I created a sample Bitmap file with vertical and horizontal lines.…

READ MORE

[WPF/MVVM] How to deal with fast changing properties

In this article, I will describe a problem which happens in a WPF/MVVM application when the Model is updated at a very high frequency. It happened to me while implementing a Model handling a lot of values coming from instruments and I wanted to display the current values, even…

READ MORE

[WPF] Attached Properties as an alternative to code behind

It's crazy the things you can do by writing a few lines of code behind. WPF controls expose so many events that you can really change the behavior of a control without deriving it. The problem with code behind is that it's OK to write a small event handler in…

READ MORE