I've got the enum like so.
enum Beep {A, B, C }
Now, I wish to populate my combo box with these values as follows (the idea is to follow other's example).
<ComboBox x:Name="comboBox1"
...
ItemsSource="Binding Source={StaticResource Beep}" />
However, the binding gets a little bit too static and gives me literally the exact string I'm putting in. What did I do wrong and how do I resolve it?
I've also tried following the hint I got to add something like this. To no avail, though.
public List<Beep> Beepies
{
get
{
return new List<Beep>{ Beep.A }
}
}
What more can be done about it? I can get the values into the box if I bind in the code behind by the below. But that's not the point - I wish to XAMLize the approach.
comboBox1.ItemsSource = Enum.GetValues(typeof(Beep));