I have an enum in the form of:
public enum BlueOrRed { None, Blue, Red}
Currently I am binding that to a ComboBox in Code because the binding is dependent on a selection in another ComboBox:
if (OtherComboBox.SelectedItem == Color.BlueOrRed)
{
ThisComboBOx.ItemsSource = Enum.GetValues(typeof(BlueOrRed));
}
else ...
I need the option, that BlueOrRed could also be None in the code behind. But I don't want to display that option in the ComboBox.
I am aware of a similar Question, but that answer unfortunately doesn't really aplly to my problem.