Hi all,
I'm trying to create a custom property editor and apply it to a property via the "Editor" attribute. I've created a class CustomEditor.cs that extends the base PropertyEditor and have tried to associate it to a DataTemplate in a resource directory thus:On my property I add the attribute:
However when I select the object for the PropertyGrid the CustomEditor class is called but the custom DataTemplate is not used and the PropertyGrid simply uses a default editor for the correct property type.
Any ideas where I'm going wrong, is this just me not using WPF correctly or am I trying to associate the CustomEditor to the wrong type of template in the resources? Are there any examples of trying to wire in custom editors in this manner?
Thanks
Rick
I'm trying to create a custom property editor and apply it to a property via the "Editor" attribute. I've created a class CustomEditor.cs that extends the base PropertyEditor and have tried to associate it to a DataTemplate in a resource directory thus:
<DataTemplate DataType="{x:Type pe:CustomEditor}">
...
</DataTemplate>
[Editor(typeof(CustomEditor), typeof(PropertyEditor))]
Any ideas where I'm going wrong, is this just me not using WPF correctly or am I trying to associate the CustomEditor to the wrong type of template in the resources? Are there any examples of trying to wire in custom editors in this manner?
Thanks
Rick