Radcombobox text not updating

Rated 3.95/5 based on 790 customer reviews

With this fix in place, my MVVM Combo Box remains synchronized with its view model.In most cases, MVVM model binding dramatically simplifies your WPF code. James Kovacs is a Technical Evangelist for Jet Brains.For those of you who want to play around with the code, you can find it here. The code sample now includes his behaviour code in addition to the subclassing option. He is the creator of psake, a Power Shell-based build automation tool, intended to save developers from XML Hell.

Fortunately in many cases you can work around these limitations by simply deriving your own custom control from the one supplied with WPF to fix these problems. Perry in this comment, WPF behaviours can also be used to inject code without subclassing Combo Box. The Combo Box (regulard, subclassed, or behavioured) becomes unsynchronized from the view model. He blogs on Code as well as his own blog, is a technical contributor for Pluralsight, writes articles for MSDN Magazine and Co De Magazine, and is a frequent speaker at conferences and user groups.

Minor note: I am defining a derived Combo Box in my own namespace, which is also called Combo Box.

I do this so that in my XAML, I can apply the fix by prepending .

The first Combo Box is now unsynchronized with the view model.

If you change the selection again, both Combo Boxes have the correct value.

Leave a Reply