Reputation: 995
In my WPF project, I'm using a PropertyGrid (from WPF Extended Toolkit) to manage some properties. In particular, I have a list of objects to be managed. By default, PropertyGrid allows user to manage list with a CollectionEditor, in which user can do CRUD operations, but I need a custom editor that allows only to edit objects, without creation or deletion. The only samples found are those present here but they seems to explain only how to define a custom editor and change background of a field in grid.
How can I define a brand new custom editor for editing a list of objects?
Upvotes: 0
Views: 799
Reputation: 404
Did you try something like:
<xctk:PropertyGrid.EditorDefinitions>
<xctk:EditorTemplateDefinition TargetProperties="MyProperty">
<xctk:EditorTemplateDefinition.EditingTemplate>
<DataTemplate>
...
</DataTemplate>
</xctk:EditorTemplateDefinition.EditingTemplate>
</xctk:PropertyGrid.EditorDefinitions>
From there you can create your own control with a button that pop your editor.
Upvotes: 2