For an application I'm working on, I want the property grid to display a nullable enum as a ComboBox and allow me to alter its style so I can provide some customizations.
For a regular enumeration, I do the following:However, the style I'm setting with the Enum property type seems to be ignored for my nullable enum. I assume that the PropertyType would need to be Nullable or something similar, although I only want the ComboBox for nullable enums, not all Nullables. What's the best way to apply a style customization in this case? Would I be better off skipping the ComboBoxPropertyEditor altogether and just using a PropertyEditor?
Thanks very much,
-Craig
[Modified at 05/04/2010 02:25 AM]
For a regular enumeration, I do the following:
<appropgrid:ComboBoxPropertyEditor
PropertyType="{x:Type System:Enum}"
>
<appropgrid:ComboBoxPropertyEditor.ValueStyles>
<appropgrid:PropertyEditorStyle
Key="{x:Type ComboBox}"
Style="{StaticResource validationEnumStyle}"
/>
</appropgrid:ComboBoxPropertyEditor.ValueStyles>
</appropgrid:ComboBoxPropertyEditor>
Thanks very much,
-Craig
[Modified at 05/04/2010 02:25 AM]