diff --git a/blazor/diagram/annotations/appearance.md b/blazor/diagram/annotations/appearance.md
index 24f1c833d6..ebb9132169 100644
--- a/blazor/diagram/annotations/appearance.md
+++ b/blazor/diagram/annotations/appearance.md
@@ -15,11 +15,13 @@ The annotation size can be customized using the [Height](https://help.syncfusion
```cshtml
@using Syncfusion.Blazor.Diagram
+
+
@code
{
// Defines diagram's connector collection.
- DiagramObjectCollection connectors;
+ private DiagramObjectCollection connectors;
protected override void OnInitialized()
{
connectors = new DiagramObjectCollection();
@@ -31,13 +33,13 @@ The annotation size can be customized using the [Height](https://help.syncfusion
Style = new TextStyle() { StrokeColor = "#6495ED" },
Annotations = new DiagramObjectCollection()
{
- new PathAnnotation
- {
- Content = "Annotation length will be varied",
- // Sets the size of the annotation.
- Width = 50,
- Height = 50
- },
+ new PathAnnotation
+ {
+ Content = "Annotation length will be varied",
+ // Sets the size of the annotation.
+ Width = 50,
+ Height = 50
+ },
}
};
connectors.Add(connector);
@@ -62,7 +64,7 @@ A [Hyperlink](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.An
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -78,12 +80,12 @@ A [Hyperlink](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.An
Annotations = new DiagramObjectCollection()
{
// Add text as hyperlink.
- new ShapeAnnotation
- {
+ new ShapeAnnotation
+ {
Hyperlink = new HyperlinkSettings
- {
+ {
Url = "https://www.syncfusion.com"
- }
+ }
}
},
Style = new ShapeStyle() { Fill = "#6495ED", StrokeColor = "white" },
@@ -110,7 +112,7 @@ The [Content](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.An
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -126,13 +128,13 @@ The [Content](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.An
Annotations = new DiagramObjectCollection()
{
// Add text as hyperlink.
- new ShapeAnnotation
- {
+ new ShapeAnnotation
+ {
Hyperlink = new HyperlinkSettings
- {
- Content = "Syncfusion",
- Url = "https://www.syncfusion.com"
- }
+ {
+ Content = "Syncfusion",
+ Url = "https://www.syncfusion.com"
+ }
}
},
Style = new ShapeStyle() { Fill = "#6495ED", StrokeColor = "white" },
@@ -159,7 +161,7 @@ The [TextWrapping](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagr
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -174,14 +176,14 @@ The [TextWrapping](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagr
// Sets the annotation for the node.
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
+ new ShapeAnnotation
{
Content = "Annotation Text Wrapping",
Style = new TextStyle()
- {
+ {
// Sets the text wrapping of the annotation as Wrap.
TextWrapping = TextWrap.Wrap
- }
+ }
}
},
Style = new ShapeStyle() { Fill = "#6495ED", StrokeColor = "white" },
@@ -218,7 +220,7 @@ The following code sample demonstrates how the `TextOverflow` property works wit
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -237,10 +239,10 @@ The following code sample demonstrates how the `TextOverflow` property works wit
{
Content = "The text element with property of overflow as Wrap and wrapping as NoWrap",
Style = new TextStyle()
- {
+ {
// Sets the text overflow of the annotation as Wrap.
TextOverflow = TextOverflow.Wrap,
- TextWrapping = TextWrap.NoWrap
+ TextWrapping = TextWrap.NoWrap
}
},
},
@@ -290,7 +292,7 @@ The following code explains how to customize the visual appearance of an annotat
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -305,10 +307,10 @@ The following code explains how to customize the visual appearance of an annotat
// Sets the annotation for the node.
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
+ new ShapeAnnotation
{
Content = "Annotation Text",
- Style = new TextStyle()
+ Style = new TextStyle()
{
// Sets the style for the annotation.
Color="black",
@@ -316,8 +318,8 @@ The following code explains how to customize the visual appearance of an annotat
Italic = true,
TextDecoration = TextDecoration.Underline,
FontSize = 12,
- FontFamily = "TimesNewRoman"
- }
+ FontFamily = "TimesNewRoman"
+ }
}
},
Style = new ShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" },
@@ -340,18 +342,15 @@ The font style of annotations can be changed dynamically at runtime by modifying
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
-
@code
{
// Reference of the diagram.
- SfDiagramComponent Diagram;
-
+ private SfDiagramComponent Diagram;
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -369,13 +368,13 @@ The font style of annotations can be changed dynamically at runtime by modifying
new ShapeAnnotation
{
Content = "Annotation Text",
- Style = new TextStyle()
+ Style = new TextStyle()
{
Color = "black",
Bold = true,
Italic = true,
TextDecoration = TextDecoration.Underline,
- FontSize = 12,
+ FontSize = 12,
FontFamily = "TimesNewRoman"
}
}
@@ -385,7 +384,7 @@ The font style of annotations can be changed dynamically at runtime by modifying
nodes.Add(node);
}
- public void UpdateStyle()
+ private void UpdateStyle()
{
// Change the style of the annotation.
Diagram.BeginUpdate();
@@ -423,7 +422,7 @@ Annotations can be set to read-only mode by configuring their [Constraints](http
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -437,10 +436,10 @@ Annotations can be set to read-only mode by configuring their [Constraints](http
OffsetY = 100,
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
+ new ShapeAnnotation
{
Content = "Annotation Text",
- // Sets the constraints as Read only.
+ // Sets the constraints as Read only.
Constraints = AnnotationConstraints.ReadOnly
}
},
@@ -466,10 +465,9 @@ Multiple annotations can be added to a single node or connector. The following c
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
-
+ private DiagramObjectCollection nodes;
// Defines diagram's connector collection.
- DiagramObjectCollection connectors;
+ private DiagramObjectCollection connectors;
protected override void OnInitialized()
{
@@ -485,17 +483,17 @@ Multiple annotations can be added to a single node or connector. The following c
// Sets the multiple annotation for the node.
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
+ new ShapeAnnotation
{
Content = "Left",
Offset = new DiagramPoint(){ X = .12,Y = .1}
},
- new ShapeAnnotation
+ new ShapeAnnotation
{
Content = "Center",
Offset = new DiagramPoint(){ X = .5,Y = .5}
},
- new ShapeAnnotation
+ new ShapeAnnotation
{
Content = "Right",
Offset = new DiagramPoint(){ X = .82,Y = .9}
@@ -512,20 +510,20 @@ Multiple annotations can be added to a single node or connector. The following c
Style = new TextStyle() { StrokeColor = "#6495ED" },
Annotations = new DiagramObjectCollection()
{
- new PathAnnotation
- {
+ new PathAnnotation
+ {
Content = "Offset as 0",
- Offset = 0
+ Offset = 0
},
- new PathAnnotation
- {
+ new PathAnnotation
+ {
Content = "Offset as 0.5",
Offset = 0.5
},
- new PathAnnotation
+ new PathAnnotation
{
Content = "Offset as 1",
- Offset = 1
+ Offset = 1
},
}
};
@@ -581,7 +579,8 @@ The following code illustrates how to define a template for both a node's and a
Nicolas
@@ -594,7 +593,8 @@ The following code illustrates how to define a template for both a node's and a
Nicolas
@@ -606,8 +606,8 @@ The following code illustrates how to define a template for both a node's and a
@code
{
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection connectors = new DiagramObjectCollection();
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -621,18 +621,16 @@ The following code illustrates how to define a template for both a node's and a
Style = new ShapeStyle() { Fill = "#6BA5D7", StrokeColor = "black", Opacity = 1 },
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation()
- {
- ID = "NodeAnnotation1",
- UseTemplate = true,
- Height = 75,
- Width = 75,
-
- },
+ new ShapeAnnotation()
+ {
+ ID = "NodeAnnotation1",
+ UseTemplate = true,
+ Height = 75,
+ Width = 75,
+ },
},
};
nodes.Add(node);
-
Connector connector = new Connector()
{
ID = "connector1",
@@ -641,17 +639,16 @@ The following code illustrates how to define a template for both a node's and a
Type = ConnectorSegmentType.Orthogonal,
Annotations = new DiagramObjectCollection()
{
- new PathAnnotation()
- {
- ID = "ConnectorAnnotation1",
- UseTemplate = true,
- Height = 50,
- Width = 75,
- Alignment = AnnotationAlignment.Before,
- Offset = 0.3,
- Displacement = new DiagramPoint(){X = 0, Y = -0.5}
-
- },
+ new PathAnnotation()
+ {
+ ID = "ConnectorAnnotation1",
+ UseTemplate = true,
+ Height = 50,
+ Width = 75,
+ Alignment = AnnotationAlignment.Before,
+ Offset = 0.3,
+ Displacement = new DiagramPoint(){X = 0, Y = -0.5}
+ },
},
};
connectors.Add(connector);
@@ -671,10 +668,13 @@ The following code demonstrates how to set a value for the `AdditionalInfo` prop
```cshtml
@using Syncfusion.Blazor.Diagram
+
+
@code
{
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
+
protected override void OnInitialized()
{
nodes = new DiagramObjectCollection();
diff --git a/blazor/diagram/annotations/connector-annotation.md b/blazor/diagram/annotations/connector-annotation.md
index a974684ff0..1c121e3fea 100644
--- a/blazor/diagram/annotations/connector-annotation.md
+++ b/blazor/diagram/annotations/connector-annotation.md
@@ -31,7 +31,7 @@ The [Offset](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Pat
@code
{
//Defines diagram's connector collection.
- DiagramObjectCollection connectors;
+ private DiagramObjectCollection connectors;
protected override void OnInitialized()
{
@@ -44,23 +44,23 @@ The [Offset](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Pat
Style = new TextStyle() { StrokeColor = "#6495ED" },
Annotations = new DiagramObjectCollection()
{
- new PathAnnotation
- {
+ new PathAnnotation
+ {
Content = "Offset as 0",
// Sets the offset of the annotation as 0.
- Offset = 0
+ Offset = 0
},
- new PathAnnotation
- {
+ new PathAnnotation
+ {
Content = "Offset as 0.5",
// Sets the offset of the annotation as 0.5.
- Offset = 0.5
+ Offset = 0.5
},
- new PathAnnotation
- {
+ new PathAnnotation
+ {
Content = "Offset as 1",
// Sets the offset of the annotation as 1.
- Offset = 1
+ Offset = 1
},
}
};
@@ -92,7 +92,7 @@ The [Alignment](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.
@code
{
//Defines diagram's connector collection.
- DiagramObjectCollection connectors;
+ private DiagramObjectCollection connectors;
protected override void OnInitialized()
{
@@ -105,17 +105,17 @@ The [Alignment](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.
Style = new TextStyle() { StrokeColor = "#6495ED" },
Annotations = new DiagramObjectCollection()
{
- new PathAnnotation
- {
+ new PathAnnotation
+ {
Content = "Before",
// Sets the alignment of the annotation as Before.
- Alignment = AnnotationAlignment.Before
+ Alignment = AnnotationAlignment.Before
},
- new PathAnnotation
- {
+ new PathAnnotation
+ {
Content = "After",
// Sets the alignment of the annotation as After.
- Alignment = AnnotationAlignment.After
+ Alignment = AnnotationAlignment.After
},
}
};
@@ -140,13 +140,12 @@ The [Displacement](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagr
```cshtml
@using Syncfusion.Blazor.Diagram
-
-
+
@code
{
//Defines diagram's connector collection.
- public DiagramObjectCollection connectors { get; set; }
+ private DiagramObjectCollection connectors { get; set; }
protected override void OnInitialized()
{
@@ -193,7 +192,7 @@ The following code example shows how the connector annotation rotated in its pat
@code
{
// Defines diagram's connector collection.
- DiagramObjectCollection connectors;
+ private DiagramObjectCollection connectors;
protected override void OnInitialized()
{
@@ -206,12 +205,12 @@ The following code example shows how the connector annotation rotated in its pat
Style = new TextStyle() { StrokeColor = "#6495ED" },
Annotations = new DiagramObjectCollection()
{
- new PathAnnotation
- {
- Content = "Annotation",
+ new PathAnnotation
+ {
+ Content = "Annotation",
// Set the segment angle for the connector's annotation.
SegmentAngle = true,
- Offset = 0.7
+ Offset = 0.7
},
}
};
diff --git a/blazor/diagram/annotations/events.md b/blazor/diagram/annotations/events.md
index a4a6bd9347..b9f329401f 100644
--- a/blazor/diagram/annotations/events.md
+++ b/blazor/diagram/annotations/events.md
@@ -29,12 +29,14 @@ The following code example shows how to register and get notifications from the
@code
{
// Defines diagram's nodes collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
+
// Triggered when the node and connector's labels change in the diagram.
- private void OnLabelTextChanging(TextChangeEventArgs args)
- {
- args.Cancel = true;
- }
+ private void OnLabelTextChanging(TextChangeEventArgs args)
+ {
+ args.Cancel = true;
+ }
+
// Triggered this event when complete the editing for Annotation and update the old text and new text values.
private void OnTextChanged(TextChangeEventArgs args)
{
diff --git a/blazor/diagram/annotations/interactions.md b/blazor/diagram/annotations/interactions.md
index 819909b43a..a77978021f 100644
--- a/blazor/diagram/annotations/interactions.md
+++ b/blazor/diagram/annotations/interactions.md
@@ -23,7 +23,7 @@ The [RotationReference](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -37,15 +37,14 @@ The [RotationReference](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.
OffsetY = 100,
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
- {
+ new ShapeAnnotation
+ {
Content = "Node1",
RotationReference = AnnotationRotationReference.Parent,
}
},
-
};
- Node node2 = new Node()
+ Node node2 = new Node()
{
ID = "node2",
Width = 100,
@@ -54,13 +53,12 @@ The [RotationReference](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.
OffsetY = 100,
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
- {
+ new ShapeAnnotation
+ {
Content = "Node2",
RotationReference = AnnotationRotationReference.Page,
}
},
-
};
nodes.Add(node1);
nodes.Add(node2);
@@ -85,10 +83,13 @@ The following code examples illustrate how to configure `RotationAngle` for an a
```cshtml
@using Syncfusion.Blazor.Diagram
+
+
@code
{
- DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+
protected override void OnInitialized()
{
Node node = new Node()
@@ -98,15 +99,15 @@ The following code examples illustrate how to configure `RotationAngle` for an a
Width = 100,
OffsetX = 100,
OffsetY = 100,
- Annotations = new DiagramObjectCollection()
- {
- new ShapeAnnotation
- {
- Content = "Node",
- ID = "Annotation",
- RotationAngle = 30,
- }
- },
+ Annotations = new DiagramObjectCollection()
+ {
+ new ShapeAnnotation
+ {
+ Content = "Node",
+ ID = "Annotation",
+ RotationAngle = 30,
+ }
+ },
};
nodes.Add(node);
}
diff --git a/blazor/diagram/annotations/labels.md b/blazor/diagram/annotations/labels.md
index bea1f635a3..724b014fe4 100644
--- a/blazor/diagram/annotations/labels.md
+++ b/blazor/diagram/annotations/labels.md
@@ -30,10 +30,9 @@ The following code example demonstrates how to create an annotation for a node a
@code
{
// Defines diagram's connector collection.
- DiagramObjectCollection connectors;
-
+ private DiagramObjectCollection connectors;
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -91,16 +90,14 @@ The following code explains how to add an annotation to a node at runtime by usi
@using Syncfusion.Blazor.Buttons
-
-
+
@code
{
// Reference to diagram.
- SfDiagramComponent diagram;
-
+ private SfDiagramComponent diagram;
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -117,7 +114,7 @@ The following code explains how to add an annotation to a node at runtime by usi
}
// Method to add annotation at runtime.
- public void AddLabel()
+ private void AddLabel()
{
ShapeAnnotation annotation = new ShapeAnnotation { Content = "Annotation" };
(diagram.Nodes[0].Annotations as DiagramObjectCollection).Add(annotation);
@@ -134,7 +131,7 @@ The following code explains how to add an annotation to a node at runtime by usi
```csharp
//Method to add annotation at runtime.
-public async void AddLabel()
+private async void AddLabel()
{
ShapeAnnotation annotation = new ShapeAnnotation { Content = "Annotation" };
await(diagram.Nodes[0].Annotations as DiagramObjectCollection).AddAsync(annotation);
@@ -152,18 +149,15 @@ An annotation can be removed from a node or connector's `Annotations` collection
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
-
@code
{
// Reference to diagram.
- SfDiagramComponent diagram;
-
+ private SfDiagramComponent diagram;
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -184,7 +178,7 @@ An annotation can be removed from a node or connector's `Annotations` collection
}
// Method to remove annotation at runtime.
- public void RemoveLabel()
+ private void RemoveLabel()
{
(diagram.Nodes[0].Annotations as DiagramObjectCollection).RemoveAt(0);
}
@@ -198,7 +192,7 @@ Also, The `Remove` method can also be used to remove a specific annotation objec
```cshtml
// Method to remove annotation at runtime using Remove method.
- public void RemoveLabel()
+ private void RemoveLabel()
{
ShapeAnnotation annotation = (diagram.Nodes[0].Annotations[0]) as ShapeAnnotation;
(diagram.Nodes[0].Annotations as DiagramObjectCollection).Remove(annotation);
@@ -218,18 +212,15 @@ The following code sample shows how to change the content of a node's annotation
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
-
@code
{
// Reference to diagram.
- SfDiagramComponent diagram;
-
+ private SfDiagramComponent diagram;
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -239,9 +230,9 @@ The following code sample shows how to change the content of a node's annotation
Width = 100,
Height = 100,
OffsetX = 100,
- Annotations = new DiagramObjectCollection()
- {
- new ShapeAnnotation { Content = "Node" }
+ Annotations = new DiagramObjectCollection()
+ {
+ new ShapeAnnotation { Content = "Node" }
},
OffsetY = 100,
Style = new ShapeStyle() { Fill = "#6495ED", StrokeColor = "white" },
@@ -250,7 +241,7 @@ The following code sample shows how to change the content of a node's annotation
}
// Method to update the annotation at runtime.
- public void UpdateLabel()
+ private void UpdateLabel()
{
diagram.Nodes[0].Annotations[0].Content = "Updated Annotation";
}
diff --git a/blazor/diagram/annotations/node-annotation.md b/blazor/diagram/annotations/node-annotation.md
index 711045f60f..b2c998c98a 100644
--- a/blazor/diagram/annotations/node-annotation.md
+++ b/blazor/diagram/annotations/node-annotation.md
@@ -32,7 +32,7 @@ The following code demonstrates how to set an annotation's `Offset`.
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -44,11 +44,11 @@ The following code demonstrates how to set an annotation's `Offset`.
OffsetX = 100,
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
- {
- Content = "Offset(0,0)",
+ new ShapeAnnotation
+ {
+ Content = "Offset(0,0)",
// Sets the offset for an annotation's content.
- Offset = new DiagramPoint() { X = 0, Y = 0 }
+ Offset = new DiagramPoint() { X = 0, Y = 0 }
}
},
OffsetY = 100,
@@ -109,7 +109,7 @@ The following code demonstrates how to align an annotation.
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -123,8 +123,8 @@ The following code demonstrates how to align an annotation.
OffsetY = 250,
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
- {
+ new ShapeAnnotation
+ {
Content = "Annotation",
// Sets the HorizontalAlignment and VerticalAlignment for the content.
HorizontalAlignment = HorizontalAlignment.Center,
@@ -158,7 +158,7 @@ The [Margin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Ann
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -172,8 +172,8 @@ The [Margin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Ann
OffsetY = 100,
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
- {
+ new ShapeAnnotation
+ {
Content = "Task1",
// Sets the margin for the content.
Margin = new DiagramThickness() { Top = 10},
@@ -205,7 +205,7 @@ The [TextAlign](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.
@code
{
// Defines diagram's node collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -219,14 +219,14 @@ The [TextAlign](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.
OffsetY = 100,
Annotations = new DiagramObjectCollection()
{
- new ShapeAnnotation
- {
+ new ShapeAnnotation
+ {
Content = "Text align is set as Left",
Style = new TextStyle()
- {
+ {
// Sets the textAlign as left for the content.
TextAlign = TextAlign.Left
- }
+ }
}
},
Style = new ShapeStyle() { Fill = "#6495ED", StrokeColor = "white" },
diff --git a/blazor/diagram/bpmn-shapes/bpmn-activity.md b/blazor/diagram/bpmn-shapes/bpmn-activity.md
index 499069bb25..3131f69333 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-activity.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-activity.md
@@ -9,14 +9,14 @@ documentation: ug
# BPMN Activity in Diagram Component
-The [Activity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html) is the task that is performed in a business process. It is represented by a rounded rectangle.
+The [BpmnActivity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html) is the task that is performed in a business process. It is represented by a rounded rectangle.
There are two types of activities. They are listed as follows:
-* [Task](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_Task): It occurs within a process and is not broken down to a finer level of detail.
-* [CollapsedSubProcess](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_CollapsedSubProcess): It occurs within a process and is broken down to a finer level of detail.
+* **Task**: It occurs within a process and is not broken down to a finer level of detail.
+* **CollapsedSubProcess**: It occurs within a process and is broken down to a finer level of detail.
-You can specify the any one of the above activity type using the [ActivityType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_ActivityType) property of [Bpmn Activity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html).
+You can specify the any one of the above activity type using the [ActivityType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_ActivityType) property of `BpmnActivity`.
```cshtml
@using Syncfusion.Blazor.Diagram
@@ -27,7 +27,7 @@ You can specify the any one of the above activity type using the [ActivityType](
@code
{
// Initialize the diagram's nodes collection.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -43,16 +43,18 @@ You can specify the any one of the above activity type using the [ActivityType](
// Unique Id of the node.
ID = "node1",
// Sets the shape to activity.
- Shape = new BpmnActivity()
- {
- ActivityType = BpmnActivityType.Task
+ Shape = new BpmnActivity()
+ {
+ ActivityType = BpmnActivityType.Task
},
};
nodes.Add(node);
}
}
```
-You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/BpmnActivity)
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VXhesZWRLnepOhzI?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/BpmnActivity)

@@ -64,16 +66,17 @@ The [TaskType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.B
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
nodes = new DiagramObjectCollection();
+ Node node = new Node()
{
// Position of the node.
OffsetX = 100,
@@ -92,11 +95,12 @@ The [TaskType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.B
},
};
nodes.Add(node);
- }
+ }
}
```
-You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/BpmnActivityTask)
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VjhesDWxBQAoPeWJ?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/BpmnActivityTask)

@@ -115,18 +119,18 @@ The various types of BPMN tasks are tabulated as follows.
## How to Create a BPMN Activity Collapsed Sub-Process
-A [CollapsedSubProcess](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_CollapsedSubProcess) is a group of tasks that is used to hide or reveal details of additional levels. The following code explains how to create a [CollapsedSubProcess](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_CollapsedSubProcess).
+A [CollapsedSubProcess](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_CollapsedSubProcess) is a group of tasks that is used to hide or reveal details of additional levels. The following code explains how to create a `CollapsedSubProcess`.
```cshtml
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -152,14 +156,15 @@ A [CollapsedSubProcess](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.
}
}
```
-You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/BpmnActivityCollapsedSubProcess)
+{% previewsample "https://blazorplayground.syncfusion.com/embed/hZhoiXCRLGIKdEWE?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/BpmnActivityCollapsedSubProcess)

### How to Set Loop Type
-[Loop](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_Loop) is a task that is internally being looped. The [Loop](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_Loop) property of [Bpmn Activity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html) allows you to define the type of loop. The default value for [Loop](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_Loop) is **None**.
+[Loop](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_Loop) is a task that is internally being looped. The `Loop` property of [BpmnActivity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html) allows you to define the type of loop. The default value for `Loop` is **None**.
You can define the `Loop` property in BPMN Activity, as shown in the following code.
@@ -167,12 +172,12 @@ You can define the `Loop` property in BPMN Activity, as shown in the following c
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
-{
+{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -198,8 +203,9 @@ You can define the `Loop` property in BPMN Activity, as shown in the following c
}
}
```
-You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/Loop)
+{% previewsample "https://blazorplayground.syncfusion.com/embed/rjrSsjMdhwcsdzZJ?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/Loop)

@@ -214,7 +220,7 @@ The following table contains various types of BPMN loops.
### How to Enable Compensation
-[IsCompensation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsCompensation) is triggered when the operation is partially failed and enabled it with the [IsCompensation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsCompensation) property of the [Bpmn Activity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html). By default, the [IsCompensation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsCompensation) property is set to false.
+[IsCompensation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsCompensation) is triggered when the operation is partially failed and enabled it with the `IsCompensation` property of the [BpmnActivity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html). By default, the `IsCompensation` property is set to **false**.
```cshtml
@using Syncfusion.Blazor.Diagram
@@ -225,7 +231,7 @@ The following table contains various types of BPMN loops.
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -248,32 +254,33 @@ The following table contains various types of BPMN loops.
IsCompensation = true,
}
};
- nodes.Add(node1);
+ nodes.Add(node);
}
}
```
-You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/Compensation)
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VDhSMZWRrGvOqeGm?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/Compensation)

### How to Enable Call
-A Call activity is a global sub-process that is reused at various points of the business flow. To create a call activity, enable the [IsCall](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsCall) property of the [Bpmn Activity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html).
+A Call activity is a global sub-process that is reused at various points of the business flow. To create a call activity, enable the [IsCall](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsCall) property of the [BpmnActivity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html).
-N>* By default, the [IsCall](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsCall) property is false.
- * This Property is only applicable for [Task](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_Task) Type Activity.
+N>* By default, the `IsCall` property is **false**.
+ * This Property is only applicable for [Task](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_Task) type activity.
```cshtml
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -287,7 +294,7 @@ N>* By default, the [IsCall](https://help.syncfusion.com/cr/blazor/Syncfusion.Bl
Width = 100,
Height = 100,
// Unique Id of the node.
- ID = "node1",
+ ID = "node1",
// Defines the shape to activity.
Shape = new BpmnActivity()
{
@@ -300,17 +307,19 @@ N>* By default, the [IsCall](https://help.syncfusion.com/cr/blazor/Syncfusion.Bl
}
}
```
-You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/Call)
+{% previewsample "https://blazorplayground.syncfusion.com/embed/LtreiNMHLlXGZvMi?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/Call)

### How to Enable Ad-Hoc
-An Ad-Hoc sub-process is a group of tasks that are executed in any order or skipped in order to fulfill the end condition and set it with the [IsAdhoc](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsAdhoc) property of [Bpmn Activity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html).
+An Ad-Hoc sub-process is a group of tasks that are executed in any order or skipped in order to fulfill the end condition and set it with the [IsAdhoc](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsAdhoc) property of [BpmnActivity](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html).
-N>* By default, the [IsAdhoc](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_IsAdhoc) property is false.
- * This Property is only applicable for [Collapsed Sub-Process](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_CollapsedSubProcess) Type Activity.
+N>* By default, the `IsAdhoc` property is **false**.
+ * This Property is only applicable for [CollapsedSubProcess](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivityType.html#Syncfusion_Blazor_Diagram_BpmnActivityType_CollapsedSubProcess) type activity.
```cshtml
@using Syncfusion.Blazor.Diagram
@@ -321,7 +330,7 @@ N>* By default, the [IsAdhoc](https://help.syncfusion.com/cr/blazor/Syncfusion.B
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -338,8 +347,8 @@ N>* By default, the [IsAdhoc](https://help.syncfusion.com/cr/blazor/Syncfusion.B
ID = "node1",
// Defines shape to activity
Shape = new BpmnActivity()
- {
- ActivityType = BpmnActivityType.CollapsedSubProcess,
+ {
+ ActivityType = BpmnActivityType.CollapsedSubProcess,
IsAdhoc = true
}
};
@@ -347,14 +356,15 @@ N>* By default, the [IsAdhoc](https://help.syncfusion.com/cr/blazor/Syncfusion.B
}
}
```
-You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/Adhoc)
+{% previewsample "https://blazorplayground.syncfusion.com/embed/htByCXidBlUAmjKf?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/Adhoc)

### How to Set Sub-Process Type
-SubProcessType represents the type of task that is being processed. The [SubProcessType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_SubProcessType) property of subprocess allows you to define the type of SubProcessType. By default, it is set to [Default](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnSubProcessType.html#Syncfusion_Blazor_Diagram_BpmnSubProcessType_Default).
+[SubProcessType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnActivity.html#Syncfusion_Blazor_Diagram_BpmnActivity_SubProcessType) represents the type of task that is being processed. The `SubProcessType` property of subprocess allows you to define the type of `SubProcessType`. By default, it is set to **Default**.
```cshtml
@using Syncfusion.Blazor.Diagram
@@ -365,7 +375,7 @@ SubProcessType represents the type of task that is being processed. The [SubProc
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -381,9 +391,9 @@ SubProcessType represents the type of task that is being processed. The [SubProc
// Unique Id of the node.
ID = "node1",
// Sets shape to Activity.
- Shape = new BpmnActivity()
- {
- ActivityType = BpmnActivityType.CollapsedSubProcess,
+ Shape = new BpmnActivity()
+ {
+ ActivityType = BpmnActivityType.CollapsedSubProcess,
SubProcessType = BpmnSubProcessType.Event,
}
};
@@ -391,7 +401,9 @@ SubProcessType represents the type of task that is being processed. The [SubProc
}
}
```
-You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/SubProcessType)
+{% previewsample "https://blazorplayground.syncfusion.com/embed/BDLoCDsnhleIlIxf?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnActivity/SubProcessType)

diff --git a/blazor/diagram/bpmn-shapes/bpmn-connectors.md b/blazor/diagram/bpmn-shapes/bpmn-connectors.md
index b4dc525754..a03ce0d29e 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-connectors.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-connectors.md
@@ -33,12 +33,12 @@ The following code example explains how to create an association.
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
{
// Create connector and store it in the connector collection.
- DiagramObjectCollection connectors;
+ private DiagramObjectCollection connectors;
protected override void OnInitialized()
{
@@ -48,8 +48,8 @@ The following code example explains how to create an association.
// Unique Id of the connector.
ID = "connector1",
// Start and end point of the connector
- SourcePoint = new DiagramPoint () { X = 100, Y = 200 },
- TargetPoint = new DiagramPoint () { X = 300, Y = 300 },
+ SourcePoint = new DiagramPoint() { X = 100, Y = 200 },
+ TargetPoint = new DiagramPoint() { X = 300, Y = 300 },
// Sets the type to Bpmn, flow to AssociationFlow.
Shape = new BpmnFlow()
{
@@ -90,12 +90,12 @@ The following code example explains how to create a sequence flow.
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
{
// Create connector and store it in the connector collection.
- DiagramObjectCollection connectors;
+ private DiagramObjectCollection connectors;
protected override void OnInitialized()
{
@@ -149,12 +149,12 @@ The following code example explains how to define a message flow.
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
{
// Create connector and store it in the connector collection.
- DiagramObjectCollection connectors;
+ private DiagramObjectCollection connectors;
protected override void OnInitialized()
{
diff --git a/blazor/diagram/bpmn-shapes/bpmn-data-object.md b/blazor/diagram/bpmn-shapes/bpmn-data-object.md
index c57cb5258f..a36e2b8555 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-data-object.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-data-object.md
@@ -20,7 +20,7 @@ A [BpmnDataObject](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagr
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
diff --git a/blazor/diagram/bpmn-shapes/bpmn-data-store.md b/blazor/diagram/bpmn-shapes/bpmn-data-store.md
index 514f4a688f..cb21f9dd41 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-data-store.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-data-store.md
@@ -15,12 +15,12 @@ A data store is used to store or access data associated with a business process.
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
diff --git a/blazor/diagram/bpmn-shapes/bpmn-event.md b/blazor/diagram/bpmn-shapes/bpmn-event.md
index b0a094e042..3f8991bb69 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-event.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-event.md
@@ -26,7 +26,7 @@ The [EventType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.
@code
{
// Initialize node collection with Node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -63,7 +63,6 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
Event triggers are notated as icons inside the circle and they represent the specific details of the process. The [Trigger](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnEvent.html#Syncfusion_Blazor_Diagram_BpmnEvent_Trigger) property of the node allows you to set the type of trigger and by default, it is set to [None](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.BpmnEventTrigger.html#Syncfusion_Blazor_Diagram_BpmnEventTrigger_None). The following code example explains how to create a BPMN trigger.
```cshtml
-
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
@@ -72,7 +71,7 @@ Event triggers are notated as icons inside the circle and they represent the spe
@code
{
// Initialize node collection with Node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -101,7 +100,7 @@ Event triggers are notated as icons inside the circle and they represent the spe
```
{% previewsample "https://blazorplayground.syncfusion.com/embed/VtresttdBOFpnepH?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnEvent/BpmnEventType)
+A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/BpmnEditor/BpmnEvent/BpmnEventTrigger)

diff --git a/blazor/diagram/bpmn-shapes/bpmn-expanded-sub-process.md b/blazor/diagram/bpmn-shapes/bpmn-expanded-sub-process.md
index 40ffc61c14..4f41b2d8df 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-expanded-sub-process.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-expanded-sub-process.md
@@ -25,7 +25,7 @@ The following code example explains how to create a BPMN Expanded Sub-Process.
@code
{
// Initialize node collection with Node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -68,34 +68,34 @@ The following code example explains how to add a BPMN node to an BPMN Expanded S
@code
{
// Initialize node collection with Node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
nodes = new DiagramObjectCollection();
Node node1 = new Node()
- {
- ID = "node1",
- OffsetX = 300,
- OffsetY = 300,
- Width = 70,
- Height = 70,
- Shape = new BpmnActivity() { ActivityType = BpmnActivityType.Task }
- };
+ {
+ ID = "node1",
+ OffsetX = 300,
+ OffsetY = 300,
+ Width = 70,
+ Height = 70,
+ Shape = new BpmnActivity() { ActivityType = BpmnActivityType.Task }
+ };
nodes.Add(node1);
Node node2 = new Node()
+ {
+ ID = "node2",
+ Width = 300,
+ OffsetX = 500,
+ OffsetY = 300,
+ Height = 300,
+ Constraints = NodeConstraints.Default | NodeConstraints.AllowDrop,
+ Shape = new BpmnExpandedSubProcess()
{
- ID = "node2",
- Width = 300,
- OffsetX = 500,
- OffsetY = 300,
- Height = 300,
- Constraints = NodeConstraints.Default | NodeConstraints.AllowDrop,
- Shape = new BpmnExpandedSubProcess()
- {
- Children = new DiagramObjectCollection() { "node1" }
- }
- };
+ Children = new DiagramObjectCollection() { "node1" }
+ }
+ };
nodes.Add(node2);
}
}
@@ -128,12 +128,12 @@ The following image shows how to add BPMN node into the BPMN ExpandedSubProcess
@using Syncfusion.Blazor.Diagram
@* Initialize Diagram *@
-
+
@code
-{
+{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -187,7 +187,7 @@ The following table describes the available loop types for an Expanded Sub-Proce
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -232,7 +232,7 @@ An Ad-Hoc Expanded Sub-Process is a group of tasks that are executed in any orde
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -277,7 +277,7 @@ The [SubProcessType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Dia
@code
{
// Initialize the node collection with node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
diff --git a/blazor/diagram/bpmn-shapes/bpmn-gateway.md b/blazor/diagram/bpmn-shapes/bpmn-gateway.md
index 9c6867d3a1..cce09f5911 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-gateway.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-gateway.md
@@ -20,7 +20,7 @@ A [BpmnGateway](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.
@code
{
// Initialize node collection with Node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -38,7 +38,7 @@ A [BpmnGateway](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.
Shape = new BpmnGateway()
{
//Sets gateway type to None.
- GatewayType = BpmnGatewayType.None
+ GatewayType = BpmnGatewayType.None
}
};
nodes.Add(node);
diff --git a/blazor/diagram/bpmn-shapes/bpmn-shapes.md b/blazor/diagram/bpmn-shapes/bpmn-shapes.md
index bcfb0455f4..af81b67cdb 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-shapes.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-shapes.md
@@ -22,7 +22,7 @@ The following code example demonstrates how to create a simple BPMN Task shape.
@code
{
// Initialize node collection with Node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -38,9 +38,9 @@ The following code example demonstrates how to create a simple BPMN Task shape.
// Unique Id of the node.
ID = "node1",
// Sets the shape to activity.
- Shape = new BpmnActivity()
- {
- ActivityType = BpmnActivityType.Task
+ Shape = new BpmnActivity()
+ {
+ ActivityType = BpmnActivityType.Task
},
};
nodes.Add(node);
diff --git a/blazor/diagram/bpmn-shapes/bpmn-text-annotation.md b/blazor/diagram/bpmn-shapes/bpmn-text-annotation.md
index 05ab547859..26563156db 100644
--- a/blazor/diagram/bpmn-shapes/bpmn-text-annotation.md
+++ b/blazor/diagram/bpmn-shapes/bpmn-text-annotation.md
@@ -36,7 +36,7 @@ documentation: ug
@code
{
// Initialize node collection with Node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -85,7 +85,7 @@ The following code example represents how to create a TextAnnotation and connect
@code
{
// Initialize node collection with Node.
- DiagramObjectCollection nodes;
+ private DiagramObjectCollection nodes;
protected override void OnInitialized()
{
@@ -101,9 +101,9 @@ The following code example represents how to create a TextAnnotation and connect
// Unique Id of the node.
ID = "node1",
// Sets the type of shape to Bpmn and shape to activity.
- Shape = new BpmnActivity()
- {
- ActivityType = BpmnActivityType.Task
+ Shape = new BpmnActivity()
+ {
+ ActivityType = BpmnActivityType.Task
},
};
nodes.Add(node1);
@@ -134,7 +134,6 @@ The following code example represents how to create a TextAnnotation and connect
nodes.Add(node2);
}
}
-
```
{% previewsample "https://blazorplayground.syncfusion.com/embed/VNrIWNXnKpTiBXyn?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
diff --git a/blazor/diagram/commands.md b/blazor/diagram/commands.md
index 66242dd9e4..91a2cb6bef 100644
--- a/blazor/diagram/commands.md
+++ b/blazor/diagram/commands.md
@@ -32,7 +32,6 @@ The following example shows how to align selected objects.
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
@@ -40,43 +39,44 @@ The following example shows how to align selected objects.
@code
{
//Reference the diagram
- SfDiagramComponent diagram;
+ private SfDiagramComponent diagram;
// Initialize diagram's node collection
- DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
protected override void OnInitialized()
{
Node node1 = new Node()
- {
- ID = "node1",
- Width = 50,
- Height = 30,
- OffsetX = 500,
- OffsetY = 100,
- Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
- };
+ {
+ ID = "node1",
+ Width = 50,
+ Height = 30,
+ OffsetX = 500,
+ OffsetY = 100,
+ Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
+ };
nodes.Add(node1);
Node node2 = new Node()
- {
- ID = "node2",
- Width = 60,
- Height = 40,
- OffsetX = 500,
- OffsetY = 300,
- Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
- };
+ {
+ ID = "node2",
+ Width = 60,
+ Height = 40,
+ OffsetX = 500,
+ OffsetY = 300,
+ Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
+ };
nodes.Add(node2);
Node node3 = new Node()
- {
- ID = "node3",
- Width = 70,
- Height = 50,
- OffsetX = 500,
- OffsetY = 500,
- Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
- };
+ {
+ ID = "node3",
+ Width = 70,
+ Height = 50,
+ OffsetX = 500,
+ OffsetY = 500,
+ Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
+ };
nodes.Add(node3);
}
+
//Method to align selected objects at left of the selection boundary.
private void OnAlignLeft()
{
@@ -95,16 +95,15 @@ The following code example illustrates how to align all the selected objects at
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
@code
{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -158,16 +157,15 @@ The following code example illustrates how to align all the selected objects at
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
@code
{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -221,16 +219,15 @@ The following code example illustrates how to align all the selected objects at
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
@code
{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -284,16 +281,14 @@ The following code example illustrates how to align all the selected objects at
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
-
@code
{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -347,16 +342,15 @@ The following code example illustrates how to align all the selected objects at
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
@code
{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -436,41 +430,41 @@ The following code example illustrates how to execute the space commands.
@code
{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
Node node1 = new Node()
- {
- ID = "node1",
- Width = 50,
- Height = 30,
- OffsetX = 500,
- OffsetY = 100,
- Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
- };
+ {
+ ID = "node1",
+ Width = 50,
+ Height = 30,
+ OffsetX = 500,
+ OffsetY = 100,
+ Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
+ };
nodes.Add(node1);
Node node2 = new Node()
- {
- ID = "node2",
- Width = 60,
- Height = 40,
- OffsetX = 400,
- OffsetY = 200,
- Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
- };
+ {
+ ID = "node2",
+ Width = 60,
+ Height = 40,
+ OffsetX = 400,
+ OffsetY = 200,
+ Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
+ };
nodes.Add(node2);
Node node3 = new Node()
- {
- ID = "node3",
- Width = 70,
- Height = 50,
- OffsetX = 500,
- OffsetY = 300,
- Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
- };
+ {
+ ID = "node3",
+ Width = 70,
+ Height = 50,
+ OffsetX = 500,
+ OffsetY = 300,
+ Shape = new BasicShape() { Type = NodeShapes.Basic, Shape = NodeBasicShapes.Rectangle }
+ };
nodes.Add(node3);
}
@@ -551,9 +545,9 @@ The following code example illustrates how to execute the size commands.
@code
{
//Reference to diagram.
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -630,7 +624,6 @@ The following code illustrates the clipboard commands.
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Buttons
-
@@ -641,9 +634,9 @@ The following code illustrates the clipboard commands.
@code
{
//Reference to diagram.
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -727,9 +720,9 @@ The following example demonstrates the grouping commands.
@code
{
//Reference to diagram.
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -795,11 +788,14 @@ The following code illustrates how to execute the BringToFront command.
@using Syncfusion.Blazor.Buttons
-
-
-@code{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
+
+
+
+@code
+{
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+
protected override void OnInitialized()
{
Node node1 = new Node()
@@ -836,6 +832,7 @@ The following code illustrates how to execute the BringToFront command.
};
nodes.Add(node3);
}
+
private void bringToFront()
{
diagram.Select(new ObservableCollection() { diagram.Nodes[0] });
@@ -860,11 +857,14 @@ The following code illustrates how to execute the SendToBack command.
@using Syncfusion.Blazor.Buttons
-
-
-@code{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
+
+
+
+@code
+{
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+
protected override void OnInitialized()
{
Node node1 = new Node()
@@ -901,6 +901,7 @@ The following code illustrates how to execute the SendToBack command.
};
nodes.Add(node3);
}
+
private void sendToBack()
{
diagram.Select(new ObservableCollection() { diagram.Nodes[2] });
@@ -924,11 +925,14 @@ The following code illustrates how to execute the BringForward command.
@using Syncfusion.Blazor.Buttons
-
-
-@code{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
+
+
+
+@code
+{
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+
protected override void OnInitialized()
{
Node node1 = new Node()
@@ -965,6 +969,7 @@ The following code illustrates how to execute the BringForward command.
};
nodes.Add(node3);
}
+
private void bringForward()
{
diagram.Select(new ObservableCollection() { diagram.Nodes[1] });
@@ -988,11 +993,14 @@ The following code illustrates how to execute the SendBackward command.
@using Syncfusion.Blazor.Buttons
-
-
-@code{
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
+
+
+
+@code
+{
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+
protected override void OnInitialized()
{
Node node1 = new Node()
@@ -1029,6 +1037,7 @@ The following code illustrates how to execute the SendBackward command.
};
nodes.Add(node3);
}
+
private void sendBackward()
{
diagram.Select(new ObservableCollection() { diagram.Nodes[2] });
@@ -1061,9 +1070,9 @@ The following code illustrates how to zoom-in/zoom out the diagram.
@code
{
//Reference to diagram.
- SfDiagramComponent diagram;
- DiagramObjectCollection nodes = new DiagramObjectCollection();
- DiagramObjectCollection Connectors = new DiagramObjectCollection();
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes = new DiagramObjectCollection();
+ private DiagramObjectCollection Connectors = new DiagramObjectCollection();
protected override void OnInitialized()
{
@@ -1113,11 +1122,12 @@ The following code illustrates how to execute nudge command.
@using Syncfusion.Blazor.Buttons
+
@code
{
- SfDiagramComponent diagram;
+ private SfDiagramComponent diagram;
private void NudgeLeft()
{
@@ -1153,13 +1163,13 @@ These commands enhance user experience by offering flexibility in diagram editin
-
-
+
+
@code
{
//Reference to diagram.
- SfDiagramComponent diagram;
+ private SfDiagramComponent diagram;
private void Undo()
{
@@ -1188,28 +1198,35 @@ The [BringIntoView](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diag
@using Syncfusion.Blazor.Buttons
-
-
+
+
+
@code
{
-SfDiagramComponent diagram;
-DiagramObjectCollection nodes;
-DiagramObjectCollection connectors;
-protected override void OnInitialized()
+ private SfDiagramComponent diagram;
+ private DiagramObjectCollection nodes;
+ private DiagramObjectCollection