Using the ComboBox SelectedItem property in WPF / MVVM
An implementation of using the WPF Combo Box using MVVM patterns. The intention is to get a ComboBox control's SelectedItem property to bind to an instance of a selected object, so that when the SelectedItem is changed, all other entities that are bound to it are also updated. See this StackOverflow discussion for background information: http://stackoverflow.com/questions/11062297/wpf-mvvm-combobox-selecteditem Step 1: Create a new WPF project: Step 2: Create your classes In my example I use a 'Languages' class that holds a language value, such as "English" and another string to identify it, such as "en": Languages.cs [code language="csharp"] using System.ComponentModel; using System.Runtime.CompilerServices; using WpfComboBox.Annotations; namespace WpfComboBox { public class Language : INotifyPropertyChanged { private string _languageValue; private string _languageId; public string Lan...