To bind ComboBoxEdit to an enum, use the EnumItemsSource markup extention in the following manner:
[XAML]<dxe:ComboBoxEditItemsSource="{dxe:EnumItemsSource EnumType=local:MyEnum}"/>
For version 13.1 and earlier:
All logic is encapsulated in the BaseComboBoxStyleSettings descendant which is defined in the MyComboBoxStyleSettings.cs(vb) file. The representation of items in the popup window depends on the enumeration items kind. E.g., if enumeration items have description attributes they will display the description text instead of item names. If the enumeration definition is decorated with the FlagsAttribute attribute, items will be represented as check editors with the TextBlock element used as description.
Question Comments
Added By: Marcin Sulecki at: 11/13/2014 5:33:39 AM
I has just Description attribute to MyEnum but ComboBoxEdit displays item names instead description. I use version 14.1
public enum MyEnum
{
[Description("Eating")]
Eat,
[Description("Sleeping")]
Sleep,
[Description("Coding")]
Code
}
I count on your help.
Added By: Ilya (DevExpress Support) at: 11/13/2014 6:52:34 AMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T173028: How to display description of an enum item when EnumItemsSource is used in ComboBoxEdit. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.