BPMN Group in Blazor Diagram Component
7 Jul 20221 minute to read
A group is used to frame a part of the diagram, shows that elements included in it logically belong together and do not have any other semantics other than organizing elements. To create a group, the shape property of the node should be set to Group. The following code example explains how to create a BPMN group.
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
<SfDiagramComponent Height="600px" Nodes="@nodes" />
@code
{
// Initialize node collection with Node.
DiagramObjectCollection<Node> nodes;
protected override void OnInitialized()
{
nodes = new DiagramObjectCollection<Node>();
Node node = new Node()
{
// Position of the node.
OffsetX = 100,
OffsetY = 100,
// Size of the node.
Width = 100,
Height = 100,
// Unique Id of the node.
ID = "node1",
// Sets type to Bpmn and shape to Group.
Shape = new BpmnShape()
{
Type = NodeShapes.Bpmn,
Shape = BpmnShapes.Group,
}
};
nodes.Add(node);
}
}