Skip to content

Commit 0d80d68

Browse files
Revamping the Ug
1 parent 2233001 commit 0d80d68

15 files changed

+169
-10
lines changed

blazor/diagram/connectors/connectors.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ The following code example illustrates how to add a connector through the connec
5353
}
5454
}
5555
```
56+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNBoMNtRKRqMWtbh?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
57+
5658
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/AddConnectorThroughConnectorCollection).
5759

5860
![Blazor Diagram Connector](../images/blazor-diagram-connector.png)
@@ -105,6 +107,8 @@ Add a connector at runtime by adding it to the connectors collection in the Diag
105107
}
106108
}
107109
```
110+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LNrSWjDxqRgcAwdw?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
111+
108112
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/AddConnectorAtRuntime).
109113
### How to Clone a Connector at Runtime
110114
[Clone](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Connector.html#Syncfusion_Blazor_Diagram_Connector_Clone) is a virtual method on connector that creates a copy of a diagram object. After cloning, set a unique ID for the cloned connector. The following code demonstrates how to clone the connector during runtime.
@@ -149,6 +153,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
149153
150154
}
151155
```
156+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LjVSCZtHgnwMnRkK?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
157+
152158
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/CloneConnector)
153159
![Cloning a connector in Blazor Diagram](../images/CloneConnector.gif)
154160
## How to Add a Connector with Annotations at Runtime
@@ -162,7 +168,7 @@ The following code explains how to add a connector with annotation at runtime b
162168
@using Syncfusion.Blazor.Buttons
163169
164170
<SfButton Content="Add Connector" OnClick="@AddConnector" />
165-
<SfDiagramComponent Width="1000px" Height="500px" Connectors="@connectors"></SfDiagramComponent>
171+
<SfDiagramComponent @ref="Diagram" Width="1000px" Height="500px" Connectors="@connectors"></SfDiagramComponent>
166172
167173
@code
168174
{
@@ -172,6 +178,8 @@ The following code explains how to add a connector with annotation at runtime b
172178
173179
DiagramObjectCollection<NodeBase> NodeCollection = new DiagramObjectCollection<NodeBase>();
174180
181+
SfDiagramComponent Diagram;
182+
175183
protected override void OnInitialized()
176184
{
177185
Connector Connector = new Connector()
@@ -205,6 +213,7 @@ The following code explains how to add a connector with annotation at runtime b
205213
}
206214
}
207215
```
216+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LjheijZRqdvOdfPm?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
208217

209218
## How to Add a Connector to the Symbol Palette
210219

@@ -284,6 +293,8 @@ Connectors can be predefined and added to the symbol palette. Then, drag and dro
284293
}
285294
}
286295
```
296+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VDLSijDHAnuQEcxN?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
297+
287298
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/ConnectorFromPalette)
288299

289300
![Dragging connectors from the symbol palette into the diagram in Blazor](../images/blazor-diagram-connector-from-palette.gif)
@@ -341,6 +352,8 @@ The following code shows how to remove a connector at runtime.
341352
}
342353
}
343354
```
355+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rNBoWNZHqcZySvbN?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
356+
344357
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/RemoveConnectorsAtRunTime)
345358

346359
A connector can also be removed from the diagram by using the native `RemoveAt` method. Refer to the following example that shows how to remove the connector at runtime.
@@ -398,6 +411,8 @@ The following code example explains how to change the connector properties.
398411
}
399412
}
400413
```
414+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BXhoCXXRAwsrsupa?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
415+
401416
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/UpdateConnectorAtRunTime).
402417

403418
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 temporarily stop the continuous update of the control and resume it once the updates are complete.
@@ -476,7 +491,9 @@ The following code example illustrates how to connect two nodes.
476491
}
477492
}
478493
```
479-
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/ConnectWithNode)
494+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rtLIsZZHKcMbFFXS?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
495+
496+
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/ConnectWithNode).
480497

481498
![Displaying Connection between Nodes in Blazor Diagram](../images/blazor-diagram-node-to-node-connection.png)
482499

@@ -580,7 +597,9 @@ The following code example illustrates how to create port to port connections.
580597
}
581598
}
582599
```
583-
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/ConnectWithPort)
600+
{% previewsample "https://blazorplayground.syncfusion.com/embed/htByCjDRKwBxkAkt?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
601+
602+
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/ActionofConnectors/ConnectWithPort).
584603

585604
![Connecting two nodes using specific ports in Blazor Diagram](../images/blazor-diagram-port-to-port-connection.png)
586605

blazor/diagram/connectors/customization.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ To learn more about connector customization, watch the following video:
7070
}
7171
}
7272
```
73+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hDhSsZDdUmUzCzAM?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
74+
7375
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/Decorator)
7476

7577
### How to Customize Connector Decorator Appearance
@@ -139,6 +141,8 @@ The following code example illustrates how to customize the decorator appearance
139141
}
140142
}
141143
```
144+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZhoiZNHqcgvBDIK?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
145+
142146
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/DecoratorAppearance)
143147

144148
![Connector with customized decorators in Blazor Diagram](../images/blazor-diagram-decorator.png)
@@ -215,6 +219,8 @@ Padding adds space between the connector’s end point and the object to where i
215219
}
216220
}
217221
```
222+
{% previewsample "https://blazorplayground.syncfusion.com/embed/htVeWZtdqQzoBYft?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
223+
218224
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/Padding)
219225

220226
![Connector demonstrating source and target padding in Blazor Diagram](../images/blazor-diagram-connector-padding.png)
@@ -310,6 +316,8 @@ The following code example illustrates how to enable line bridging.
310316
}
311317
}
312318
```
319+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BNLoiDNdqGSjrURl?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
320+
313321
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/Bridging)
314322

315323
>**Note:** Bridging support is not applicable for layout.
@@ -373,6 +381,8 @@ Corner radius rounds the corners of connectors. Set the radius using the [Corner
373381
}
374382
}
375383
```
384+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VXVoCjXHAGooRosb?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
385+
376386
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/CornerRadius)
377387

378388
![Blazor Diagram Connector with Corner Radius](../images/blazor-diagram-connector-with-corner-radious.png)
@@ -436,6 +446,8 @@ The following code example illustrates how to customize the segment appearance.
436446
}
437447
}
438448
```
449+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LNhoCNNxAmxqeFTF?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
450+
439451
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/SegmentAppearance)
440452

441453
## How to Enable or Disable Connector Behavior
@@ -494,7 +506,9 @@ The following code illustrates how to disable selection.
494506
}
495507
}
496508
```
497-
A complete working sample can be downloaded [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/Constraints)
509+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BNLIMXjnqwHvfxiD?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
510+
511+
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/Constraints)
498512

499513
## How to Add Additional Information for Connector
500514

@@ -550,6 +564,8 @@ A complete working sample can be downloaded [GitHub](https://github.com/Syncfusi
550564
}
551565
}
552566
```
567+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VZhysDZxAQmzMPsc?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
568+
553569
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/CustomProperty)
554570

555571
## How to Set Connector Z-Index
@@ -590,6 +606,8 @@ The following code illustrates how to render a connector based on stack order.
590606
}
591607
}
592608
```
609+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hjBIsZDnUcmuZCJG?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
610+
593611
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/ZIndexProperty)
594612

595613
## How to Set Hit Padding for Connector
@@ -633,6 +651,7 @@ The following code illustrates how to set hit padding for a connector.
633651
}
634652
}
635653
```
654+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BNLoCDXHUmlpTCKB?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
636655

637656
## How to Set Source Padding and Target Padding for Connector
638657

@@ -685,6 +704,8 @@ The following code example illustrates how to leave space between the connection
685704
}
686705
}
687706
```
707+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rDLSiZjRUwPlqeJk?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
708+
688709
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/SourcePaddingAndTargetPadding)
689710

690711
## How to Set Connection Padding for Connector
@@ -735,6 +756,8 @@ The following code example illustrates how to set connection padding for a conne
735756
}
736757
}
737758
```
759+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BDBIMZZHAQYodScU?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
760+
738761
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/ConnectionPadding)
739762

740763
## How to enable Connector Split
@@ -814,6 +837,8 @@ The following code illustrates how to enable connector splitting and create conn
814837
}
815838
}
816839
```
840+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LNVSsNXnqvDymRvy?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
841+
817842
![ConnectorSplitting](../images/ConnectorSplitDemo.gif)
818843

819844
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Interaction)
@@ -872,6 +897,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
872897
}
873898
}
874899
```
900+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rNBSMXDnAFShGTba?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
901+
875902
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/MaxSegmentThumb).
876903

877904
![MaxSegmentThumbs](../images/MaxSegmentThumb.png)
@@ -963,6 +990,7 @@ The following example demonstrates how to update the `MaxSegmentThumbs` value at
963990
}
964991
965992
```
993+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZhoCDtRUlyaTMHD?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
966994

967995
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Customization/MaxSegmentThumbRuntime).
968996

blazor/diagram/connectors/events.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ The following code example explains how to get the selection change event in the
8383
}
8484
}
8585
```
86+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BDhyCDtnzispxatP?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
87+
8688
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/SelectionChangeEvent).
8789

8890
## How to Handle Position Change Event
@@ -156,6 +158,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
156158
}
157159
}
158160
```
161+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VZrIWDjdJMBXdkEx?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
162+
159163
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/PositionChangeEvent).
160164

161165
## How to Handle Connection Change Event
@@ -238,6 +242,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
238242
}
239243
}
240244
```
245+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VDLSiZXnfsORuETx?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
246+
241247
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/ConnectionChangeEvent)
242248

243249
## How to Handle Source Point Change Event
@@ -296,6 +302,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
296302
}
297303
}
298304
```
305+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LXhICZXRfhZiGtIF?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
306+
299307
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/SourcePointChanged)
300308

301309
## How to Handle Target Point Change Event
@@ -354,6 +362,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
354362
}
355363
}
356364
```
365+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rZVSiXtHpVXnCpui?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
366+
357367
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/TargetPointChanged)
358368

359369
## How to Handle Connector Creating Event
@@ -405,6 +415,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
405415
}
406416
}
407417
```
418+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hXrIWXjdfViroMCT?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
419+
408420
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/ConnectorCreating)
409421

410422
## How to Handle Segment Collection Change Event
@@ -450,6 +462,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
450462
}
451463
}
452464
```
465+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hDBSMZXHTrpgeJhU?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
466+
453467
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/SegmentCollectionChangeEvent)
454468

455469
## How to Handle Collection Change Events
@@ -495,6 +509,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
495509
}
496510
}
497511
```
512+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LDVoCDNnpVAEjlgO?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
513+
498514
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/CollectionChangeEvent)
499515

500516
## How to Handle the Mouse Enter Event
@@ -532,6 +548,8 @@ The [MouseEnter](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram
532548
}
533549
}
534550
```
551+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rtVoCjXHTrIsWtog?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
552+
535553
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/MouseEnterEvent)
536554

537555
## How to Handle the Mouse Leave Event
@@ -569,6 +587,8 @@ The [MouseLeave](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/t
569587
}
570588
}
571589
```
590+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BDhSWNXnJLoppsUR?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
591+
572592
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/MouseLeaveEvent).
573593

574594
## How to Handle the Mouse Hover Event
@@ -606,6 +626,8 @@ The [MouseHover](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/t
606626
}
607627
}
608628
```
629+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BDroiZXnJhdsQvix?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
630+
609631
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/MouseHoverEvent).
610632

611633
## How to Handle Property Changed Event
@@ -649,6 +671,8 @@ The [Property Changed](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.D
649671
}
650672
}
651673
```
674+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rtrIsNNxfhRxEZXL?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
675+
652676
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Connectors/Events/PropertyChangedEvent)
653677

654678

0 commit comments

Comments
 (0)