Search
Diagram Members
Constructors Properties Methods Events
 


The Diagram class represents a flow diagram.

The following tables list the members exposed by the Diagram type.

 Public Constructors

  Name Description

Diagram

Initializes a new instance of the Diagram class.

 Public Properties

  Name Description

activeItem

Gets the active diagram item.

activeItemHandlesStyle

Gets or sets the visual style of adjustment handles of the active item.

adjustmentHandlesSize

Gets or sets the size of adjustment handles that appear around selected items.

alignToGrid

Gets or sets a value indicating whether the diagram items should be aligned to a grid.

allowMultipleResize

Gets or sets a value indicating whether multiple selected nodes can be resized simultaneously.

allowSelfLoops

Gets or sets a value indicating whether users are allowed to draw reflexive links.

allowSplitLinks

Gets or sets a value indicating whether link segments can be added and removed interactively.

allowUnanchoredLinks

Gets or sets a value indicating whether users can link nodes that do not have designated anchor points.

allowUnconnectedLinks

Gets or sets a value indicating whether users are allowed to draw links that are not connected to any node.

autoArrangeAvoidContainers

Gets or sets a value indicating whether auto-arranged link labels should avoid containers.

autoArrangeAvoidSegments

Gets or sets a value indicating whether auto-arranged link labels should avoid link segments.

autoCloseDistance

Gets or sets the maximum distance between first and last points of a FreeFormNode for which the node's outline is closed automatically.

autoDeleteLinks

Gets or sets whether links are deleted automatically when their origin or destination is deleted.

autoResize

Gets or sets a value indicating whether the document area should be resized automatically so it fits the diagram contents.

backBrush

Gets or sets an object specifying how to fill the diagram background.

backgroundImageAlign

Gets or sets a value indicating how to align the background image.

backgroundImageContent

Gets or sets a Base64-encoded image to display as diagram background.

backgroundImageUrl

Gets or sets URL of the image to paint as diagram's background.

crossingRadius

Gets or sets the radius length of decorations displayed at link intersection points.

customLinkType

Gets or sets the type of DiagramLink objects to create when users starts drawing.

customNodeType

Gets or sets the type of DiagramNode objects to create when users starts drawing.

defaultShape

Gets or sets the default shape assigned to new ShapeNode objects.

dirty

Gets or sets a value indicating whether the diagram has changed since loading it.

disabledHandlesStyle

Gets or sets the visual style of disabled adjustment handles.

dynamicLinks

Gets or sets initial value of the dynamic property of new links.

expandButtonAction

Gets or sets how the control responds to users clickingthe +/- button displayed by expandable nodes.

expandOnIncoming

Gets or sets a value indicating the link direction in which tree branches are expanded.

factory

Gets a Factory object that lets you programmatically add new items to the diagram.

font

Gets or sets the default font of text displayed by diagram items.

freeFormAttractDistance

Gets or sets the radius around dragged free-form adjustment handle in which other points of FreeFormNode are modified too.

freeFormTargets

Gets or sets an array of Shape objects used to replace FreeFormNode instances with ShapeNode ones when behavior is set to LinkFreeShapes or DrawFreeShapes.

gridColor

Gets or sets the color of grid points.

gridOffsetX

Gets or sets the horizontal offset of the first point of the alignment grid.

gridOffsetY

Gets or sets the vertical offset of the first point of the alignment grid.

gridPointSize

Gets or sets the size of shapes used to represent grid points.

gridSizeX

Gets or sets the horizontal distance between adjacent grid points.

gridSizeY

Gets or sets the vertical distance between adjacent grid points.

gridStyle

Gets or sets the visual style of the alignment grid.

items

Returns an array of all items in this diagram.

laneGrid

Gets the lane grid.

linkBaseShape

Gets or sets the shape displayed at the base of new links.

linkBaseShapeSize

Gets or sets the default size of arrowheads at base of new links.

linkBrush

Gets or sets the default fill of link arrowheads.

linkCrossings

Gets or sets a value indicating how to render the intersection points of links.

linkHeadShape

Gets or sets the shape displayed as head of new links.

linkHeadShapeSize

Gets or sets the default size of arrowheads.

linkHitDistance

Gets or sets a value specifying how far from a link a click is still considered a hit.

linkPen

Gets or sets the default stroke of links.

linkRouter

Gets or sets the object used to find paths for auto-routed links when diagram nodes are added or their positions change.

links

Returns an array of all links in this diagram.

linkSegments

Gets or sets the default number of link segments.

linkShape

Gets or sets the initial shape assigned to new links.

linkTextStyle

Gets or sets the default text placement and orientation of new links.

mergeThreshold

Gets or sets the maximum distance between adjacent control points of a link at which the respective segments can be merged.

nodeEffects

Gets the global effects applied to nodes in this diagram.

nodes

Returns an array of all nodes in this diagram.

nodesExpandable

Gets or sets a value indicating whether newly created nodes are expandable.

roundedLinks

Gets or sets a value indicating whether the joints between segments of Polyline and Cascading links should be rounded.

roundedLinksRadius

Gets or sets the radius of joint arcs of rounded links' segments.

routeLinks

Gets or sets initial value of the autoRoute property of new links.

routeMargin

Gets or sets the minimal distance between nodes and auto-routed links.

selectedItemHandlesStyle

Gets or sets the visual style of adjustment handles of selected items.

selection

Gets a Selection instance that represents the selection of items in this diagram.

shadowOffsetX

Gets or sets the horizontal offset of items' shadows.

shadowOffsetY

Gets or sets the vertical offset of items' shadows.

shadowsStyle

Gets or sets the style of shadows.

shapeBrush

Gets or sets the default fill of ShapeNode objects.

shapeLibraryLocation

Gets or sets the location of a shape library file containing custom shape definitions. It can be set to a full URL of the file, or a relative file path.

shapePen

Gets or sets the default stroke of ShapeNode objects.

showAnchors

Gets or sets a value indicating when to display anchor point marks.

showDisabledHandles

Gets or sets a value indicating whether adjustment handles are painted when they are disabled.

showGrid

Gets or sets a value indicating whether the alignment grid is visible.

showLaneGrid

Gets or sets a value indicating whether the lane grid is visible.

style

Gets or sets the style associated with this diagram.

tag

Gets or sets custom data associated with this diagram.

theme

Gets or sets the theme associated with this diagram.

undoEnabled

Gets or sets a value indicating whether saving action records for later undo is enabled.

validityChecks

Gets or sets a value indicating whether validity checks are performed each time an item is added to the diagram.

version

Gets a string identifying current version of the library.

 Public Methods

  Name Description

addItem

Adds an item to the Diagram.

alignPointToGrid

Returns a point of the alignment grid nearest to the one passed as an argument.

arrange

Arranges the diagram with the given layout.

arrangeAnimated

Arranges the diagram using the given layout, and animates items moving to their new positions.

arrangeLinkLabels

Rearranges link labels whose autoArrange property is enabled.

cancelCompositeOperation

Stops recording undo/redo commands into a CompositeCommand and discards the records created so far.

clearAll

Removes all items from the diagram.

commitCompositeOperation

Stops recording undo/redo commands into a CompositeCommand and saves the composite in the history queue.

executeCommand

Executes the specified command on this diagram.

fromJson

Deserializes the diagram from a JSON string.

fromXmlDocument

Loads diagram contents from specified XML Document.

getContentBounds

Returns the smallest rectangle that bounds all diagram items.

getItemAt

Finds and returns the topmost DiagramItem found at the specified location.

getItemsAt

Finds and returns an array of the diagram items found at the specified location.

getLinkAt

Finds and returns the topmost DiagramLink found at the specified location.

getLinksAt

Finds and returns an array of the diagram DiagramLinks found at the specified location.

getNearestNode

Returns the node nearest to the specified point.

getNodeAt

Finds and returns the topmost DiagramNode found at the specified location.

getNodesAt

Finds and returns an array of the DiagramNodes found at the specified location.

isItemInteractive

Checks if the specified item can be modified interactively.

isItemVisible

Checks if the specified item is currently visible.

loadFromString

Loads diagram contents from specified XML or JSON string.

loadFromXml

Loads the diagram from an XML file.

raiseClicked

Raises an event which notifies that a Diagram item has been clicked.

raiseCreated

Raises an event which notifies that a Diagram item has been created.

raiseDeleted

Raises an event which notifies that a Diagram item has been deleted.

raiseDeselected

Raises an event which notifies that a Diagram item has been deselected.

raiseDoubleClicked

Raises an event which notifies that a Diagram item has been double-clicked.

raiseModified

Raises an event which notifies that a Diagram item has been modified.

raisePasted

Raises an event which notifies that a Diagram item has been pasted from clipboard.

raiseSelected

Raises an event which notifies that a Diagram item has been selected.

raiseSelecting

Raises an event which notifies that a Diagram item will be selected.

raiseSelectingAsync

Raises an event which notifies that a Diagram item will be selected. (Inherited from DiagramBase.)

raiseSelectionChanged

Raises an event which notifies that the selection has changed.

redo

Executes again an action saved in the command history.

registerClass

Registers a diagram item class.

registerComponent

Registers a component class.

registerItemClass

Registers a diagram item class for XML serialization support.

removeItem

Removes the specified item from the Diagram.

resizeToFitItem

Resize the document extents so that the specified item is contained within.

resizeToFitItems

Resizes the document scrollable area so that it fits all diagram items.

routeAllLinks

Routes all links in the diagram in such a way they do not cross nodes.

saveToString

Encodes the diagram contents into an XML or JSON string.

saveToXml

Saves the diagram to an XML file.

startCompositeOperation

Starts recording undo/redo commands into a CompositeCommand.

toJson

Serializes the diagram into a JSON string.

toXmlDocument

Saves the diagram into an XML Document.

undo

Undoes an action saved in the command history.

 Public Events

  Name Description

animatedLayoutCompleted

Raised when an animated layout completes. (Inherited from DiagramBase.)

cellTextEdited

Raised when the user edits the text of a table cell. (Inherited from DiagramBase.)

cellTextEditing

Raised when the user starts to edit the text of a table cell. (Inherited from DiagramBase.)

clicked

Raised when the user clicks the diagram at a point where no items are located. (Inherited from DiagramBase.)

containerChildAdded

Raised when the user adds a node to a ContainerNode. (Inherited from DiagramBase.)

containerChildAdding

A validation event raised to let you prevent users from adding child nodes to a container. (Inherited from DiagramBase.)

containerChildRemoved

Raised when the user removes a node from a ContainerNode. (Inherited from DiagramBase.)

containerChildRemoving

Raised when the user removes a node from a ContainerNode. (Inherited from DiagramBase.)

containerFolded

Raised when the user folds a container by clicking the arrow-up button in the container's caption bar. (Inherited from DiagramBase.)

containerUnfolded

Raised when the user unfolds a container by clicking the arrow-down button in the container's caption bar. (Inherited from DiagramBase.)

dataLoaded

Raised when the diagram data is loaded. (Inherited from DiagramBase.)

deserializeTag

Raised when the Tag or Id of a diagram item must be deserialized from XML format. (Inherited from DiagramBase.)

drawAdjustmentHandles

Raised to draw custom adjustment handles. (Inherited from DiagramBase.)

drawAnchorPoint

Raised when an anchor point must be custom-drawn. (Inherited from DiagramBase.)

expandButtonClicked

Raised if expandButtonAction is set to RaiseEvents and the [+/-]button of an expandable node is clicked. (Inherited from DiagramBase.)

headerResized

Raised when the user finished resizing a header. (Inherited from DiagramBase.)

headerStartResizing

Raised when the user starts resizing a header. (Inherited from DiagramBase.)

hitTestAdjustmentHandles

Raised to hit-test custom adjustment handles. (Inherited from DiagramBase.)

hyperlinkClicked

Raised when the user clicks a hyperlink inside a node. (Inherited from DiagramBase.)

initializeLink

Raised when the user removes a node from a ContainerNode. (Inherited from DiagramBase.)

initializeNode

Raised when the user starts drawing a new node, just after the DiagramNode instance is created. (Inherited from DiagramBase.)

itemAdded

Raised when an item is added to the diagram. (Inherited from DiagramBase.)

itemRemoved

Raised when an item is removed from the diagram. (Inherited from DiagramBase.)

laneGridCellTextEdited

Raised when the user edits the text of a grid cell. (Inherited from DiagramBase.)

linkClicked

Raised when the user clicks a link. (Inherited from DiagramBase.)

linkCreated

Raised when the user draws a new link. (Inherited from DiagramBase.)

linkCreating

A validation event raised while the user is drawing a new link. (Inherited from DiagramBase.)

linkDeleted

Raised when a link is deleted, either programmatically or by the user. (Inherited from DiagramBase.)

linkDeleting

Raised when the user tries to delete a link. This event lets you cancel the operation. (Inherited from DiagramBase.)

linkDeselected

Raised when a link is deselected, either programmatically or by the user. (Inherited from DiagramBase.)

linkDoubleClicked

Raised when the user double-clicks a link. (Inherited from DiagramBase.)

linkHovered

Raised when the mouse pointer hovers over a link. (Inherited from DiagramBase.)

linkModified

Raised when the user moves any control point of a link. (Inherited from DiagramBase.)

linkModifying

A validation event raised while the user is modifying a link. (Inherited from DiagramBase.)

linkPasted

Raised when a link has been pasted from the clipboard. (Inherited from DiagramBase.)

linkPointerEnter

Raised when the mouse pointer enters the boundaries of a link. (Inherited from DiagramBase.)

linkPointerLeave

Raised when the mouse pointer leaves the boundaries of a link. (Inherited from DiagramBase.)

linkRouted

Raised when a link is routed by the auto-routing algorithm. (Inherited from DiagramBase.)

linkSelected

Raised when a link is selected, either programmatically or by the user. (Inherited from DiagramBase.)

linkSelecting

Raised when the user tries to select a link. This event lets you cancel the operation. (Inherited from DiagramBase.)

linkSplit

Raised when the user splits a link interactively. (Inherited from DiagramBase.)

linkTextEdited

Raised when the user edits the text of a link. (Inherited from DiagramBase.)

linkTextEditing

Raised when the user starts to edit the text of a link. (Inherited from DiagramBase.)

nodeClicked

Raised when the user clicks a node. (Inherited from DiagramBase.)

nodeCreated

Raised when the user draws a new node. (Inherited from DiagramBase.)

nodeCreating

A validation event raised while the user is drawing a new node. (Inherited from DiagramBase.)

nodeDeleted

Raised when a node is deleted, either programmatically or by the user. (Inherited from DiagramBase.)

nodeDeleting

Raised when the user tries to delete a node. This event lets you cancel the operation. (Inherited from DiagramBase.)

nodeDeselected

Raised when a node is deselected, either programmatically or by the user. (Inherited from DiagramBase.)

nodeDomCreated

Raised when the content of a ControlNode is added to the page DOM. (Inherited from DiagramBase.)

nodeDoubleClicked

Raised when the user double-clicks a node. (Inherited from DiagramBase.)

nodeHovered

Raised when the mouse pointer hovers over a node. (Inherited from DiagramBase.)

nodeModified

Raised when the user moves or resizes a node. (Inherited from DiagramBase.)

nodeModifying

A validation event raised while the user is moving or resizing a node. (Inherited from DiagramBase.)

nodePasted

Raised when a node has been pasted from the clipboard. (Inherited from DiagramBase.)

nodePointerEnter

Raised when the mouse pointer enters the boundaries of a node. (Inherited from DiagramBase.)

nodePointerLeave

Raised when the mouse pointer leaves the boundaries of a node. (Inherited from DiagramBase.)

nodeSelected

Raised when a node is selected, either programmatically or by the user. (Inherited from DiagramBase.)

nodeSelecting

Raised when the user tries to select a node. This event lets you cancel the operation. (Inherited from DiagramBase.)

nodeTextEdited

Raised when the user edits the text of a node. (Inherited from DiagramBase.)

nodeTextEditing

Raised when the user starts to edit the text of a node. (Inherited from DiagramBase.)

queryView

Raised to enumerate diagram views. (Inherited from DiagramBase.)

selectionChanged

Raised when the diagram selection has changed. (Inherited from DiagramBase.)

selectionModifying

A validation event raised while the user is moving or resizing multiple items. (Inherited from DiagramBase.)

serializeTag

Raised when the Tag or Id of a diagram item must be serialized in XML format. (Inherited from DiagramBase.)

sizeChanged

Raised when the size of the diagram canvas has changed. (Inherited from DiagramBase.)

tableColumnResized

Raised when the user finishes resizing a column in a table. (Inherited from DiagramBase.)

tableColumnResizing

Raised when the user resizes a column in a table interactively. (Inherited from DiagramBase.)

tableRowResized

Raised when the user finishes resizing a row in a table. (Inherited from DiagramBase.)

tableRowResizing

Raised when the user resizes a row in a table interactively. (Inherited from DiagramBase.)

tableSectionCollapsed

Raised when a table section is collapsed. (Inherited from DiagramBase.)

tableSectionExpanded

Raised when a table section is expanded. (Inherited from DiagramBase.)

treeCollapsed

Raised when a user collapses a tree branch by clicking the [-] button of an expandable node. (Inherited from DiagramBase.)

treeExpanded

Raised when a user expands a tree branch by clicking the [+] button of an expandable node. (Inherited from DiagramBase.)

treeItemTextEdited

Raised when the user edits the text of a tree view item. (Inherited from DiagramBase.)

treeItemTextEditing

Raised when the user starts to edit the text of a tree view item. (Inherited from DiagramBase.)

validateAnchorPoint

A validation event that lets you approve or reject connecting a link to an anchor point. (Inherited from DiagramBase.)

validateLinkCrossing

A validation event that lets you approve or reject displaying a decoration at the intersection point of links. (Inherited from DiagramBase.)

 See Also