I'm using the PropertyGrid with a good deal of success. However, I'd like to change the behavior of the CollectionControl. Instead of having a new dialog appear for collections, I'd like to embed the CollectionControl directly into my PropertyGrid.
Suppose I have:
I tried to do this with an Editing Template:
Any suggestions? Is this even possible/recommended?
Thanks!
Suppose I have:
public class AddressBook
{
public string Owner { get; set; }
public bool IsUpToDate { get; set; }
public List<People> People { get; set; }
}
public class People
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
When I select the property People from AddressBook, rather than have a separate dialog show up, I'd like the CollectionControl template to appear inline with Owner and IsUpToDate.I tried to do this with an Editing Template:
<xctk:PropertyGrid.EditorDefinitions>
<xctk:EditorTemplateDefinition TargetProperties="People">
<xctk:EditorTemplateDefinition.EditingTemplate>
<DataTemplate>
<xctk:CollectionControl ItemsSource="{Binding Value}" />
</DataTemplate>
</xctk:EditorTemplateDefinition.EditingTemplate>
</xctk:EditorTemplateDefinition>
</xctk:PropertyGrid.EditorDefinitions>
This LOOKED the way I wanted it to, but I noticed that any changes I made to People (adding people, removing people, changing the properties of a People object) were not saved back to my source.Any suggestions? Is this even possible/recommended?
Thanks!