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:

DiagramItem Property

Initialized With

Brush

ShapeBrush
TableBrush
LinkBrush

Font

Font

Locked

false

Pen

ShapePen
TablePen
LinkPen

Selected

SelectAfterCreate

Tag

null

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

TextColor

TextColor

TextFormat

TextFormat

Transparent

false

ContainerNode Property

Initialized With

AutoShrink

false

Caption

ContainerCaption

CaptionBrush

Black

CaptionFormat

TextFormat

CaptionHeight

ContainerCaptionHeight

Foldable

ContainersFoldable

Folded

false

HighlightPen

ContainerHighlightPen

Margin

ContainerMargin

MinimumSize

ContainerMinimumSize

TableNode Property

Initialized With

Caption

TableCaption

CaptionColor

Color.FromArgb(0, 0, 0)

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

TextColor

TextColor

DiagramLink Property

Initialized With

BaseShape

LinkBaseShape

BaseShapeSize

LinkBaseShapeSize

HeadShape

LinkHeadShape

HeadShapeSize

LinkHeadShapeSize

AutoRoute

RouteLinks

CascadeOrientation

LinkCascadeOrientation

CustomDraw

LinkCustomDraw

Dynamic

DynamicLinks

HeadPen

LinkPen

IntermediateShape

LinkIntermediateShape

IntermediateShapeSize

LinkIntermediateShapeSize

RetainForm

LinksRetainForm

SegmentCount

LinkSegments

Shape

LinkShape

Text

LinkText

TextColor

TextColor

TextStyle

LinkTextStyle