Class SfDiagram
SfDiagram renders the diagram. It contains all the properties for the diagram to be rendered.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfDiagram : SfDiagramBaseExtension, IBaseInit, IDiagram
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection">
</SfDiagram>
@code{
public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>() { };
protected override void OnInitialized()
{
// A node is created and stored in the nodes collection.
DiagramNode node1 = new DiagramNode()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Style = new NodeShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" }
};
// Add node
NodeCollection.Add(node1);
}
}
Constructors
SfDiagram()
Initialize the diagram members.
Declaration
public SfDiagram()
Properties
AddInfo
Allows the user to save custom information/data about diagram.
Declaration
public object AddInfo { get; set; }
Property Value
Type | Description |
---|---|
System.Object | An object that allows the user to save custom information or data about the diagram. |
AnnotationTemplate
Customizes the annotation template.
Declaration
public string AnnotationTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
BackgroundColor
Defines the background color of the diagram.
Declaration
public string BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
BridgeDirection
Defines the direction of the bridge that is inserted when the segments are intersected.
Declaration
public BridgeDirection BridgeDirection { get; set; }
Property Value
Type | Description |
---|---|
BridgeDirection | One of the BridgeDirection enumeration values that specifies the direction of bridge. The default value is Top. |
ChildContent
Represents a segment of UI content, implemented.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | Accepts a RenderFragment that defines the content of the UI element. |
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 | A DiagramCommandManager object that represents the custom commands and key gestures. |
ConnectorDefaults
Helps to assign the default properties of connector.
Declaration
public DiagramConnector ConnectorDefaults { get; set; }
Property Value
Type | Description |
---|---|
DiagramConnector | A DiagramConnector object that represents the default properties for connectors. |
Connectors
Defines a collection of objects, used to create link between two points, nodes or ports to represent the relationships between them.
Declaration
public ObservableCollection<DiagramConnector> Connectors { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<DiagramConnector> | An |
Constraints
Constraints are used to enable/disable certain behaviors of the diagram.
Declaration
public DiagramConstraints Constraints { get; set; }
Property Value
Type | Description |
---|---|
DiagramConstraints | One of the DiagramConstraints enumeration values that represents the constraints for the diagram. The default value is Default. |
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 | A DiagramContextMenuSettings object that represents the customization settings for the context menu of the diagram. |
CustomCursor
A collection of JSON objects where each object represents a custom cursor action. Layer is a named category of diagram shapes.
Declaration
public ObservableCollection<DiagramCustomCursor> CustomCursor { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<DiagramCustomCursor> |
DataSourceSettings
Configures the data source that is to be bound with diagram.
Declaration
public DiagramDataSource DataSourceSettings { get; set; }
Property Value
Type | Description |
---|---|
DiagramDataSource | Represents the configuration for the data source that will be bound with the diagram. |
DiagramSettings
Defines the settings of diagram.
Declaration
public DiagramSettings DiagramSettings { get; set; }
Property Value
Type | Description |
---|---|
DiagramSettings | Specifies the configuration for the overall behavior and appearance of the diagram. |
DrawingObject
Defines the object to be drawn using drawing tool.
Declaration
public object DrawingObject { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
EnablePersistence
Enable or disable persisting component's state between page reloads.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Height
Defines the height of the diagram model.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
HistoryManager
Customizes the undo redo functionality.
Declaration
public History HistoryManager { get; set; }
Property Value
Type | Description |
---|---|
History |
ID
Declaration
public override string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
IsUpdated
SfDiagram renders the diagram. It contains all the properties for the diagram to be rendered.
Declaration
public bool IsUpdated { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
jsProperty
Declaration
protected override string jsProperty { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Layers
A collection of JSON objects where each object represents a layer. Layer is a named category of diagram shapes.
Declaration
public ObservableCollection<DiagramLayer> Layers { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<DiagramLayer> |
Layout
Layout is used to auto-arrange the nodes in the Diagram area.
Declaration
public DiagramLayout Layout { get; set; }
Property Value
Type | Description |
---|---|
DiagramLayout |
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 | Accepts the string value. The default value is empty. |
Mode
Defines the diagram rendering mode.
Declaration
public RenderingMode Mode { get; set; }
Property Value
Type | Description |
---|---|
RenderingMode | One of the RenderingMode enumeration values that specifies the rendering mode for diagram. The default value is SVG. |
ModelType
Declaration
public override Type ModelType { get; set; }
Property Value
Type | Description |
---|---|
System.Type |
Overrides
nameSpace
Declaration
protected override string nameSpace { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
NodeDefaults
Helps to assign the default properties of nodes.
Declaration
public DiagramNode NodeDefaults { get; set; }
Property Value
Type | Description |
---|---|
DiagramNode |
Nodes
Defines the collection of nodes.
Declaration
public ObservableCollection<DiagramNode> Nodes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<DiagramNode> |
NodeTemplate
Customizes the node template.
Declaration
public string NodeTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
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 |
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 |
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 |
SelectedItems
Defines the collection of selected items, size and position of the selector.
Declaration
public DiagramSelectedItems SelectedItems { get; set; }
Property Value
Type | Description |
---|---|
DiagramSelectedItems |
SerializationSettings
Defines the serialization settings of diagram.
Declaration
public DiagramSerializationSettings SerializationSettings { get; set; }
Property Value
Type | Description |
---|---|
DiagramSerializationSettings |
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 |
Tool
Defines the precedence of the interactive tools. They are,.
Declaration
public DiagramTools Tool { get; set; }
Property Value
Type | Description |
---|---|
DiagramTools |
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 DiagramTooltip Tooltip { get; set; }
Property Value
Type | Description |
---|---|
DiagramTooltip |
Width
Defines the width of the diagram model.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
Methods
Add(Object, Nullable<Boolean>)
It is used to add the nodes/connector to the diagram dynamically.
Declaration
public Task<object> Add(object obj, Nullable<bool> group = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | DiagramNode / DiagramConnector to be add dynamically. |
System.Nullable<System.Boolean> | group | Specifies whether the dynamically added was group or not. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
Remarks
You can refer to the code snippets from diagram public methods.
AddBlazorObjects(String, Boolean)
Adds the object into the diagram.
Declaration
public void AddBlazorObjects(string DiagramObject, bool IsConnector)
Parameters
Type | Name | Description |
---|---|---|
System.String | DiagramObject | Specifies the diagram object. |
System.Boolean | IsConnector | Specifies whether the its connector or not. |
AddChildToGroup(DiagramNode, Object)
It is used to add the node/connector to the group dynamically.
Declaration
public Task AddChildToGroup(DiagramNode group, object child)
Parameters
Type | Name | Description |
---|---|---|
DiagramNode | group | The group to which the child has to be added. |
System.Object | child | The node/connector to be added to the group. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns the Diagram Node/ Diagram Connector. |
Remarks
For better understanding refer to the diagram public methods.
AddConnector(DiagramConnector)
Connectors can be added dynamically using the server-side method AddConnector.
Declaration
public Task<DiagramConnector> AddConnector(DiagramConnector obj)
Parameters
Type | Name | Description |
---|---|---|
DiagramConnector | obj | Connector to be added dynamically. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DiagramConnector> |
Remarks
For better understanding refer to the diagram public methods.
AddConnectorLabels(DiagramConnector, ObservableCollection<DiagramConnectorAnnotation>)
It adds the label to the connector during run time dynamically.
Declaration
public Task AddConnectorLabels(DiagramConnector obj, ObservableCollection<DiagramConnectorAnnotation> labels)
Parameters
Type | Name | Description |
---|---|---|
DiagramConnector | obj | The connector to which label should be added. |
System.Collections.ObjectModel.ObservableCollection<DiagramConnectorAnnotation> | labels | The label to be added in runtime. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddConstraints(Double, Double)
It adds constraints at run time.
Declaration
public Task<double> AddConstraints(double constraintsType, double constraintsValue)
Parameters
Type | Name | Description |
---|---|---|
System.Double | constraintsType | Defines the type of constraint. |
System.Double | constraintsValue | Sets the value for constraint. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
AddCustomHistoryEntry(HistoryEntry)
History entry can be added during runtime using AddCustomHistoryEntry.
Declaration
public Task AddCustomHistoryEntry(HistoryEntry entry)
Parameters
Type | Name | Description |
---|---|---|
HistoryEntry | entry | The history entry to be added during runtime. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
AddHistoryEntry(HistoryEntry)
Adds the given change in the diagram control to the track.
Declaration
public Task AddHistoryEntry(HistoryEntry entry)
Parameters
Type | Name | Description |
---|---|---|
HistoryEntry | entry | The history entry to be added during runtime. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
AddLabels(Object, ObservableCollection<Object>)
Adds labels (annotations) to the node at runtime.
Declaration
public Task AddLabels(object obj, ObservableCollection<object> labels)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The node to which the label should be added. |
System.Collections.ObjectModel.ObservableCollection<System.Object> | labels | The annotation to be added during runtime. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
AddLayer(DiagramLayer, Object)
It allows the user to add layers to the diagram at runtime.
Declaration
public Task AddLayer(DiagramLayer layer, object layerObject = null)
Parameters
Type | Name | Description |
---|---|---|
DiagramLayer | layer | The new layer to be added at runtime. |
System.Object | layerObject | The node/connector to be added. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
AddNode(DiagramNode, Nullable<Boolean>)
It adds the node to the diagram at runtime.
Declaration
public Task<DiagramNode> AddNode(DiagramNode obj, Nullable<bool> group = null)
Parameters
Type | Name | Description |
---|---|---|
DiagramNode | obj | The node to be added to the diagram. |
System.Nullable<System.Boolean> | group | The group to which the node should be added. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DiagramNode> |
Remarks
For better understanding refer to the diagram public methods.
AddNodeLabels(DiagramNode, ObservableCollection<DiagramNodeAnnotation>)
It adds labels to the nodes at runtime.
Declaration
public Task AddNodeLabels(DiagramNode obj, ObservableCollection<DiagramNodeAnnotation> labels)
Parameters
Type | Name | Description |
---|---|---|
DiagramNode | obj | The node to which label(annotation) should be added. |
System.Collections.ObjectModel.ObservableCollection<DiagramNodeAnnotation> | labels | The label to be added in the node at runtime. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddPorts(DiagramNode, ObservableCollection<DiagramPort>)
It is used to add the ports to the node dynamically.
Declaration
public Task AddPorts(DiagramNode obj, ObservableCollection<DiagramPort> ports)
Parameters
Type | Name | Description |
---|---|---|
DiagramNode | obj | DiagramNode that dynamically adds the port on. |
System.Collections.ObjectModel.ObservableCollection<DiagramPort> | ports | Ports that are dynamically added to the node. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
AddProcess(DiagramNode, String)
It is used to add a process shape into the BPMN subprocess shape.
Declaration
public Task AddProcess(DiagramNode process, string parentId)
Parameters
Type | Name | Description |
---|---|---|
DiagramNode | process | DiagramNode to be added dynamically. |
System.String | parentId | Specifies the node Id to add the subprocess. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTextAnnotation(DiagramBpmnAnnotation, DiagramNode)
It is used to add the text annotation to the specific BPMN node.
Declaration
public Task AddTextAnnotation(DiagramBpmnAnnotation annotation, DiagramNode node)
Parameters
Type | Name | Description |
---|---|---|
DiagramBpmnAnnotation | annotation | Defines the annotation to be added. |
DiagramNode | node | Defines the node to which the annotation has to be added. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Align(AlignmentOptions, Object, Nullable<AlignmentMode>)
Aligns the group of objects to with reference to the first object in the group.
Declaration
public Task Align(AlignmentOptions option, object objects = null, Nullable<AlignmentMode> type = null)
Parameters
Type | Name | Description |
---|---|---|
AlignmentOptions | option | Defines the factor, by which the objects have to be aligned. |
System.Object | objects | Defines the object which has to align. |
System.Nullable<AlignmentMode> | type | Defines the alignment mode of the object which has to align. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
BeginUpdate()
Prevents redrawing of model on the client side.
Declaration
public void BeginUpdate()
BringIntoView(Object)
It is used to show the particular bounds to the viewport.
Declaration
public Task BringIntoView(object bound)
Parameters
Type | Name | Description |
---|---|---|
System.Object | bound | Specifies the value of the bound which has to be shown in the viewport. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
BringLayerForward(String)
It is used to move the layer forward.
Declaration
public Task BringLayerForward(string layerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | layerName | Defines the name of the layer. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
BringToCenter(Object)
It is used to bring the specified bounds to the center of the viewport.
Declaration
public Task BringToCenter(object bound)
Parameters
Type | Name | Description |
---|---|---|
System.Object | bound | Specifies the bouns value which has to be shown in the viewport. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
BringToFront()
It is used to bring the selected node to the front.
Declaration
public Task BringToFront()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
Clear()
Clears all nodes and objects in the diagram.
Declaration
public Task Clear()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearHistory()
It is used to clear all nodes and objects from the diagram.
Declaration
public Task ClearHistory()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
ClearSelection()
It allows the user to clear the selected nodes/connectors in the diagram.
Declaration
public Task ClearSelection()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
CloneLayer(String)
It allows the user to clone the layer.
Declaration
public Task CloneLayer(string layerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | layerName | Specifies the layer name. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
Copy()
It copies the selected nodes/connectors to the clipboard.
Declaration
public Task<object> Copy()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
Remarks
For better understanding refer to the diagram public methods.
Cut()
It removes the selected nodes/connectors and moves those to the clipboard.
Declaration
public Task Cut()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
Dispose()
Declaration
public override void Dispose()
Overrides
Distribute(DistributeOptions, Object)
It arranges the group of nodes/connectors with equal intervals but within the group of nodes/connectors.
Declaration
public Task Distribute(DistributeOptions option, object objects = null)
Parameters
Type | Name | Description |
---|---|---|
DistributeOptions | option | The type of distributing option. |
System.Object | objects | The collection of nodes/connectors. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
DoLayout()
It allows the user to refresh the layout at runtime.
Declaration
public Task<object> DoLayout()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
Remarks
For better understanding refer to the diagram public methods.
Drag(Object, Double, Double)
It drags the given object by the specified pixels.
Declaration
public Task Drag(object obj, double tx, double ty)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The collection of nodes/connectors to be dragged. |
System.Double | tx | X-coordinate of the node/connector to be captured. |
System.Double | ty | Y-coordinate of the node/connector to be captured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
DragSourceEnd(DiagramConnector, Double, Double)
It drags the source point of the connector.
Declaration
public Task DragSourceEnd(DiagramConnector obj, double tx, double ty)
Parameters
Type | Name | Description |
---|---|---|
DiagramConnector | obj | The connector to be dragged. |
System.Double | tx | X-coordinate of the node/connector to be captured. |
System.Double | ty | Y-coordinate of the node/connector to be captured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
DragTargetEnd(DiagramConnector, Double, Double)
It drags the target point of the connector.
Declaration
public Task DragTargetEnd(DiagramConnector obj, double tx, double ty)
Parameters
Type | Name | Description |
---|---|---|
DiagramConnector | obj | The connector to be dragged. |
System.Double | tx | X-coordinate of the node/connector to be captured. |
System.Double | ty | Y-coordinate of the node/connector to be captured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
EndGroupAction()
Closes grouping the actions that will be undone/restored as a whole.
Declaration
public Task EndGroupAction()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
EndUpdate()
Enable redrawing of model on the client side.
Declaration
public void EndUpdate()
ExportDiagram(IExportOptions)
It is used to export the diagram.
Declaration
public Task<string> ExportDiagram(IExportOptions options)
Parameters
Type | Name | Description |
---|---|---|
IExportOptions | options | defines how the image should be export. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
Remarks
For better understanding refer to the diagram public methods.
ExportImage(String, IExportOptions)
It is used to export the diagram to various image format.
Declaration
public Task ExportImage(string image, IExportOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | image | Defines the type of image content to be exported. |
IExportOptions | options | Defines the export image properties. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
FitToPage(IFitOptions)
It is used to fit the diagram to the page with respect to mode and region.
Declaration
public Task FitToPage(IFitOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IFitOptions | options | Defines the fit options properties. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
GetActiveLayer()
It is used to get the active layer back.
Declaration
public Task<DiagramLayer> GetActiveLayer()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DiagramLayer> |
Remarks
For better understanding refer to the diagram public methods.
GetConnector(String)
It is used to get the connector back.
Declaration
public DiagramConnector GetConnector(string Id)
Parameters
Type | Name | Description |
---|---|---|
System.String | Id | Specifies the id of the connector which has taken from the diagram. |
Returns
Type | Description |
---|---|
DiagramConnector |
GetConnectorObject(String)
It is used to get the connector object for the given node Id.
Declaration
public Task<DiagramConnector> GetConnectorObject(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Specifies the id of the connector which has taken from the diagram. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DiagramConnector> |
GetCursor(String, Boolean)
It is used to define the cursor that corresponds to the given action.
Declaration
public Task<string> GetCursor(string action, bool active)
Parameters
Type | Name | Description |
---|---|---|
System.String | action | Defines the action that is going to be performed. |
System.Boolean | active | Specifies whether the cursor has to be activated or not. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
GetDiagramBounds()
It allows the user to capture the diagram bounds.
Declaration
public Task<object> GetDiagramBounds()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
Remarks
For better understanding refer to the diagram public methods.
GetDiagramContent(Object)
It allows the user to get the HTML content.
Declaration
public Task<string> GetDiagramContent(object styleSheets = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | styleSheets | Defines the collection of style files to be considered while exporting. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Returns the HTML content. |
GetEdges(String, Boolean)
Return the edges for the given node.
Declaration
public Task<string[]> GetEdges(string id, bool outEdge)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Specifies the Id of the node. |
System.Boolean | outEdge | Specifies whether it has a outedge or not. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String[]> |
GetHistoryStack(Boolean)
The number of undo or redo actions can be stored on the history list.
Declaration
public Task<List<HistoryEntry>> GetHistoryStack(bool isUndoStack)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isUndoStack | Returns the history stack values. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<HistoryEntry>> |
Remarks
For better understanding refer to the diagram public methods.
GetJSNamespace()
Declaration
public string GetJSNamespace()
Returns
Type | Description |
---|---|
System.String | Get the parent namespaces. |
GetModuleName()
It returns the module name of the diagram.
Declaration
public Task<string> GetModuleName()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
GetNode(String)
The node can be captured from its id itself.
Declaration
public DiagramNode GetNode(string Id)
Parameters
Type | Name | Description |
---|---|---|
System.String | Id | Returns the id of the node to be captured. |
Returns
Type | Description |
---|---|
DiagramNode |
Remarks
For better understanding refer to the diagram public methods.
GetNodeObject(String)
The node can be captured from its id itself.
Declaration
public Task<DiagramNode> GetNodeObject(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Returns the id of the node to be captured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DiagramNode> |
Remarks
For better understanding refer to the diagram public methods.
GetParentId(String)
Returns the parent id for the node.
Declaration
public Task<string> GetParentId(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Specifies the Id of the node. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
GetPersistData()
Get the properties to be maintained in the persisted state.
Declaration
public Task<string> GetPersistData()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
Group()
Group the selected nodes and connectors in diagram.
Declaration
public Task Group()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
HideTooltip(Object)
It is used to hide the tooltip for the corresponding diagram object.
Declaration
public Task HideTooltip(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Defines the object, which tooltip has to be hidden. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
LoadDiagram(String)
Converts the given string as a Diagram Control.
Declaration
public void LoadDiagram(string data)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | Defines the behavior of the diagram to be loaded. |
MoveForward()
It is used to send the selected nodes or connectors to forward.
Declaration
public Task MoveForward()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
MoveObjects(List<String>, String)
It is used to move the objects from one layer to another layer in the diagram.
Declaration
public Task MoveObjects(List<string> objects, string targetLayer = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.String> | objects | Defines the object id of the string array. |
System.String | targetLayer | Specifies the target layer to which the object has to be moved. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
Nudge(NudgeDirection, Nullable<Double>, Nullable<Double>)
It is used to move the selected objects towards the given direction.
Declaration
public Task Nudge(NudgeDirection direction, Nullable<double> x = null, Nullable<double> y = null)
Parameters
Type | Name | Description |
---|---|---|
NudgeDirection | direction | Defines the object id of the string array. |
System.Nullable<System.Double> | x | Defines the distance by which the selected objects have to be moved horizontally. |
System.Nullable<System.Double> | y | Defines the distance by which the selected objects have to be moved vertically. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation which is executed when the rendering of all the references to the component are populated. |
Overrides
OnHybridAfterRender(Boolean)
Declaration
protected Task OnHybridAfterRender(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation which is executed when the rendering of all the references to the component are populated. |
OnHybridInitialized()
Declaration
protected Task OnHybridInitialized()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
OnHybridParametersSet()
Declaration
protected Task OnHybridParametersSet()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties. |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation when the component is ready to start, having received its initial parameters from its parent in the render tree. |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties. |
Pan(Double, Double, PointModel)
It is used to pan the diagram control to the horizontal and vertical offsets.
Declaration
public Task Pan(double horizontalOffset, double verticalOffset, PointModel focusedPoint = null)
Parameters
Type | Name | Description |
---|---|---|
System.Double | horizontalOffset | Defines the horizontal distance to which the diagram has to be scrolled. |
System.Double | verticalOffset | Defines the vertical distance to which the diagram has to be scrolled. |
PointModel | focusedPoint | Defines the point at which the diagram to be focused. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
Paste(Object)
Adds the given objects/ the objects in the diagram clipboard to diagram control.
Declaration
public Task<object> Paste(object obj = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Defines the objects to be added to diagram. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
Print(IPrintOptions)
It is used to print the diagram.
Declaration
public Task Print(IPrintOptions options)
Parameters
Type | Name | Description |
---|---|---|
IPrintOptions | options | Defines how the image to be printed. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
PrintImage(String, IExportOptions)
It is used to print the native/html nodes of the diagram.
Declaration
public Task PrintImage(string image, IExportOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | image | Defines the image content. |
IExportOptions | options | Defines the properties of the image. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RandomString(Int32)
Generate random string for setting name for nodes/connectors.
Declaration
public static string RandomString(int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | length | Sets a length of the string. |
Returns
Type | Description |
---|---|
System.String | returns a random string. |
Redo()
It is used to restore the last undo action.
Declaration
public Task Redo()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
Remove(Object)
It is used to remove the given object from the diagram.
Declaration
public Task Remove(object obj = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Specifies the object in the diagram. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RemoveConstraints(Double, Double)
Remove constraints at run time.
Declaration
public Task<double> RemoveConstraints(double constraintsType, double constraintsValue)
Parameters
Type | Name | Description |
---|---|---|
System.Double | constraintsType | Specifies the type of constraints. |
System.Double | constraintsValue | Specifies the constraints which have to be removed. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
RemoveLabels(Object, ObservableCollection<Object>)
Remove Labels at the run time.
Declaration
public Task RemoveLabels(object obj, ObservableCollection<object> labels)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The node to which the label should be removed. |
System.Collections.ObjectModel.ObservableCollection<System.Object> | labels | The annotation to be removed during runtime. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RemoveLayer(String)
Remove the layer from the diagram.
Declaration
public Task RemoveLayer(string layerId)
Parameters
Type | Name | Description |
---|---|---|
System.String | layerId | Specifies the unique Id for the layer. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
RemovePorts(DiagramNode, ObservableCollection<DiagramPort>)
Remove Ports at the run time.
Declaration
public Task RemovePorts(DiagramNode obj, ObservableCollection<DiagramPort> ports)
Parameters
Type | Name | Description |
---|---|---|
DiagramNode | obj | Specifies the ports to be removed at runtime. |
System.Collections.ObjectModel.ObservableCollection<DiagramPort> | ports | Specifies the ports. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
RemoveProcess(String)
Remove a process from the sub-process.
Declaration
public Task RemoveProcess(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Specifies the Id of the subprocess. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Render()
Renders the diagram control with nodes and connectors.
Declaration
public Task Render()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Reset()
Resets the zoom and scroller offsets to default values.
Declaration
public Task Reset()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
ResetSegments()
Resets the segments of the connectors.
Declaration
public Task ResetSegments()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
Rotate(Object, Double, PointModel)
Rotates the given nodes/connectors by the given angle.
Declaration
public Task<bool> Rotate(object obj, double angle, PointModel pivot = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Specifies the nodes/connector to be rotated. |
System.Double | angle | Specifies the angle to be rotated. |
PointModel | pivot | Specifies the point of rotation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
Remarks
For better understanding refer to the diagram public methods.
SameSize(SizingOptions, Object)
Scales the given objects to the size of the first object in the group.
Declaration
public Task SameSize(SizingOptions option, object objects = null)
Parameters
Type | Name | Description |
---|---|---|
SizingOptions | option | Specifies the sizing options of the selected items. |
System.Object | objects | Specifies the selected items. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
SaveDiagram()
Serializes the diagram control as a string.
Declaration
public Task<string> SaveDiagram()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
Remarks
For better understanding refer to the diagram public methods.
Scale(Object, Double, Double, PointModel)
Scales the given objects by the given ratio.
Declaration
public Task<bool> Scale(object obj, double sx, double sy, PointModel pivot)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to which the scaling should beapplied. |
System.Double | sx | Specifies the value of X. |
System.Double | sy | Specifies the value of Y. |
PointModel | pivot | Specifies the point where the object to be placed. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
Remarks
For better understanding refer to the diagram public methods.
Select(Object, Nullable<Boolean>)
Selects the given collection of objects.
Declaration
public Task Select(object objects, Nullable<bool> multipleSelection = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | objects | Specifies the selected nodes/connectors. |
System.Nullable<System.Boolean> | multipleSelection | specifies the selection of one or more nodes/connectors. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
SelectAll()
Selects the all the objects.
Declaration
public Task SelectAll()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
SendBackward()
send the selected nodes or connectors back.
Declaration
public Task SendBackward()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
SendLayerBackward(String)
move the layer backward.
Declaration
public Task SendLayerBackward(string layerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | layerName | Represents the layer name which is to be moved backward. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
SendToBack()
send the selected nodes or connectors back.
Declaration
public Task SendToBack()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
SetActiveLayer(String)
set the active layer.
Declaration
public Task SetActiveLayer(string layerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | layerName | defines the name of the layer which is to be active layer. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
SetStackLimit(Double)
To limit the history entry of the diagram.
Declaration
public Task SetStackLimit(double stackLimit)
Parameters
Type | Name | Description |
---|---|---|
System.Double | stackLimit | Specifies the restriction of undo and redo action to a certain limit. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
ShowTooltip(Object)
Shows tooltip for corresponding diagram object.
Declaration
public Task ShowTooltip(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Specifies the object to show tooltip. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
StartGroupAction()
Starts grouping the actions that will be undone/restored as a whole.
Declaration
public Task StartGroupAction()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
StartTextEdit(Object, String)
Edits the annotation of node/connector.
Declaration
public Task StartTextEdit(object node = null, string id = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | node | The node in which annotation should be edited. |
System.String | id | The id of the annotation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Undo()
Restores the last action that is performed.
Declaration
public Task Undo()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
UnGroup()
UnGroup the selected nodes and connectors in diagram.
Declaration
public Task UnGroup()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
UnSelect(Object)
Removes the given object from selection list.
Declaration
public Task UnSelect(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to be removed. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
UpdateBlazorDiagramCollectionModel(String, String[], Int32[], String, Int32[], Int32[])
Synchronousing the properties from client.
Declaration
public void UpdateBlazorDiagramCollectionModel(string DiagramObject, string[] ObjectType = null, int[] RemovalIndex = null, string connectorObject = null, int[] AnnotationIndex = null, int[] PortIndex = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | DiagramObject | Specifies the Diagram object. |
System.String[] | ObjectType | Specifies the object type. |
System.Int32[] | RemovalIndex | Specifies the removal index. |
System.String | connectorObject | Specifies the connector object. |
System.Int32[] | AnnotationIndex | Specifies the annotation index. |
System.Int32[] | PortIndex | Specifies the port index. |
UpdateBlazorDiagramEvents(Dictionary<String, String>)
Declaration
public Task<object> UpdateBlazorDiagramEvents(Dictionary<string, string> DiagramObject)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | DiagramObject |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
UpdateBlazorDiagramModel(String, String, Int32, Int32, Int32)
It is used to synchronising client changes into the server changes.
Declaration
public void UpdateBlazorDiagramModel(string DiagramObject, string ObjectType, int RemovalIndex, int annotationIndex, int portIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | DiagramObject | Specifies the Diagram object. |
System.String | ObjectType | Specifies the object type. |
System.Int32 | RemovalIndex | Specifies the removal index. |
System.Int32 | annotationIndex | Specifies the annotation index. |
System.Int32 | portIndex | Specifies the port index. |
UpdateBlazorDiagramModelLayers(String, Boolean)
Update layers collection changes from client to server.
Declaration
public void UpdateBlazorDiagramModelLayers(string DiagramObject, bool isRemove)
Parameters
Type | Name | Description |
---|---|---|
System.String | DiagramObject | Specifies the Diagram object. |
System.Boolean | isRemove | Specifies whether it should be removed. |
UpdateBlazorDiagramObjects(Dictionary<String, Object>)
Update objects collection changes from client to server.
Declaration
public Task UpdateBlazorDiagramObjects(Dictionary<string, object> DiagramObject)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | DiagramObject | Specifies the objects in the diagram. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
UpdateBlazorProperties(Dictionary<String, Object>)
Update property changes from client to server.
Declaration
public Task UpdateBlazorProperties(Dictionary<string, object> properties)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | properties | Specifies the property changes. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
updateChildProperties(String, Object)
Declaration
public void updateChildProperties(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Object | value |
UpdateDiagramObjects(Boolean, Object[])
Adds the given object to diagram control.
Declaration
public Task<object> UpdateDiagramObjects(bool IsAdding, params object[] methodParam)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | IsAdding | Specifies whether its adding or not. |
System.Object[] | methodParam | Specifies the object to be updated. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
UpdateViewPort()
Update the diagram clipboard dimension.
Declaration
public Task UpdateViewPort()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
WireObservableEvents(Object)
Declaration
protected override void WireObservableEvents(object collection)
Parameters
Type | Name | Description |
---|---|---|
System.Object | collection |
Overrides
Zoom(Double, PointModel)
Allows the user to zoom in or zoom out.
Declaration
public Task Zoom(double factor, PointModel focusedPoint = null)
Parameters
Type | Name | Description |
---|---|---|
System.Double | factor | Defines the factor by which the diagram is to be zoomed. |
PointModel | focusedPoint | Defines the point with respect to which diagram has to be zoomed. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
ZoomTo(ZoomOptions)
Zooms to the specific point.
Declaration
public Task ZoomTo(ZoomOptions options)
Parameters
Type | Name | Description |
---|---|---|
ZoomOptions | options | The options for zoom point. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
For better understanding refer to the diagram public methods.
Explicit Interface Implementations
IDiagram.DiagramTemplates
Declaration
DiagramTemplates IDiagram.DiagramTemplates { get; set; }
Returns
Type | Description |
---|---|
DiagramTemplates |