Using EnumPropertyEditor

Editors for WPF Forum

Posted 9 years ago by Chris Carter
Version: 14.2.0611
Avatar

I'm not sure whether this is a question about property grids or editors, but I'll go by the organization of the samples.

I added this to my UserControl.Resources, and I don't see my PropertyGridItem changing:

<propgrid:PropertyEditorsModifier x:Key="{x:Static propgrid:BuiltinEditors.PropertyEditorsModifierKey}">
	<propgrid:PropertyEditorsModifierActionAdd>
		<propgrideditors:EnumPropertyEditor UseDescriptionAttributes="True" />
	</propgrid:PropertyEditorsModifierActionAdd>
</propgrid:PropertyEditorsModifier>

I also tried adding this to my PropertyGrid, with a similar lack of effect:

<propgrid:PropertyGrid.PropertyEditors>
	<propgrideditors:EnumPropertyEditor UseDescriptionAttributes="True" />
</propgrid:PropertyGrid.PropertyEditors>

What am I missing?

Comments (3)

Posted 9 years ago by Chris Carter
Avatar

I forgot to note: I do have DescriptionAttribute applied to my enums.

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

It should be working if you have an Enum based property and a description attribute on each value.  For instance, I went into our Editors' PropertyGridIntegrationInterop demo and added UseDescriptionAttributes="True" to the EnumPropertyEditor there and I saw the description attribute values show up.


Actipro Software Support

Posted 9 years ago by Chris Carter
Avatar

Thanks for the help, but I ended up going a different route. Maybe I can come back to this system later.

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.