Wpf contentcontrol binding not updating


Setup the main dialog When I need quick prototypes, I often don’t use Blend and type the XAML directly into Visual Studio editor.

That was the very first part I did to write this XAML: .

wpf contentcontrol binding not updating-42

Another solution is to use the Content as in the first example, but add an explicit Data Context property to it before using any binding, something like this: In this case, though, you specify the Data Context as an ugly binding and, worst of all, you cannot set it via the Content Control, but you need to access the actual content.

Perhaps another solution, one that would involve a custom Data Template Selector on the Content Control would work, but right now I have no perfectly satisfactory solution.

I’m still playing with MVVM at work and I got a new occasion to setup a dialog using the MVVM methodology.

I really love the process of creating User Interface using MVVM, the process is so much natural !

Basically, I needed to create a “setup” dialog in the application I’m currently working on.