Skip to content

Commit 8aa8109

Browse files
Revamping the Ug
1 parent 4d30775 commit 8aa8109

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed

blazor/diagram/data-binding.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,21 @@ The following sample code demonstrates implementing custom data binding using cu
11041104
newConnector.CornerRadius = 5;
11051105
}
11061106

1107+
protected override void OnInitialized()
1108+
{
1109+
employeeDetails = new List<EmployeeDetails>();
1110+
employeeDetails = new List<EmployeeDetails>() {
1111+
new EmployeeDetails { EmployeeID = "1", FirstName = "Andrew", Designation = "CEO", Country = "England", ReportsTo = "", Color = "Red" },
1112+
new EmployeeDetails { EmployeeID = "2", FirstName = "Nancy", Designation = "Product Manager", Country = "USA", ReportsTo = "1", Color = "Blue" },
1113+
new EmployeeDetails { EmployeeID = "3", FirstName = "Janet", Designation = "Product Manager", Country = "USA", ReportsTo = "1", Color = "Blue" },
1114+
new EmployeeDetails { EmployeeID = "4", FirstName = "Margaret", Designation = "Product Manager", Country = "USA", ReportsTo = "1", Color = "Blue" },
1115+
new EmployeeDetails { EmployeeID = "5", FirstName = "Steven", Designation = "Product Manager", Country = "England", ReportsTo = "1", Color = "Blue" },
1116+
new EmployeeDetails { EmployeeID = "7", FirstName = "Michael", Designation = "Team Lead", Country = "USA", ReportsTo = "5", Color = "Green" },
1117+
new EmployeeDetails { EmployeeID = "8", FirstName = "Robert", Designation = "Developer", Country = "England", ReportsTo = "5", Color = "Gray" },
1118+
new EmployeeDetails { EmployeeID = "9", FirstName = "Anne", Designation = "Developer", Country = "USA", ReportsTo = "5", Color = "Gray" },
1119+
new EmployeeDetails { EmployeeID = "6", FirstName = "Laura", Designation = "HR", Country = "USA", ReportsTo = "1", Color = "Purple" },
1120+
};
1121+
}
11071122

11081123
public class EmployeeDetails
11091124
{
@@ -1158,6 +1173,7 @@ The following sample code demonstrates implementing custom data binding using cu
11581173
}
11591174
}
11601175
```
1176+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LZLIMjNbqJwtqCZT?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
11611177

11621178
### How to Perform CRUD Operation
11631179

@@ -1250,6 +1266,21 @@ The following sample code demonstrates implementing CRUD operations for custom b
12501266
newConnector.CornerRadius = 5;
12511267
}
12521268

1269+
protected override void OnInitialized()
1270+
{
1271+
Details = new List<EmployeeDetails>();
1272+
employeeDetails = new List<EmployeeDetails>() {
1273+
new EmployeeDetails { EmployeeID = "1", FirstName = "Andrew", Designation = "CEO", Country = "England", ReportsTo = "", Color = "Red" },
1274+
new EmployeeDetails { EmployeeID = "2", FirstName = "Nancy", Designation = "Product Manager", Country = "USA", ReportsTo = "1", Color = "Blue" },
1275+
new EmployeeDetails { EmployeeID = "3", FirstName = "Janet", Designation = "Product Manager", Country = "USA", ReportsTo = "1", Color = "Blue" },
1276+
new EmployeeDetails { EmployeeID = "4", FirstName = "Margaret", Designation = "Product Manager", Country = "USA", ReportsTo = "1", Color = "Blue" },
1277+
new EmployeeDetails { EmployeeID = "5", FirstName = "Steven", Designation = "Product Manager", Country = "England", ReportsTo = "1", Color = "Blue" },
1278+
new EmployeeDetails { EmployeeID = "7", FirstName = "Michael", Designation = "Team Lead", Country = "USA", ReportsTo = "5", Color = "Green" },
1279+
new EmployeeDetails { EmployeeID = "8", FirstName = "Robert", Designation = "Developer", Country = "England", ReportsTo = "5", Color = "Gray" },
1280+
new EmployeeDetails { EmployeeID = "9", FirstName = "Anne", Designation = "Developer", Country = "USA", ReportsTo = "5", Color = "Gray" },
1281+
new EmployeeDetails { EmployeeID = "6", FirstName = "Laura", Designation = "HR", Country = "USA", ReportsTo = "1", Color = "Purple" },
1282+
};
1283+
}
12531284

12541285
public class EmployeeDetails
12551286
{
@@ -1366,6 +1397,8 @@ The following sample code demonstrates implementing CRUD operations for custom b
13661397
}
13671398
}
13681399
```
1400+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rthIMXNbKTJLixOX?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
1401+
13691402
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/DataBinding/DiagramWithCustomAdaptor)
13701403
13711404
### How to Bind GraphQL Service

blazor/diagram/interaction.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ Select an element by clicking it. A single click clears any previous selection a
6262
}
6363
}
6464
```
65+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hXLSMDtPLbKuecIg?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
66+
6567
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/DiagramSelectionEvent)
6668
6769
## How to Select a Group
@@ -132,6 +134,8 @@ In the following example, the node can be selected with the first click and unse
132134
}
133135
}
134136
```
137+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rXLSiNDbBbpTKpzu?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
138+
135139
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/UnSelectSample)
136140
137141
![Toggle Selection in Blazor Diagram](images/UnselectSample.gif)
@@ -168,7 +172,7 @@ When RubberBandSelectionMode is set to [PartialIntersect](https://help.syncfusio
168172
@using System.Collections.ObjectModel
169173
@using Syncfusion.Blazor.Buttons
170174

171-
<SfDiagramComponent @ref="diagram" Width="50%" Height="800px" SelectionSettings="@select" @bind-Connectors="@Connectors" @bind-Nodes="NodeCollection"></SfDiagramComponent>
175+
<SfDiagramComponent @ref="diagram" Width="60%" Height="800px" SelectionSettings="@select" @bind-Connectors="@Connectors" @bind-Nodes="NodeCollection"></SfDiagramComponent>
172176
@functions
173177
{
174178

@@ -258,6 +262,8 @@ When RubberBandSelectionMode is set to [PartialIntersect](https://help.syncfusio
258262
}
259263
}
260264
```
265+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hthysXZvLFILllHo?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
266+
261267
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/RubberBandSelectionMode)
262268
263269
## Getting Current Selected Objects
@@ -365,6 +371,8 @@ The DiagramSelectionSettings provides access to:
365371
}
366372
}
367373
```
374+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rNBSsDjFhlxZSZvL?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
375+
368376
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/CurrentSelection)
369377
370378
### How to clone the selected nodes and connector at runtime
@@ -377,7 +385,7 @@ Clone is a virtual method of the node used to create a copy of a diagram object.
377385

378386

379387
<SfButton Content="Clone" OnClick="@Clone" />
380-
<SfDiagramComponent @ref="diagram" Width="50%" Height="800px" @bind-Connectors="@Connectors" @bind-Nodes="NodeCollection"></SfDiagramComponent>
388+
<SfDiagramComponent @ref="diagram" Width="60%" Height="800px" @bind-Connectors="@Connectors" @bind-Nodes="NodeCollection"></SfDiagramComponent>
381389
@functions
382390
{
383391
public string ID = "diagram";
@@ -570,6 +578,8 @@ Clone is a virtual method of the node used to create a copy of a diagram object.
570578
}
571579
}
572580
```
581+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VZVICNXlrlnvNlVu?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
582+
573583
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/CloneSelectedItems)
574584
![Grouping in Blazor Diagram](images/CloneSelection.gif)
575585

@@ -625,6 +635,8 @@ SelectionChanged="OnSelectionChanged">
625635
}
626636

627637
```
638+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNBIMDNbBPcaeybR?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
639+
628640
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/SelectedElements)
629641
## How to Drag Elements
630642

@@ -671,6 +683,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
671683
}
672684
}
673685
```
686+
{% previewsample "https://blazorplayground.syncfusion.com/embed/htLosXtvrPFdHwTo?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
687+
674688
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/DiagramPositionEvent)
675689
For more information about dragging, refer [Node Drag](./nodes/interaction#how-to-drag-the-node)
676690

@@ -721,6 +735,8 @@ For more information about dragging, refer [Node Drag](./nodes/interaction#how-t
721735
}
722736
}
723737
```
738+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rDVostNPrvOZhuso?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
739+
724740
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/DiagramSizeEvent)
725741
726742
For more information about resizing, refer [Node Resize](./nodes/interaction#how-to-resize-the-node)
@@ -775,6 +791,8 @@ N> While dragging and resizing, the objects are snapped towards the nearest obje
775791
}
776792
}
777793
```
794+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BtBIiZZlhvYIDpvh?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
795+
778796
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/DiagramRotateEvent)
779797
780798
For more information about resizing, refer [Node Rotate](./nodes/interaction#how-to-rotate-the-node)
@@ -869,6 +887,8 @@ For more information, refer [End Point Dragging](./connectors/interactions#end-p
869887
}
870888
}
871889
```
890+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rDLIiDDFLkXDqWqS?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
891+
872892
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/DiagramConnectionEvent)
873893
874894
## How to Edit Straight Connector Segments
@@ -951,6 +971,8 @@ For more information about straight segment editing, refer [Straight Segment Edi
951971
}
952972
}
953973
```
974+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LNLoiNXFhEtTKrJy?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
975+
954976
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/SegmentEditing)
955977
956978
For more information about orthogonal segment editing, refer [Orthogonal Segment Editing](./connectors/segments/orthogonal#orthogonal-segment-editing).
@@ -1023,6 +1045,8 @@ The diagram component notifies the mouse button clicked. For example, whenever t
10231045
}
10241046
}
10251047
```
1048+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rXVoWNtPgqsPzFca?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
1049+
10261050
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction/MouseClick)
10271051
10281052
## How to Customize the Appearance of User Handle

blazor/diagram/overview-component.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ public List<HierarchicalDetails> DataSource = new List<HierarchicalDetails>()
9999
};
100100
}
101101
```
102+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZVoitXvqgxOfTzQ?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
103+
102104
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Overview/Overview)
103105

104106
## How to Zoom and Pan the Diagram
@@ -198,6 +200,8 @@ The following example shows how to disable the zoom constraint from the default
198200
}
199201
}
200202
```
203+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LXhIstXbqgwxdWkw?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
204+
201205
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Overview/OverviewConstraints)
202206

203207
## See also

0 commit comments

Comments
 (0)