C wpf binding not updating

Rated 4.66/5 based on 887 customer reviews

Yesterday I was working on a small prototype, which I will be blogging about shortly, and ran across the common problem of my bindings not updating.

A very common problem, and one that’s usually a very simple fix once you’ve tracked it down.

This behavior is controlled by a property on the binding called Update Source Trigger.

It defaults to the value "Default", which basically means that the source is updated based on the property that you bind to.

However, when the application loads, it doesn't update, for some reason.

I threw in a few breakpoints and I could see my View Model was changing, I could see the On Property Changed method being hit, but there didn’t seem to be any listeners and as a result my UI was just ignoring the changes.

After a few minutes of head scratching I noticed that although my class was firing the Property Changed event correctly, I hadn’t added INotify Property Changed to my class declaration when I removed the base class!

Here's an example: The first place you will want to look is the Visual Studio Output window.

It should be at the bottom of your Visual Studio window, or you can activate it by using the [Ctrl Alt O] shortcut.

Leave a Reply