As an example take the following code:
public enum ExampleEnum { FooBar, BarFoo }
public class ExampleClass : INotifyPropertyChanged
{
private ExampleEn
In the viewmodel you can have:
public MyEnumType SelectedMyEnumType
{
get { return _selectedMyEnumType; }
set {
_selectedMyEnumType = value;
OnPropertyChanged("SelectedMyEnumType");
}
}
public IEnumerable MyEnumTypeValues
{
get
{
return Enum.GetValues(typeof(MyEnumType))
.Cast();
}
}
In XAML the ItemSource binds to MyEnumTypeValues and SelectedItem binds to SelectedMyEnumType.