0

Problem: I'm building a UI for a project. I have an enum built in another namespace and I want to display it as the options for a combobox. I've been reading online and have been getting very lost between questions that are almost a decade old and spots where the language they're using is unclear.

Code
Enum C#

namespace Foo.Bar
public class ExampleEnumClass
{
   public enum ExampleEnum
   {
      Fee,
      Fi,
      Fo,
      Fum,
   }
}

UI .XAML

<Grid>
    <ComboBox Name="comboBox" IsReadOnly="True" IsEditable="True" Height="23" Width="100" HorizontalContentAlignment="Center" HorizontalAlignment="Right" VerticalAlignment="Center" />
</Grid>
Xavier Guay
  • 103
  • 2
  • 6
  • 1
    If something is unclear about an answer, comment on it, don't pose duplicate questions. – H.B. Aug 10 '16 at 17:15
  • See possible duplicate here: http://stackoverflow.com/questions/6145888/how-to-bind-an-enum-to-a-combobox-control-in-wpf – bgura Aug 10 '16 at 17:15
  • And another: http://stackoverflow.com/questions/878356/wpf-combobox-binding-to-enum-what-did-i-do-wrong?noredirect=1&lq=1 – H.B. Aug 10 '16 at 17:18

0 Answers0