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)

Selected

SelectAfterCreate

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

CustomDraw

ShapeCustomDraw

EnabledHandles

AdjustmentHandles.All

Expandable

NodesExpandable

HandlesStyle

ShapeHandlesStyle

Image

null

ImageAlign

ImageAlign.Fit

Text

ShapeText

TextFormat

TextFormat

Transparent

false

ContainerNode Property

Initialized With

AutoShrink

false

Caption

ContainerCaption

CaptionBrush (styled)

null (affected by TextBrush of the corresponding DiagramItemStyle)

CaptionFormat

TextFormat

CaptionHeight

ContainerCaptionHeight

Foldable

ContainersFoldable

Folded

false

HighlightPen

ContainerHighlightPen

Margin

ContainerMargin

MinimumSize

ContainerMinimumSize

TableNode Property

Initialized With

Caption

TableCaption

CaptionBrush (styled)

null (affected by TextBrush of the associated TableNodeStyle)

CaptionFormat

Centered horizontal and vertical alignment

CellCustomDraw

CellCustomDraw

CellFrameStyle

CellFrameStyle

ColumnWidth

TableColumnWidth

CustomDraw

TableCustomDraw

HandlesStyle

TableHandlesStyle

Image

null

ImageAlign

ImageAlign.Fit

ConnectionStyle

TableConnectionStyle

RowHeight

TableRowHeight

Scrollable

TablesScrollable

Shape

TableShape

DiagramLink Property

Initialized With

BaseShape

LinkBaseShape

BaseShapeSize

LinkBaseShapeSize

HeadShape

LinkHeadShape

HeadShapeSize

LinkHeadShapeSize

AutoRoute

RouteLinks

CascadeOrientation

LinkCascadeOrientation

CustomDraw

LinkCustomDraw

Dynamic

DynamicLinks

HeadPen (styled)

null (affected by HeadStroke and HeadStrokeThickness of the associated DiagramLinkStyle)

IntermediateShape

LinkIntermediateShape

IntermediateShapeSize

LinkIntermediateShapeSize

RetainForm

LinksRetainForm

SegmentCount

LinkSegments

Shape

LinkShape

Text

LinkText

TextStyle

LinkTextStyle