Search
Diagram Members
Constructors Properties Methods
 


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.

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.

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.

 See Also