Search
Initial Values of Item Properties

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

Brush

ShapeBrush
TableBrush
LinkBrush

Font

Font

Locked

false

Pen

ShapePen
TablePen
LinkPen

Selected

SelectAfterCreate

ShadowOffsetX

ShadowOffsetX

ShadowOffsetY

ShadowOffsetY

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

TextBrush

TextColor

TextFormat

TextFormat

Transparent

false

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

TextBrush

TextColor

TextStyle

LinkTextStyle

TableNode Property

Initialized With

Caption

TableCaption

CaptionBrush

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

CaptionBrush

TextColor