Wpf combobox binding selecteditem not updating
One consideration is that Silverlight doesn’t seem to support Collection View at the moment.
Introduction Most binding in WPF is pretty straightforward (such as binding a Text Block to a string), but binding to a more complex data structure is not as intuitive.
But we'll also want a property called Selected State to bind to the selected value, so we can capture the state abbreviation selected by the user.
Now we're ready to bind to the view model to the actual Combo Box in our XAML mark up.
The combobox has several properties that make it easier to bind to the dictionary for display and selection purposes.
The approach I went with uses a Collection View which is a class included with .
NET that encapsulates a list and the concept of a current item as well as supporting the INotify Property Changed interface. I set the Is Sychronized With Current Item to true to allow us to track the current item on the Items Source.
The XAML The first thing we need to do in our User Control is to instantiate the view model.
We can do this directly in the Resources of the page.
The Selected Value Path let's us choose what property of our Key Value Pair we will actually return when the user makes a selection.