Wpf combobox selectedindex not updating

The code in the View Model first creates the List, and then creates a Collection View based on that list.

This allows us to set the Current Item from the View Model as well as get notified whenever the Current Item changes.

wpf combobox selectedindex not updating-23wpf combobox selectedindex not updating-54

Wpf combobox selectedindex not updating

To answer your question: from my point of view your suggestion is almost an imperative if one applies the MVVM pattern on comboboxes. Michael Schlegel Hi Mark, Great posts, I read your post about MVVM List Box filtering, what i´m looking for is something in between.

If i for instance have an application with a number of Combo boxes bound with a Collection View and i want the selected item in one of them to affect a filter in another Combo Box. I´ve added a filter by just using my Collection View.

Hmmm I never knew that you could ctrl-click on the combobox to reset that value to -1.

I knew about the pmrpot, but wow learn something new every day Sounds like that might be a nice custom control though.

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

Could you check with the above sample and let us know whether we have followed the same steps to reproduce the reported behavior?

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.

I found that there does not seem to be one “official” way of doing this.

Tags: , ,