Search
Initial Values of Item Properties

Each new item, created either by the user or programmatically, is initialized with some kind of default property values.

If you create items by using the new operator and adding them the diagram's Nodes or Links collection, you can initialize the items by passing a Diagram reference to the respective constructor, or by passing another item to the copy constructor. In the former case, item properties are initialized from the default-property values defined in Diagram. In the latter case, properties are copied from the prototype item.

When users draw new items, the items are initialized from the Diagram properties, but you can change the default values by handling the initializeNode and initializeLink events.

Items created via the diagram's Factory object are always initialized from the default-property values defined in Diagram.

Below are listed item properties and the corresponding constants or Diagram properties through which they are initialized.

Note that some properties in the tables below are marked as styled. Styled properties usually default to null (Nothing in Visual Basic), unless the item is created through the prototype constructor, in which case the values of the styled properties are obtained from the prototype item. When a style property is null, its effective value is determined by the style associated with the item or the theme applied to the diagram. For more information on how the style system works, check Styles and Themes.

DiagramItem Property

Initialized With

Brush (styled)

null (affected by Brush of the corresponding DiagramItemStyle)

Locked

false

Font (styled)

null (affected by FontFamily, FontSize, FontStyle, and FontUnit of the corresponding DiagramItemStyle)

Pen (styled)

null (affected by Stroke and StrokeThickness of the corresponding DiagramItemStyle)

ShadowBrush (styled)

null (affected by ShadowBrush of the corresponding DiagramItemStyle)

ShadowOffsetX

ShadowOffsetX

ShadowOffsetY

ShadowOffsetY

Tag

null

TextBrush (styled)

null (affected by TextBrush of the corresponding DiagramItemStyle)

ToolTip

(empty string)

Visible

true

ShapeNode Property

Initialized With

EnabledHandles

AdjustmentHandles.All

Expandable

NodesExpandable

ImageUrl

(empty string)

ImageAlign

ImageAlign.Fit

Text

ShapeText

TextFormat

TextFormat

Transparent

false

ContainerNode Property

Initialized With

Caption

ContainerCaption

CaptionHeight

ContainerCaptionHeight

Foldable

ContainersFoldable

Folded

false

Margin

ContainerMargin

TableNode Property

Initialized With

Caption

TableCaption

ConnectionStyle

TableConnectionStyle

Scrollable

TablesScrollable

DiagramLink Property

Initialized With

BaseShape

LinkBaseShape

HeadShape

LinkHeadShape

Shape

LinkShape

Text

LinkText