Custom PropertyGrid template

Feb 18, 2013 at 8:21 AM
There is a need to implement custom propertygrid that will have 3 columns instead of two : number, property name, property value. It will be used strictly with turned off categories. First column will be either completely autogenerated or bound to some property. What is the simplest way to achieve that?
Feb 19, 2013 at 9:26 AM
Dug deeper into project source code, played with Generic.xaml. My custom layout is implemented by editing PropertyItem template at "PART_Name"/"PART_Editor" level, but binding of new column's content requires either implementing IPropertyInfoDefinition on my PropertyDescriptor or making some changes in PropertyGrid update procedure. First approach requires referencing Xceed.Wpf.Toolkit to my Model project, second needs more research. This issue may be closed.
Feb 19, 2013 at 8:05 PM
Feb 21, 2013 at 6:54 AM
Interesting approach, thanks, will save it in bookmarks. As for me - solved properties numbering and custom sorting via making changes to helpers that create descriptors (added needed indexes before DisplayName). So instead of three columns for number, name and value i still have two with name and value, where name is simple "#. + DisplayName" string concatenation. Not an elegant solution, but properties i'm editing are "fake" and generated at runtime at first place, so i guess it's enough to solve the problem.