Hi, I'm willing to use an Enum as source of a combo box, so I can handle the selection using something like this:
public enum MyEnum: byte { Normal , Diff }
public partial class Dialog : Window
{
public Dialog()
{
InitializeComponent();
}
private void OKButton_Click(object sender, RoutedEventArgs e)
{
MyEnum x = (MyEnum)myComboBox.SelectedItem;
switch ( x ){
case MyEnum .Normal : // do something
break;
case MyEnum .Diff : // do somethiing
break;
}
}
}
Thanks
public enum MyEnum: byte { Normal , Diff }
public partial class Dialog : Window
{
public Dialog()
{
InitializeComponent();
}
private void OKButton_Click(object sender, RoutedEventArgs e)
{
MyEnum x = (MyEnum)myComboBox.SelectedItem;
switch ( x ){
case MyEnum .Normal : // do something
break;
case MyEnum .Diff : // do somethiing
break;
}
}
}
Thanks