Blog

Race condition when using a Binding on a DoubleAnimation inside of a Storyboard

Nice example of a race condition on MSDN Forums, because the Binding is running on a different thread and won’t update in time. Let’s look at the problem: Continue reading “Race condition when using a Binding on a DoubleAnimation inside of a Storyboard”

UWP: The Master-Detail-Problem with the events SelectionChanged & LostFocus and How to Fix it

While creating apps with the Universal Windows Platform (UWP) I noticed a weird behavior, but I’m not sure if it’s a bug. Let’s just call it the “Master-Detail-Problem”.

To explain it, I stripped  down my code to the XAML-snippet below. No code-behind needed. Continue reading “UWP: The Master-Detail-Problem with the events SelectionChanged & LostFocus and How to Fix it”

Developer Week 2016 – it was great

Last week I was at the developer week conference in Germany / Nürnberg. It was a great conference with fantastic people and great sessions.

I gave two talks:

  • S.O.L.I.D.-principles for C# Developers
  • Test Driven Development and MVVM: How to write testable ViewModels

Continue reading “Developer Week 2016 – it was great”

Calling the Azure Event Hub REST-API – from UWP, WPF and any other .NET (Core) Client

To push events into Azure Event Hub you can use the Nuget-package WindowsAzure.ServiceBus (https://www.nuget.org/packages/WindowsAzure.ServiceBus/). That package works pretty straight forward, but there’s one problem:

Continue reading “Calling the Azure Event Hub REST-API – from UWP, WPF and any other .NET (Core) Client”

Render just the first line of a TextBlock

Sometimes you want a TextBlock to just display one line. For example if you have a huge virtualized ListView that contains many data items and in the DataTemplate you’re using a TextBlock. When the TextBlock has different height, the virtualization leads to some not so nice behavior when scrolling: Continue reading “Render just the first line of a TextBlock”

Creating a background application with WPF

Sometimes you need to have an application running in the background. Then you don’t want your MainWindow to be visible all the time. Instead you just want to have an icon in the notification area that allows the user to open up the MainWindow and to exit the application. In WPF you can do this easily with the help of Windows Forms’ NotifyIcon-class.

Continue reading “Creating a background application with WPF”

Solved: Lenovo, the Clickpad/Ultranav and the missing hardware-buttons (W540 / T540 / W541)

In several models like W540/T540 etc. Lenovo has replaced the hardware-buttons for the Trackpoint with a big Touchpad. It looks like this:

Continue reading “Solved: Lenovo, the Clickpad/Ultranav and the missing hardware-buttons (W540 / T540 / W541)”