Hi!
In our propertygrid, I'm currently utilizing the default behavior of displaying an enumeration as a combobox in our default style. But, when I add an editortemplatedefinition, such as this:
<xctk:EditorTemplateDefinition >
Or, perhaps, you can answer my real question: I would like to have our combobox display enum strings that come from our resource file so that they can be translatable. I was looking to use a typeconverter, like this: http://stackoverflow.com/questions/796607/how-do-i-have-an-enum-bound-combobox-with-custom-string-formatting-for-enum-valu . Do you have any examples of the best way to do this?
Thanks!
In our propertygrid, I'm currently utilizing the default behavior of displaying an enumeration as a combobox in our default style. But, when I add an editortemplatedefinition, such as this:
<xctk:EditorTemplateDefinition >
<xctk:EditorTemplateDefinition.TargetProperties>
<xctk:TargetPropertyType Type="{x:Type sys:Enum}" />
</xctk:EditorTemplateDefinition.TargetProperties>
<xctk:EditorTemplateDefinition.EditingTemplate>
<DataTemplate>
<ComboBox>
<ComboBox.ItemTemplate>
<DataTemplate>
<ComboBox ItemsSource="{Binding Value}" IsEditable="True"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</DataTemplate>
</xctk:EditorTemplateDefinition.EditingTemplate>
</xctk:EditorTemplateDefinition>
A lot of things don't seem to work. Can you provide the default template you are using (for an enumeration) if a custom editor template definition isn't supplied?Or, perhaps, you can answer my real question: I would like to have our combobox display enum strings that come from our resource file so that they can be translatable. I was looking to use a typeconverter, like this: http://stackoverflow.com/questions/796607/how-do-i-have-an-enum-bound-combobox-with-custom-string-formatting-for-enum-valu . Do you have any examples of the best way to do this?
Thanks!
-Glenn