Wpf combobox selectedindex not updating

So you can still use the original XAML: Thanks for the good example in displaying the Enum.

I had a little play and converted my code to be Enum agnostic:public class Enum To String Converter : IValue Converter One of the things I noticed was that you use the 'Converter Parameter' to pass in the type, but you don't need to as the 'target Type' argument is the type.

You have to add the converters in you resources section and then specify them in two places.

I’m not sure yet whether using Collection View is a better approach than the alternatives I have seen which bind the Selected Value or Selected Item property.

Deselectable Combo Box onclick if ( selected Item == current Target ), either throw a ctrl-click or just set selected Index = -1.

I was recently creating a simple WPF application and was trying to use the MVVM pattern.

In this pattern, all the controls on your form are data bound to properties on your “View Model” class.

While there are lots of examples of how to do this with Text boxes, List boxes, and even master-detail views, it seems that examples for binding Combo boxes are a little thin on the ground.

Search for wpf combobox selectedindex not updating:

wpf combobox selectedindex not updating-83wpf combobox selectedindex not updating-23

A new collection has been displayed making the selected item from the previous collection irrelevant. How can we keep the currently selected item selected when changing Items Source’s value?

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “wpf combobox selectedindex not updating”