Dec 16, 2009 at 3:54 PM
Edited Dec 16, 2009 at 3:55 PM
First of all, great job with the Property Grid! It's a really handy utility.
I've ran into an issue however. If multiple Propertygrids are instantiated naming conflicts occur easily when binding to objects with properties having the same name bacause of the way labels are named. In ValueEditorBase.cs, line 20 the code is:
this.Label.Name = "lbl" + property.Name;
If the control name itself was added in this name, there would be no naming conflicts. However the resolving this issue isn't as simple as that as the issue runs through the system.
It would be great if at some point the following scenario would be supported:
PropertyGrid PropertyGrid2; // These are declared in XAML
Label label1 = new Label();
Label label2 = new Label();
PropertyGrid1.SelectedObject = label1;
PropertyGrid2.SelectedObject = label2;
Please let me know if you know a workaround to achieve this with the current code base or if you're planning to add future support for this.