ASP.NET Pack Programmer's Guide
Diagram Members
Constructors Fields 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 Fields

  Name Description

items

A list of DiagramItem objects.

links

A list of DiagramLink objects.

nodes

A list of DiagramNode objects.

preventDefaultTouch

Indicates whether to stop default touch behavior of browsers in order to allow interactive drawing and modification of diagram items.

 Public Methods

  Name Description

addEventListener

Registers a single event listener on the Diagram.

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.

beginEdit

Overloaded.  

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.

copyToClipboard

Copies the current selection of items to the clipboard.

create

Creates and initializes a new Diagram from the specified element. This method is static and can be called without creating an instance of the class.

cutToClipboard

Cuts the currently selected items to the clipboard.

dispose

Overrides Component.Dispose

endEdit

Exits the in-place editing mode and either accepts or rejects the changes made to the item's text.

executeCommand

Executes the specified command on this diagram.

find

Returns the specified Diagram object. This member is static and can be invoked without creating an instance of the class.

fromJson

Deserializes the diagram from a JSON string.

fromXmlDocument

Loads diagram contents from specified XML Document.

getActiveItem

Gets the active diagram element.

getAdjustmentHandlesSize

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

getAlignToGrid

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

getAllowInplaceEdit

Gets a value indicating whether in-place editing of the text of objects is enabled.

getAllowMultipleResize

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

getAllowSelfLoops

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

getAllowUnconnectedLinks

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

getAutoArrangeAvoidContainers

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

getAutoArrangeAvoidSegments

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

getAutoCloseDistance

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

getAutoResize

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

getAutoScroll

Gets a value indicating whether auto scrolling of the document area is enabled.

getAutoScrollAmount

Gets the amount by which to auto-scroll the view when the mouse leaves the view boundaries while drawing.

getBackBrush

Gets the object used for painting the diagram background.

getBackgroundImageAlign

Gets a value indicating how the background image is positioned.

getBackgroundImageContent

Gets the Base64-encoded data of the background image.

getBackgroundImageUrl

Gets the URL of the image displayed as background of this diagram.

getBehavior

Gets a value indicating how the control responds to user actions.

getContentBounds

Returns the smallest rectangle that bounds all diagram items.

getCrossingRadius

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

getCustomLinkType

Gets the type of a MindFusion.Diagramming.DiagramLink derived class whose instance should be created when a user starts drawing.

getCustomNodeType

Gets the type of a MindFusion.Diagramming.DiagramNode derived class whose instance should be created when a user starts drawing.

getDefaultShape

Gets the default Shape of shapeNode-s.

getDelKeyAction

Gets a value that specifies what action should be performed when the user hits the Del key.

getDirty

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

getDynamicLinks

Gets the default value for the Dynamic property of new links.

getEnabled

Checks if mouse events are enabled.

getExpandOnIncoming

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

getFactory

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

getFont

Gets the font for text written on diagram items.

getFreeFormAttractDistance

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

getFreeFormTargets

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

getGridColor

Gets the color of the grid points.

getGridOffsetX

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

getGridOffsetY

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

getGridPointSize

Gets the size of shapes used to represent grid points.

getGridSizeX

Gets the horizontal distance between adjacent grid points.

getGridSizeY

Gets the vertical distance between adjacent grid points.

getGridStyle

Gets the visual style of the alignment grid.

getItemAt

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

getItems

Returns the array of all items in this diagram.

getItemsAt

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

getLaneGrid

Gets the lane grid.

getLeftButtonActions

Gets a combination of flags that specify what actions can be performed via the left mouse button.

getLinkAt

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

getLinkBaseShape

Gets the shape displayed at the base of new links.

getLinkBaseShapeSize

Gets the default size of the base of new links.

getLinkBrush

Gets the default fill of links.

getLinkCrossings

Gets a value indicating how to render the intersection points where two links cross each other.

getLinkHeadShape

Gets the shape displayed as head of new links.

getLinkHeadShapeSize

Gets the default size of arrowheads.

getLinkHitDistance

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

getLinkPen

Gets the default stroke of links.

getLinkRouter

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

getLinks

Returns the array of all links in this diagram.

getLinksAt

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

getLinkSegments

Gets the default number of arrow segments.

getLinkShape

Gets the initial shape assigned to new links.

getLinkTextStyle

Gets the default placement and orientation for links' text.

getMagnifierEnabled

Gets a value indicating whether the magnifier tool is currently enabled.

getMagnifierFactor

Gets the zoom factor of the magnifier tool.

getMagnifierFrameColor

Gets the color of the magnifier tool's frame.

getMagnifierFrameThickness

Gets the thickness of the magnifier frame.

getMagnifierHeight

Gets the height of the magnifier tool.

getMagnifierSecondaryFrameColor

Gets the color of the magnifier tool's secondary frame.

getMagnifierShading

Gets a value indicating whether to enhance the effect of a magnifier lense by using a gradient shading.

getMagnifierShape

Gets a reference to the geometric shape definition of the magnifier tool.

getMagnifierWidth

Gets the width of the magnifier tool.

getMiddleButtonActions

Gets a combination of flags that specify what actions can be performed via the middle mouse button.

getModificationStart

Gets how users can start modifying diagram items.

getModifierKeyActions

Gets an object, which allows changing the function of keyboard modifier keys such as Ctrl and Alt.

getNearestNode

Returns the node nearest to the specified point.

getNodeAt

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

getNodeEffects

Gets an array with all effects applied to the nodes of this diagram.

getNodes

Returns the array of all nodes in this diagram.

getNodesAt

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

getNodesExpandable

Gets a value indicating whether newly created nodes can be expanded.

getRightButtonActions

Gets a combination of flags that specify what actions can be performed via the right mouse button.

getRoundedLinks

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

getRoundedLinksRadius

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

getRouteLinks

Gets a value indicating whether links should avoid nodes by going the shortest path from their origin to their destination without crossing any other nodes.

getRouteMargin

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

getScrollX

Gets the diagram's horizontal scroll position.

getScrollY

Gets the diagram's vertical scroll position.

getScrollZoneSize

Gets the size of the auto scroll zone near the edges of the control.

getSelection

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

getShadowOffsetX

Gets the horizontal offset of objects' shadows.

getShadowOffsetY

Gets the vertical offset of objects' shadows.

getShadowsStyle

Gets the style for rendering shadows.

getShapeBrush

Gets the default fill of shape nodes.

getShapeLibraryLocation

Gets 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.

getShapePen

Gets the default stroke of shape node-s.

getShowAnchors

Gets a value indicating whether and when anchor point marks are displayed.

getShowDisabledHandles

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

getShowGrid

Gets a value indicating whether the alignment grid is visible.

getShowLaneGrid

Gets a value indicating whether the lane grid is visible.

getStyle

Gets the style associated with this diagram.

getTag

Gets custom data associated with this diagram.

getTheme

Gets the theme associated with this diagram.

getTooltipDelay

Gets the delay before a tooltip is shown.

getUndoEnabled

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

getViewport

Returns the visible portion of the diagram area.

getVirtualScroll

Gets a value indicating whether virtual scroll mode is enabled.

initialize

Overrides Component.Initialize

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.

pasteFromClipboard

Overloaded.  

raiseClicked

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

raiseCreated

Overloaded.  

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.

raiseEvent

Raises an event.

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.

record

Starts recording mouse and keyboard events for subsequent replay.

redo

Executes again an action saved in the command history.

registerForSubmit

Registers an onsubmit handler for the Diagram's parent html form to flush postback data.

registerItemClass

Registers a diagram item class for serialization support.

removeEventListener

Removes a single event listener attached to the Diagram.

removeItem

Removes the specified item from the Diagram.

replay

Replays a sequence of recorded mouse and keyboard events created by record and stopRecording methods.

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.

scrollTo

Scrolls the diagram to the specified point.

setAdjustmentHandlesSize

Sets the size of adjustment handles that appear around selected items.

setAlignToGrid

Sets a value indicating whether the diagram items should be aligned to a grid.

setAllowInplaceEdit

Sets a value indicating whether in-place editing of the text of objects is enabled.

setAllowMultipleResize

Sets a value indicating whether multiple selected nodes can be resized simultaneously.

setAllowSelfLoops

Sets a value indicating whether users are allowed to draw reflexive links.

setAllowUnconnectedLinks

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

setAutoArrangeAvoidContainers

Sets a value indicating whether auto-arranged link labels should avoid containers.

setAutoArrangeAvoidSegments

Sets a value indicating whether auto-arranged link labels should avoid link segments.

setAutoCloseDistance

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

setAutoResize

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

setAutoScroll

Sets a value indicating whether auto scrolling of the document area is enabled.

setAutoScrollAmount

Sets the amount by which to auto-scroll the view when the mouse leaves the view boundaries while drawing.

setBackBrush

Sets an object used for painting the diagram background.

setBackgroundImageAlign

Sets a value indicating how the background image is positioned.

setBackgroundImageContent

Sets the Base64-encoded data of the background image.

setBackgroundImageUrl

Sets the URL of the image displayed as background of this diagram.

setBehavior

Sets a value indicating how the control responds to user actions.

setCrossingRadius

Sets the radius length of decorations displayed at link intersection points.

setCustomLinkType

Sets the type of a MindFusion.Diagramming.DiagramLink derived class whose instance should be created when a user starts drawing.

setCustomNodeType

Sets the type of a MindFusion.Diagramming.DiagramNode derived class whose instance should be created when a user starts drawing.

setDefaultShape

Sets the default shape of shape nodes.

setDelKeyAction

Sets a value that specifies what action should be performed when the user hits the Del key.

setDirty

Sets a value indicating whether the diagram has changed since loading it.

setDynamicLinks

Sets the default value for the Dynamic property of new links.

setEnabled

Enables or disables handling of mouse events.

setExpandOnIncoming

Sets a value indicating the link direction in which tree branches are expanded.

setFont

Sets the font for text written on DiagramItem-s.

setFreeFormAttractDistance

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

setFreeFormTargets

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

setGridColor

Sets the color of the grid points.

setGridOffsetX

Sets the horizontal offset of the first point of the alignment grid.

setGridOffsetY

Sets the vertical offset of the first point of the alignment grid.

setGridPointSize

Sets the size of shapes used to represent grid points.

setGridSizeX

Sets the horizontal distance between adjacent grid points.

setGridSizeY

Sets the vertical distance between adjacent grid points.

setGridStyle

Sets the visual style of the alignment grid.

setLinkBaseShape

Sets the Shape displayed at the base of new links.

setLinkBaseShapeSize

Sets the default size of the base shape of new links.

setLinkBrush

Sets the default fill of links.

setLinkCrossings

Sets a value indicating how to render the intersection points where two links cross each other.

setLinkHeadShape

Sets the Shape displayed as head of new links.

setLinkHeadShapeSize

Sets the default size of arrowheads.

setLinkHitDistance

Sets a value specifying how far from a link a click is still considered a hit.

setLinkPen

Sets the default stroke of links.

setLinkRouter

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

setLinkSegments

Sets the default number of arrow segments.

setLinkShape

Sets the initial shape assigned to new links.

setLinkTextStyle

Sets the default placement and orientation for links' text.

setMagnifierEnabled

Sets a value indicating whether the magnifier tool is currently enabled.

setMagnifierFactor

Sets the zoom factor of the magnifier tool.

setMagnifierFrameColor

Sets the color of the magnifier tool's frame.

setMagnifierFrameThickness

Sets the thickness of the magnifier frame.

setMagnifierHeight

Sets the height of the magnifier tool.

setMagnifierSecondaryFrameColor

Sets the color of the magnifier tool's secondary frame.

setMagnifierShading

Sets a value indicating whether to enhance the effect of a magnifier lense by using a gradient shading.

setMagnifierShape

Sets a reference to the geometric shape definition of the magnifier tool.

setMagnifierWidth

Sets the width of the magnifier tool.

setMiddleButtonActions

Sets a combination of flags that specify what actions can be performed via the middle mouse button.

setModificationStart

Sets how users can start modifying diagram items.

setNodesExpandable

Sets a value indicating whether newly created nodes can be collapsed and expanded by users.

setRightButtonActions

Sets a combination of flags that specify what actions can be performed via the right mouse button.

setRoundedLinks

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

setRoundedLinksRadius

Sets the radius of joint arcs of rounded links' segments.

setRouteLinks

Sets a value indicating whether links should avoid nodes by going the shortest path from their origin to their destination without crossing any other nodes.

setRouteMargin

Sets the minimal distance between nodes and auto-routed links.

setScroll

IZoomTarget implementation

setScrollX

Sets the diagram's horizontal scroll position.

setScrollY

Sets the diagram's vertical scroll position.

setScrollZoneSize

Sets the size of the auto scroll zone near the edges of the control.

setShadowOffsetX

Sets the horizontal offset of objects' shadows.

setShadowOffsetY

Sets the vertical offset of objects' shadows.

setShadowsStyle

Sets the style for rendering shadows.

setShapeBrush

Sets the default fill of shape nodes.

setShapeLibraryLocation

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.

setShapePen

Sets the default stroke of shape nodes.

setShowAnchors

Sets a value indicating whether and when anchor point marks are displayed.

setShowDisabledHandles

Sets a value indicating whether adjustment handles are painted when they are disabled.

setShowGrid

Sets a value indicating whether the alignment grid is visible.

setShowLaneGrid

Sets a value indicating whether the lane grid is visible.

setStyle

Sets the style associated with this diagram.

setTag

Sets custom data associated with this diagram.

setTheme

Sets the theme associated with this diagram.

setTooltipDelay

Sets the delay before a tooltip is shown.

setUndoEnabled

Sets a value indicating whether saving action records for later undo is enabled.

setVirtualScroll

Enables or disables virtual scroll mode.

setZoomFactorPivot

Sets the zoom factor, preserving the on-screen position of the specified diagram point.

setZoomLevel

IZoomTarget implementation.

startCompositeOperation

Starts recording undo/redo commands into a CompositeCommand.

stopRecording

Stops recording mouse and keyboard events.

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.

zoomToFit

Zooms the view to fit the document contents in the Diagram client area.

zoomToRect

Zooms and scrolls the view to fit the specified document rectangle in the Diagram's visible area.

 See Also

Diagram Class
MindFusion.Diagramming Namespace