Skip to content

Commit 7f0d20d

Browse files
Revamping the Ug
1 parent 9571e57 commit 7f0d20d

File tree

7 files changed

+146
-5
lines changed

7 files changed

+146
-5
lines changed

blazor/diagram/scroll-settings.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ In the following example, the vertical scroll bar is scrolled down by 50 px and
3636
</ScrollSettings>
3737
</SfDiagramComponent>
3838
```
39+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LNhysjXFTzpvVLgh?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
40+
3941
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/ScrollSettings/ScrollSettings)
4042
## How to Update Scroll Status
4143

@@ -64,6 +66,8 @@ Programmatically change the scroll offsets at runtime by using the external butt
6466
}
6567
}
6668
```
69+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BZVIWNDFzfeFyPFB?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
70+
6771
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/ScrollSettings/ScrollStatus)
6872

6973
## How to Handle the Scroll Changed Event
@@ -103,6 +107,7 @@ The Diagram control provides the following event for scroll settings.
103107
104108
}
105109
```
110+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LthesDXvffnSfzKV?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
106111

107112
## How to Enable or Disable Auto Scroll
108113
Autoscroll feature automatically scrolls the Diagram whenever the Node or Connector is moved beyond the boundary of the diagram. So that, it is always visible during dragging, resizing, and multiple selection operations. Autoscroll is automatically triggered when any one of the following is done towards the edges of the Diagram:
@@ -167,6 +172,7 @@ The auto-scroll behavior in the diagram can be enabled or disabled by using the
167172
}
168173
}
169174
```
175+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BjrIsZNlpJHYSVvY?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
170176

171177
The auto-scrolling region is limited using [ScrollLimit](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.ScrollSettings.html#Syncfusion_Blazor_Diagram_ScrollSettings_ScrollLimit) property of the [ScrollSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.ScrollSettings.html) class.Please refer [ScrollLimit](scroll-settings#scroll-limit) page for more details about ScrollLimit.
172178

@@ -219,6 +225,7 @@ The following example illustrates how to set auto scroll padding.
219225
}
220226
}
221227
```
228+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNBIWttvzTGEtyEB?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
222229

223230
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/ScrollSettings/AutoScrollPadding)
224231

@@ -248,6 +255,8 @@ The following example illustrates how to specify the scroll limit.
248255
}
249256
250257
```
258+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rtryiNXPzflwBSak?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
259+
251260
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/ScrollSettings/ScrollLimit)
252261

253262
To explore about the options , refer [ScrollLimitMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.ScrollLimitMode.html).
@@ -299,16 +308,18 @@ The following example illustrates how to sets scroll padding.
299308
}
300309
}
301310
```
302-
![Scoll Padding support for node](images/ScrollPadding.png)
311+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BtVSCZDFJpkPdyYI?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
303312

304313
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/ScrollSettings/ScrollPadding)
305314

315+
![Scoll Padding support for node](images/ScrollPadding.png)
316+
306317
## How to Restrict Scrollable Area
307318
Scrolling beyond any particular rectangular area can be restricted using the [ScrollableArea](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.ScrollSettings.html#Syncfusion_Blazor_Diagram_ScrollSettings_ScrollableArea) property of scroll settings. To restrict scrolling beyond any custom region, set [ScrollLimit](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.ScrollSettings.html#Syncfusion_Blazor_Diagram_ScrollSettings_ScrollLimit) as “limited.” The following code example illustrates how to customize the scrollable area.
308319

309320
```cshtml
310321
@using Syncfusion.Blazor.Diagram
311-
<SfDiagramComponent Width="50%" Height="300px" Nodes="@nodes">
322+
<SfDiagramComponent Width="70%" Height="300px" Nodes="@nodes">
312323
<ScrollSettings ScrollableArea="@scrollableArea" ScrollLimit="ScrollLimitMode.Limited">
313324
</ScrollSettings>
314325
</SfDiagramComponent>
@@ -339,6 +350,8 @@ Scrolling beyond any particular rectangular area can be restricted using the [Sc
339350
}
340351
}
341352
```
353+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hjLeCZjlJesCAUEE?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
354+
342355
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/ScrollSettings/ScrollableArea)
343356
## How to Handle Scroll Settings Property Changes Using Callback Methods
344357

@@ -367,6 +380,8 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
367380
}
368381
}
369382
```
383+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BXLysZDlzSiITIbl?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
384+
370385
## See also
371386

372387
* [How to Detect Nodes That Cross Page Breaks in Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Diagram](https://support.syncfusion.com/kb/article/20111/how-to-detect-nodes-that-cross-page-breaks-in-syncfusion-blazor-diagram)

blazor/diagram/shapes.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ The following code illustrates how to create a text node.
5858
}
5959
}
6060
```
61-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/TextNode)
61+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LXVeMjjvpHHwFbIZ?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
62+
63+
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/TextNode)
6264

6365
![Text Node in Blazor Diagram](images/blazor-diagram-TextNode.png)
6466

@@ -94,13 +96,15 @@ The following code illustrates how an image node is created.
9496
{
9597
Type = NodeShapes.Image,
9698
//Sets the source to the image shape
97-
Source = "/diagram/images/productmanager.png"
99+
Source = "https://cdn.syncfusion.com/content/images/company-logos/Syncfusion_Logo_Image.png"
98100
}
99101
};
100102
nodes.Add(node);
101103
}
102104
}
103105
```
106+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rNByCDZOBKhUldMd?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
107+
104108
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/ImageShape)
105109

106110
![Image Node in Blazor Diagram](images/blazor-diagram-image-node.png)
@@ -143,6 +147,8 @@ The following code illustrates how to add a Base64 image to the image node.
143147
}
144148
}
145149
```
150+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LDBICDtlzdkNlPxo?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
151+
146152
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/Base64image)
147153

148154
![Base64 Image Node in Blazor Diagram](images/blazor-diagram-base64-image-node.png)
@@ -189,6 +195,8 @@ Stretch and align the image content anywhere but within the node boundary. The [
189195
}
190196
}
191197
```
198+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BNryMtjFfxupxJNV?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
199+
192200
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/ImageAlign)
193201

194202
* [ImageAlign](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.ImageShape.html#Syncfusion_Blazor_Diagram_ImageShape_ImageAlign) property of the shape helps to align the image based on the x and y values in the node boundary. The following table illustrates the various image alignments in the node boundary.
@@ -294,6 +302,8 @@ HTML elements can be embedded in the diagram by setting the node Shape type to [
294302
}
295303
}
296304
```
305+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hXheMZZvpQZVXgoy?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
306+
297307
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/HTMLShape)
298308

299309
![HTML Node Template in Blazor Diagram](images/blazor-diagram-html-node-template.png)
@@ -342,6 +352,8 @@ The following code example illustrates how to create a basic shape.
342352
}
343353
}
344354
```
355+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LNrosZDvfQBMblZv?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
356+
345357
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/BasicShape)
346358

347359
N> By default, the [Shape](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Node.html#Syncfusion_Blazor_Diagram_Node_Shape) property of the node is set as **Basic**. Default property for Shape is Rectangle.
@@ -393,6 +405,8 @@ To create a path node, set the shape as **Path**. The [Data](https://help.syncfu
393405
};
394406
}
395407
```
408+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZrSiXNFzQVQgiZR?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
409+
396410
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/PathShape)
397411

398412
![Path Shape Node in Blazor Diagram](images/blazor-diagram-path-shape-node.png)
@@ -434,6 +448,8 @@ The [Flow](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.FlowS
434448
}
435449
}
436450
```
451+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LXrSitZPfwqrXoFd?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
452+
437453
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/FlowShape)
438454

439455
The list of flow shapes are as follows.
@@ -491,6 +507,8 @@ The diagram provides support to embed SVG element into a node. The Shape propert
491507
}
492508
}
493509
```
510+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LXBeWXXlpcUFFGvt?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
511+
494512
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/SVGShape)
495513

496514
![SVG Node in Blazor Diagram](images/blazor-diagram-svg-node.png)
@@ -537,6 +555,8 @@ The following code example illustrates how to create a BPMN shape.
537555
}
538556
}
539557
```
558+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rtryCXjbzmprSCAB?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
559+
540560
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes)
541561

542562
For more information about node constraints, refer to the [BPMN Shapes](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Shapes/BPMNShape).

0 commit comments

Comments
 (0)