By default, diagram’s property container which displays all properties of the diagram’s nodes while assigning the diagram into the PropertyEditor’s “Diagram”. If you want to display custom property of the node, please create the PropertyGrid instead of PropertyEditor and use the PropertyGrid’s “Selectedobject” property to display the custom property of the node.
Please refer to the attached code example and sample. |
Code example:
[C#]
Node node = evtArgs.Element as Node; if (node.PropertyBag.Keys.Count == 0) { node.PropertyBag.Add("Name", node.Name); } if (node.PropertyBag.Keys.Count > 0) { CommonProperties properties = new CommonProperties(); properties.Name = node.PropertyBag["Name"].ToString(); propertyGrid1.SelectedObject = properties; }
Sample:
|
However we have created another sample for displaying only the custom properties (which is defined in customized class) in PropertyEditor. Please create the custom class inherited from TypeConvertor class and use TypeDescriptor.CreateProperty() method to add custom property name to display properties you want. |
Sample:
|