You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -152,9 +152,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
152
152

153
153
## How to add connector with annotations at runtime
154
154
155
-
You can add connector with annotation at runtime in the diagram component by using the [AddDiagramElements](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_AddDiagramElements_Syncfusion_Blazor_Diagram_DiagramObjectCollection_Syncfusion_Blazor_Diagram_NodeBase__) method.
155
+
You can add connector with annotation at runtime in the diagram component by using the [AddDiagramElementsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_AddDiagramElementsAsync_Syncfusion_Blazor_Diagram_DiagramObjectCollection_Syncfusion_Blazor_Diagram_NodeBase__) method.
156
156
157
-
The following code explains how to add an connector with annotation at runtime by using `AddDiagramElements` method.
157
+
The following code explains how to add an connector with annotation at runtime by using `AddDiagramElementsAsync` method.
158
158
159
159
```cshtml
160
160
@using Syncfusion.Blazor.Diagram
@@ -200,7 +200,7 @@ The following code explains how to add an connector with annotation at runtime
@@ -393,13 +393,13 @@ The following code example explains how to change the connector properties.
393
393
Diagram.BeginUpdate();
394
394
Diagram.Connectors[0].SourcePoint.X = 50;
395
395
Diagram.Connectors[0].SourcePoint.Y = 50;
396
-
Diagram.EndUpdate();
396
+
Diagram.EndUpdateAsync();
397
397
}
398
398
}
399
399
```
400
400
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/UpdateConnectorAtRunTime)
401
401
402
-
N> BeginUpdate and EndUpdate methods allow you to stop the continuous update of control and resume it finally.
402
+
N> BeginUpdate and EndUpdateAsync methods allow you to stop the continuous update of control and resume it finally.
@@ -384,7 +384,7 @@ The following code illustrates how a node group is added at runtime.
384
384
}
385
385
```
386
386
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Group/AddGroupAtRunTime)
387
-
* Also, you can add the child to the node group through [AddChild](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_AddChild_Syncfusion_Blazor_Diagram_NodeGroup_Syncfusion_Blazor_Diagram_NodeBase_) method. The following code illustrates how to add child to the existing node group through AddChild method.
387
+
* Also, you can add the child to the node group through [AddChildAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_AddChildAsync_Syncfusion_Blazor_Diagram_NodeGroup_Syncfusion_Blazor_Diagram_NodeBase_) method. The following code illustrates how to add child to the existing node group through AddChildAsync method.
388
388
389
389
```cshtml
390
390
@using Syncfusion.Blazor.Diagram
@@ -466,7 +466,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
466
466
}
467
467
}
468
468
};
469
-
await diagram.AddChild(group as NodeGroup, node);
469
+
await diagram.AddChildAsync(group as NodeGroup, node);
Copy file name to clipboardExpand all lines: blazor/diagram/how-to.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,11 +50,11 @@ To create a node, define the Node object and add it to the nodes collection of t
50
50
```
51
51
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Methods/AddMethod)
52
52
53
-
## How to add nodes through AddDiagramElements
53
+
## How to add nodes through AddDiagramElementsAsync
54
54
55
-
Unlike the Add() method, the [AddDiagramElements](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_AddDiagramElements_Syncfusion_Blazor_Diagram_DiagramObjectCollection_Syncfusion_Blazor_Diagram_NodeBase__) method will measure the passed elements before re-rendering the complete diagram component at once. When using the Add() method to add multiple nodes and connectors simultaneously, the connectors will be rendered before the nodes. As a result, connectors may be misplaced due to the synchronous behavior of the Add method. To overcome this, use the asynchronous AddDiagramElements() method.
55
+
Unlike the Add() method, the [AddDiagramElementsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_AddDiagramElementsAsync_Syncfusion_Blazor_Diagram_DiagramObjectCollection_Syncfusion_Blazor_Diagram_NodeBase__) method will measure the passed elements before re-rendering the complete diagram component at once. When using the Add() method to add multiple nodes and connectors simultaneously, the connectors will be rendered before the nodes. As a result, connectors may be misplaced due to the synchronous behavior of the Add method. To overcome this, use the asynchronous AddDiagramElementsAsync() method.
56
56
57
-
*AddDiagramElements() method is a preferred way to add a collection of items to the diagram to get better performance compared to Add() method.
57
+
*AddDiagramElementsAsync() method is a preferred way to add a collection of items to the diagram to get better performance compared to Add() method.
58
58
59
59
```cshtml
60
60
@using Syncfusion.Blazor.Diagram
@@ -147,7 +147,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
@@ -958,8 +958,8 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
958
958
```
959
959
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Methods/GetCustomCursor)
960
960
961
-
## How to use the BeginUpdate and EndUpdate
962
-
[BeginUpdate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_BeginUpdate) prevents visual updates to the diagram until the EndUpdate() method is called. [EndUpdate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_EndUpdate) means that the diagram is unlocked following a call to the BeginUpdate(Boolean) method, resulting in an immediate visual update.
961
+
## How to use the BeginUpdate and EndUpdateAsync
962
+
[BeginUpdate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_BeginUpdate) prevents visual updates to the diagram until the EndUpdateAsync() method is called. [EndUpdateAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_EndUpdateAsync) means that the diagram is unlocked following a call to the BeginUpdate(Boolean) method, resulting in an immediate visual update.
963
963
964
964
```cshtml
965
965
@using Syncfusion.Blazor.Diagram
@@ -1032,7 +1032,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
1032
1032
diagram.BeginUpdate();
1033
1033
diagram.Nodes[0].Height = 150;
1034
1034
diagram.Nodes[0].Width = 150;
1035
-
diagram.EndUpdate();
1035
+
diagram.EndUpdateAsync();
1036
1036
1037
1037
}
1038
1038
}
@@ -1305,7 +1305,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
1305
1305
{
1306
1306
sfDiagram.EndGroupAction();
1307
1307
}
1308
-
_ = sfDiagram.EndUpdate();
1308
+
_ = sfDiagram.EndUpdateAsync();
1309
1309
base.OnMouseUp(args);
1310
1310
this.InAction = true;
1311
1311
}
@@ -1525,7 +1525,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
1525
1525
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Methods/ZoomAndPan)
1526
1526
1527
1527
## How to refresh the datasource
1528
-
[RefreshDataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_RefreshDataSource) will refresh the layout based on the changes in the data source.
1528
+
[RefreshDataSourceAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_RefreshDataSourceAsync) will refresh the layout based on the changes in the data source.
1529
1529
1530
1530
```cshtml
1531
1531
@using Syncfusion.Blazor.Diagram
@@ -1599,7 +1599,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
Copy file name to clipboardExpand all lines: blazor/diagram/layout/organizational-chart.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -370,11 +370,11 @@ The following code example illustrates how to add assistants to the layout.
370
370
371
371
## How to refresh the layout
372
372
373
-
Diagramallowstorefreshthelayoutatruntimebyusingthe [DoLayout](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_DoLayout) method. Use the following code example to refresh the layout.
373
+
Diagramallowstorefreshthelayoutatruntimebyusingthe [DoLayoutAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_DoLayoutAsync) method. Use the following code example to refresh the layout.
374
374
375
375
```csharp
376
376
//Update the layout at runtime.
377
-
diagram.DoLayout();
377
+
diagram.DoLayoutAsync();
378
378
379
379
//Here, diagram is instance of SfDiagramComponent.
Copy file name to clipboardExpand all lines: blazor/diagram/nodes/nodes.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,9 +116,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
116
116
117
117
## How to add node with annotations at runtime
118
118
119
-
You can add node with annotation at runtime in the diagram component by using the [AddDiagramElements](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_AddDiagramElements_Syncfusion_Blazor_Diagram_DiagramObjectCollection_Syncfusion_Blazor_Diagram_NodeBase__) method.
119
+
You can add node with annotation at runtime in the diagram component by using the [AddDiagramElementsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_AddDiagramElementsAsync_Syncfusion_Blazor_Diagram_DiagramObjectCollection_Syncfusion_Blazor_Diagram_NodeBase__) method.
120
120
121
-
The following code explains how to add an node with annotation at runtime by using `AddDiagramElements` method.
121
+
The following code explains how to add an node with annotation at runtime by using `AddDiagramElementsAsync` method.
122
122
123
123
```cshtml
124
124
@using Syncfusion.Blazor.Diagram
@@ -175,7 +175,7 @@ The following code explains how to add an node with annotation at runtime by us
@@ -358,13 +358,13 @@ The following code example explains how to change the node properties.
358
358
Diagram.BeginUpdate();
359
359
Diagram.Nodes[0].Width = 50;
360
360
Diagram.Nodes[0].Height = 50;
361
-
await Diagram.EndUpdate();
361
+
await Diagram.EndUpdateAsync();
362
362
}
363
363
}
364
364
```
365
365
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Nodes/ActionsofNodes/UpdateNode)
366
366
367
-
N> [BeginUpdate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_BeginUpdate) and [EndUpdate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_EndUpdate) methods allow you to stop the continuous update of control and resume it finally.
367
+
N> [BeginUpdate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_BeginUpdate) and [EndUpdateAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_EndUpdateAsync) methods allow you to stop the continuous update of control and resume it finally.
Copy file name to clipboardExpand all lines: blazor/diagram/serialization.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,19 +31,19 @@ string data = Diagram.SaveDiagram();
31
31
32
32
## Load the diagram from string
33
33
34
-
The [diagram](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html) is loaded from the serialized string data by the [LoadDiagram](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_LoadDiagram_System_String_System_Boolean_) method. The following code illustrates how to load the diagram from serialized string data.
34
+
The [diagram](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html) is loaded from the serialized string data by the [LoadDiagramAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_LoadDiagramAsync_System_String_System_Boolean_) method. The following code illustrates how to load the diagram from serialized string data.
35
35
36
36
```cshtml
37
37
SfDiagramComponent Diagram;
38
38
//returns the serialized string of the Diagram
39
39
string data = Diagram.SaveDiagram();
40
40
//Loads the Diagram from saved data
41
-
await Diagram.LoadDiagram(data);
41
+
await Diagram.LoadDiagramAsync(data);
42
42
```
43
43
44
44
## Load the SfDiagram JSON data string using SfDiagramComponent
45
45
46
-
You can load the [SfDiagram](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagrams.SfDiagram.html) serialized JSON data string into [SfDiagramComponent](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html) using [LoadDiagram](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_LoadDiagram_System_String_System_Boolean_) method. When you load SfDiagram serialized string, then the isClassicData parameter should be set to true. The default value of the isClassicData is false.
46
+
You can load the [SfDiagram](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagrams.SfDiagram.html) serialized JSON data string into [SfDiagramComponent](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html) using [LoadDiagramAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_LoadDiagramAsync_System_String_System_Boolean_) method. When you load SfDiagram serialized string, then the isClassicData parameter should be set to true. The default value of the isClassicData is false.
47
47
48
48
The following code illustrates how to load the SfDiagramComponent from SfDiagram serialized string data.
49
49
@@ -54,7 +54,7 @@ string data = ClassicDiagram.SaveDiagram();
54
54
55
55
SfDiagramComponent Diagram;
56
56
//Loads the SfDiagramComponent from saved data of the SfDiagram
57
-
await Diagram.LoadDiagram(data, true);
57
+
await Diagram.LoadDiagramAsync(data, true);
58
58
```
59
59
60
60
## How to save and load the diagram using file stream
@@ -86,7 +86,7 @@ The diagram provides support to save and load the diagram using file stream. The
86
86
diagram.BeginUpdate();
87
87
ExtensionType = ".json";
88
88
await FileUtil.Click(jsRuntime);
89
-
await diagram.EndUpdate();
89
+
await diagram.EndUpdateAsync();
90
90
}
91
91
92
92
public async static Task SaveAs(IJSRuntime js, string data, string fileName)
0 commit comments