Each new item created either by the user or programmatically, is initialized with some kind of default values. You can set these values each time a new object is created. Still it would be more efficient to set the default values once and use them for all subsequently created objects.
New items are initialized through the Diagram properties, but you can change the default values by handling the InitializeNode and InitializeLink events.
Items created through the diagram's Factory object are always initialized from the default-property values defined in Diagram.
Below are listed item settings and the corresponding constants or Diagram properties through which they are initialized:
DiagramItem Property | Initialized With |
---|---|
false | |
null | |
(empty string) | |
true |
ShapeNode Property | Initialized With |
---|---|
null | |
false |
DiagramLink Property | Initialized With |
---|---|
TableNode Property | Initialized With |
---|---|
Color.FromArgb(0, 0, 0) | |
Centered horizontal and vertical alignment | |
null | |