When using EnumEditBox with UseDisplayAttributes="True", the box initially show as empty - that is, no value is initially displayed. The popup list shows correctly but there's no way to tell what the current value is without actually setting it via the popup.
The value being bound to the edit box is a string (the enum value name).
Other than the initially displayed value being empty, the control works as expected.
With the UseDisplayAttributes set to false, the initially displayed value is correct (just kinda ugly).
Suggestions?
XAML:
<DataTemplate x:Key="EUEnumEditBox">
<editors:EnumEditBox Value="{Binding Value,Mode=TwoWay}"
EnumType="{Binding EnumType}"
IsNullAllowed="False"
UseDisplayAttributes="True" />
</DataTemplate>
Example Enumeration:
public enum SmoothingFilterType
{
[Display( Name = "Canny" )]
canny,
[Display( Name = "Deriche 1" )]
deriche1,
[Display( Name = "Deriche 2" )]
deriche2,
[Display( Name = "Lanser 1" )]
lanser1,
[Display( Name = "Lanser 2" )]
lanser2,
[Display( Name = "Shen" )]
shen,
[Display( Name = "MShen" )]
mshen,
[Display( Name = "Sobel" )]
sobel,
[Display( Name = "Sobel Fast" )]
sobel_fast
}