menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Diagram - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Diagram

    Inheritance
    System.Object
    Syncfusion.EJ2.EJTagHelper
    Diagram
    Namespace: Syncfusion.EJ2.Diagrams
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class Diagram : EJTagHelper

    Constructors

    Diagram()

    Declaration
    public Diagram()

    Properties

    AddInfo

    Allows the user to save custom information/data about diagram

    Declaration
    public object AddInfo { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    AnimationComplete

    Triggers after animation is completed for the diagram elements.

    Declaration
    public string AnimationComplete { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    AnnotationTemplate

    Customizes the annotation template

    Declaration
    public string AnnotationTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    BackgroundColor

    Defines the background color of the diagram

    Declaration
    public string BackgroundColor { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "transparent"

    BridgeDirection

    Defines the direction of the bridge that is inserted when the segments are intersected Top - Defines the direction of the bridge as Top Bottom - Defines the direction of the bridge as Bottom Left - Sets the bridge direction as left Right - Sets the bridge direction as right

    Declaration
    public BridgeDirection BridgeDirection { get; set; }
    Property Value
    Type Description
    BridgeDirection

    The default value is BridgeDirection.Top

    Click

    Triggers when a node, connector or diagram is clicked

    Declaration
    public string Click { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CollectionChange

    Triggers when a node/connector is added/removed to/from the diagram.

    Declaration
    public string CollectionChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CommandExecute

    Triggers when a command executed.

    Declaration
    public string CommandExecute { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CommandManager

    Defines a set of custom commands and binds them with a set of desired key gestures

    Declaration
    public DiagramCommandManager CommandManager { get; set; }
    Property Value
    Type Description
    DiagramCommandManager

    The default value is null

    ConnectionChange

    Triggers when the connection is changed

    Declaration
    public string ConnectionChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ConnectorDefaults

    Helps to assign the default properties of connector

    Declaration
    public object ConnectorDefaults { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    Connectors

    Defines a collection of objects, used to create link between two points, nodes or ports to represent the relationships between them

    Declaration
    public List<DiagramConnector> Connectors { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<DiagramConnector>

    The default value is null

    Constraints

    Constraints are used to enable/disable certain behaviors of the diagram. None - Disables DiagramConstraints constraints Bridging - Enables/Disables Bridging support for connector UndoRedo - Enables/Disables the Undo/Redo support Tooltip - Enables/Disables Tooltip support UserInteraction - Enables/Disables editing diagram interactively ApiUpdate - Enables/Disables editing diagram through code PageEditable - Enables/Disables editing diagrams both interactively and through code Zoom - Enables/Disables Zoom support for the diagram PanX - Enables/Disable PanX support for the diagram PanY - Enables/Disable PanY support for the diagram Pan - Enables/Disable Pan support the diagram

    Declaration
    public DiagramConstraints Constraints { get; set; }
    Property Value
    Type Description
    DiagramConstraints

    The default value is DiagramConstraints.Default

    ContextMenuBeforeItemRender

    Triggers before rendering the context menu item

    Declaration
    public string ContextMenuBeforeItemRender { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ContextMenuClick

    Triggers when a context menu item is clicked

    Declaration
    public string ContextMenuClick { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ContextMenuOpen

    Triggers before opening the context menu

    Declaration
    public string ContextMenuOpen { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ContextMenuSettings

    Defines type of menu that appears when you perform right-click operation An object to customize the context menu of diagram

    Declaration
    public DiagramContextMenuSettings ContextMenuSettings { get; set; }
    Property Value
    Type Description
    DiagramContextMenuSettings

    The default value is null

    Created

    Triggered when the diagram is rendered completely.

    Declaration
    public string Created { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CustomCursor

    A collection of JSON objects where each object represents a custom cursor action. Layer is a named category of diagram shapes.

    Declaration
    public List<DiagramCustomCursor> CustomCursor { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<DiagramCustomCursor>

    The default value is null

    DataLoaded

    Triggers after diagram is populated from the external data source

    Declaration
    public string DataLoaded { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DataSourceSettings

    Configures the data source that is to be bound with diagram

    Declaration
    public DiagramDataSource DataSourceSettings { get; set; }
    Property Value
    Type Description
    DiagramDataSource

    The default value is null

    DiagramSettings

    Represents the diagram settings

    Declaration
    public object DiagramSettings { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    DoubleClick

    Triggers when a node, connector or diagram model is clicked twice

    Declaration
    public string DoubleClick { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DragEnter

    Triggers when a symbol is dragged into diagram from symbol palette

    Declaration
    public string DragEnter { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DragLeave

    Triggers when a symbol is dragged outside of the diagram.

    Declaration
    public string DragLeave { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DragOver

    Triggers when a symbol is dragged over diagram

    Declaration
    public string DragOver { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DrawingObject

    Defines the object to be drawn using drawing tool

    Declaration
    public object DrawingObject { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    Drop

    Triggers when a symbol is dragged and dropped from symbol palette to drawing area

    Declaration
    public string Drop { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ElementDraw

    Triggered when an element is drawn using drawing Tool

    Declaration
    public string ElementDraw { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    EnableConnectorSplit

    Split the connector, when the node is dropped onto it and establish connection with that dropped node.

    Declaration
    public bool EnableConnectorSplit { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

    Declaration
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    ExpandStateChange

    Triggers when the state of the expand and collapse icon change for a node.

    Declaration
    public string ExpandStateChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    FixedUserHandleClick

    Triggers when a node/connector fixedUserHandle is clicked in the diagram.

    Declaration
    public string FixedUserHandleClick { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    FixedUserHandleTemplate

    This property allows us to define HTML elements for fixed user handle

    Declaration
    public string FixedUserHandleTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    GetConnectorDefaults

    Helps to return the default properties of connector

    Declaration
    public object GetConnectorDefaults { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    GetCustomCursor

    Declaration
    public object GetCustomCursor { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    GetCustomProperty

    Allows to get the custom properties that have to be serialized

    Declaration
    public object GetCustomProperty { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    GetCustomTool

    Declaration
    public object GetCustomTool { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    GetDescription

    Declaration
    public object GetDescription { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    GetNodeDefaults

    Helps to return the default properties of node

    Declaration
    public object GetNodeDefaults { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    Height

    Defines the height of the diagram model.

    Declaration
    public string Height { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "100%"

    HistoryChange

    Triggers when a change is reverted or restored(undo/redo)

    Declaration
    public string HistoryChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    HistoryManager

    Customizes the undo redo functionality

    Declaration
    public object HistoryManager { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    HistoryStateChange

    Triggers when a custom entry change is reverted or restored(undo/redo)

    Declaration
    public string HistoryStateChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    HtmlAttributes

    Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.

    Declaration
    public object HtmlAttributes { get; set; }
    Property Value
    Type
    System.Object

    KeyDown

    Triggers when a user is pressing a key.

    Declaration
    public string KeyDown { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    KeyUp

    Triggers when a user releases a key.

    Declaration
    public string KeyUp { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Layers

    A collection of JSON objects where each object represents a layer. Layer is a named category of diagram shapes.

    Declaration
    public List<DiagramLayer> Layers { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<DiagramLayer>

    The default value is null

    Layout

    Layout is used to auto-arrange the nodes in the Diagram area

    Declaration
    public DiagramLayout Layout { get; set; }
    Property Value
    Type Description
    DiagramLayout

    The default value is null

    LayoutUpdated

    Triggers when the layout rendering process in the diagram has either started or completed.

    Declaration
    public string LayoutUpdated { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Load

    This event triggers before the diagram load.

    Declaration
    public string Load { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Loaded

    This event triggers after the diagram elements finished loading using loadDiagram method

    Declaration
    public string Loaded { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Locale

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    Mode

    Defines the diagram rendering mode. SVG - Renders the diagram objects as SVG elements Canvas - Renders the diagram in a canvas

    Declaration
    public RenderingMode Mode { get; set; }
    Property Value
    Type Description
    RenderingMode

    The default value is RenderingMode.SVG

    MouseEnter

    Triggered when mouse enters a node/connector.

    Declaration
    public string MouseEnter { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    MouseLeave

    Triggered when mouse leaves node/connector.

    Declaration
    public string MouseLeave { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    MouseOver

    Triggered when mouse hovers a node/connector.

    Declaration
    public string MouseOver { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    MouseWheel

    Event triggers whenever the user rotate the mouse wheel either upwards or downwards

    Declaration
    public string MouseWheel { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    NodeDefaults

    Helps to assign the default properties of nodes

    Declaration
    public object NodeDefaults { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    Nodes

    Defines the collection of nodes

    Declaration
    public List<DiagramNode> Nodes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<DiagramNode>

    The default value is null

    NodeTemplate

    Customizes the node template

    Declaration
    public string NodeTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnFixedUserHandleMouseDown

    Triggers when a mouseDown on the fixed user handle.

    Declaration
    public string OnFixedUserHandleMouseDown { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnFixedUserHandleMouseEnter

    Triggers when a mouseEnter on the fixed user handle.

    Declaration
    public string OnFixedUserHandleMouseEnter { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnFixedUserHandleMouseLeave

    Triggers when a mouseLeave on the fixed user handle.

    Declaration
    public string OnFixedUserHandleMouseLeave { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnFixedUserHandleMouseUp

    Triggers when a mouseUp on the fixed user handle.

    Declaration
    public string OnFixedUserHandleMouseUp { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnImageLoad

    Triggers when the image node is loaded.

    Declaration
    public string OnImageLoad { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnUserHandleMouseDown

    Triggers when a mouseDown on the user handle.

    Declaration
    public string OnUserHandleMouseDown { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnUserHandleMouseEnter

    Triggers when a mouseEnter on the user handle.

    Declaration
    public string OnUserHandleMouseEnter { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnUserHandleMouseLeave

    Triggers when a mouseLeave on the user handle.

    Declaration
    public string OnUserHandleMouseLeave { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    OnUserHandleMouseUp

    Triggers when a mouseUp on the user handle.

    Declaration
    public string OnUserHandleMouseUp { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    PageSettings

    Page settings enable to customize the appearance, width, and height of the Diagram page.

    Declaration
    public DiagramPageSettings PageSettings { get; set; }
    Property Value
    Type Description
    DiagramPageSettings

    The default value is null

    PositionChange

    Triggers while dragging the elements in diagram

    Declaration
    public string PositionChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    PropertyChange

    Triggers once the node or connector property changed.

    Declaration
    public string PropertyChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    RotateChange

    Triggers when the diagram elements are rotated

    Declaration
    public string RotateChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    RulerSettings

    Defines the properties of both horizontal and vertical guides/rulers to measure the diagram area.

    Declaration
    public DiagramRulerSettings RulerSettings { get; set; }
    Property Value
    Type Description
    DiagramRulerSettings

    The default value is null

    ScrollChange

    Triggers when the diagram is zoomed or panned

    Declaration
    public string ScrollChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ScrollSettings

    Defines the current zoom value, zoom factor, scroll status and view port size of the diagram

    Declaration
    public DiagramScrollSettings ScrollSettings { get; set; }
    Property Value
    Type Description
    DiagramScrollSettings

    The default value is null

    SegmentChange

    This event is triggered when we drag the segment thumb of Orthogonal/ Straight /Bezier connector

    Declaration
    public string SegmentChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SegmentCollectionChange

    Triggers when a segment is added/removed to/from the connector.

    Declaration
    public string SegmentCollectionChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SegmentThumbShape

    Defines the segmentThumbShape

    Declaration
    public SegmentThumbShapes SegmentThumbShape { get; set; }
    Property Value
    Type Description
    SegmentThumbShapes

    The default value is SegmentThumbShapes.Circle

    SegmentThumbSize

    Specifies the size of the segment thumb. When not set, it defaults to matching the underlying path data.

    Declaration
    public double SegmentThumbSize { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 10

    SelectedItems

    Defines the collection of selected items, size and position of the selector

    Declaration
    public DiagramSelector SelectedItems { get; set; }
    Property Value
    Type Description
    DiagramSelector

    The default value is null

    SelectionChange

    Triggers when the selection is changed in diagram

    Declaration
    public string SelectionChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SerializationSettings

    Defines the serialization settings of diagram.

    Declaration
    public DiagramSerializationSettings SerializationSettings { get; set; }
    Property Value
    Type Description
    DiagramSerializationSettings

    The default value is null

    SetNodeTemplate

    Declaration
    public object SetNodeTemplate { get; set; }
    Property Value
    Type
    System.Object

    SizeChange

    Triggers when a node is resized

    Declaration
    public string SizeChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SnapSettings

    Defines the gridlines and defines how and when the objects have to be snapped

    Declaration
    public DiagramSnapSettings SnapSettings { get; set; }
    Property Value
    Type Description
    DiagramSnapSettings

    The default value is null

    SourcePointChange

    Triggers when the connector's source point is changed

    Declaration
    public string SourcePointChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    TargetPointChange

    Triggers when the connector's target point is changed

    Declaration
    public string TargetPointChange { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    TextEdit

    Triggers when editor got focus at the time of node’s label or text node editing.

    Declaration
    public string TextEdit { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Tool

    Defines the precedence of the interactive tools. They are, None - Disables selection, zooming and drawing tools SingleSelect - Enables/Disables single select support for the diagram MultipleSelect - Enables/Disable MultipleSelect select support for the diagram ZoomPan - Enables/Disable ZoomPan support for the diagram DrawOnce - Enables/Disable ContinuousDraw support for the diagram ContinuousDraw - Enables/Disable ContinuousDraw support for the diagram

    Declaration
    public DiagramTools Tool { get; set; }
    Property Value
    Type Description
    DiagramTools

    The default value is DiagramTools.Default

    Tooltip

    Defines the tooltip that should be shown when the mouse hovers over a node or connector An object that defines the description, appearance and alignments of tooltip

    Declaration
    public DiagramDiagramTooltip Tooltip { get; set; }
    Property Value
    Type Description
    DiagramDiagramTooltip

    The default value is null

    UpdateSelection

    Helps to set the undo and redo node selection

    Declaration
    public object UpdateSelection { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    UserHandleTemplate

    This property represents the template content of a user handle. The user can define any HTML element as a template.

    Declaration
    public string UserHandleTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Width

    Defines the width of the diagram model.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "100%"

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved