Skip to content

Commit e912793

Browse files
Merge pull request #7134 from syncfusion-content/985195-UG
Update preview sample output of Blazor components UG documentation
2 parents ba42bc5 + 1cf869a commit e912793

File tree

148 files changed

+578
-1098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+578
-1098
lines changed

blazor-toc.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,9 @@
16101610
<li>
16111611
<a href="/blazor/chip/types">Types</a>
16121612
</li>
1613+
<li>
1614+
<a href="/blazor/chip/events">Events</a>
1615+
</li>
16131616
<li>
16141617
<a href="/blazor/chip/customization">Customization</a>
16151618
</li>

blazor/chip/events.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---
2+
layout: post
3+
title: Events in Blazor Chip Component | Syncfusion
4+
description: Explore events in Syncfusion Blazor Chip component including Created, Deleted, Destroyed, OnBeforeClick, OnClick, OnDelete, and SelectionChanged events.
5+
platform: Blazor
6+
control: Chip
7+
documentation: ug
8+
---
9+
10+
# Events in Blazor Chip Component
11+
12+
This section explains the list of events of the Chip component which will be triggered for appropriate Chip actions.
13+
14+
## Created
15+
16+
The `Created` event triggers when the Chip component rendering is completed.
17+
18+
```cshtml
19+
@using Syncfusion.Blazor.Buttons
20+
21+
<SfChip Selection="SelectionType.Multiple" Created="@OnCreated">
22+
<ChipItems>
23+
<ChipItem Text="Small"></ChipItem>
24+
<ChipItem Text="Medium"></ChipItem>
25+
<ChipItem Text="Large"></ChipItem>
26+
<ChipItem Text="Extra Large"></ChipItem>
27+
</ChipItems>
28+
</SfChip>
29+
30+
@code {
31+
private void OnCreated(object args)
32+
{
33+
// Write your code here
34+
}
35+
}
36+
```
37+
## Deleted
38+
39+
The `Deleted` event triggers when a chip item is deleted.
40+
41+
```cshtml
42+
@using Syncfusion.Blazor.Buttons
43+
44+
<SfChip Selection="SelectionType.Multiple" EnableDelete="true">
45+
<ChipItems>
46+
<ChipItem Text="Small"></ChipItem>
47+
<ChipItem Text="Medium"></ChipItem>
48+
<ChipItem Text="Large"></ChipItem>
49+
<ChipItem Text="Extra Large"></ChipItem>
50+
</ChipItems>
51+
<ChipEvents Deleted="@OnDeleted"></ChipEvents>
52+
</SfChip>
53+
54+
@code {
55+
private void OnDeleted(ChipDeletedEventArgs args)
56+
{
57+
// Write your code here
58+
}
59+
}
60+
```
61+
## Destroyed
62+
63+
The `Destroyed` event triggers when the Chip component is disposed.
64+
65+
```cshtml
66+
@using Syncfusion.Blazor.Buttons
67+
68+
<SfChip Selection="SelectionType.Multiple" Destroyed="@OnDestroyed">
69+
<ChipItems>
70+
<ChipItem Text="Small"></ChipItem>
71+
<ChipItem Text="Medium"></ChipItem>
72+
<ChipItem Text="Large"></ChipItem>
73+
<ChipItem Text="Extra Large"></ChipItem>
74+
</ChipItems>
75+
</SfChip>
76+
77+
@code {
78+
private void OnDestroyed(object args)
79+
{
80+
// Write your code here
81+
}
82+
}
83+
```
84+
## OnBeforeClick
85+
86+
The `OnBeforeClick` event triggers before a chip is clicked.
87+
88+
```cshtml
89+
@using Syncfusion.Blazor.Buttons
90+
91+
<SfChip Selection="SelectionType.Multiple">
92+
<ChipItems>
93+
<ChipItem Text="Small"></ChipItem>
94+
<ChipItem Text="Medium"></ChipItem>
95+
<ChipItem Text="Large"></ChipItem>
96+
<ChipItem Text="Extra Large"></ChipItem>
97+
</ChipItems>
98+
<ChipEvents OnBeforeClick="@OnBeforeChipClick"></ChipEvents>
99+
</SfChip>
100+
101+
@code {
102+
private void OnBeforeChipClick(ChipEventArgs args)
103+
{
104+
// Write your code here
105+
}
106+
}
107+
```
108+
109+
## OnClick
110+
111+
The `OnClick` event triggers when a chip is clicked.
112+
113+
```cshtml
114+
@using Syncfusion.Blazor.Buttons
115+
116+
<SfChip Selection="SelectionType.Multiple">
117+
<ChipItems>
118+
<ChipItem Text="Small"></ChipItem>
119+
<ChipItem Text="Medium"></ChipItem>
120+
<ChipItem Text="Large"></ChipItem>
121+
<ChipItem Text="Extra Large"></ChipItem>
122+
</ChipItems>
123+
<ChipEvents OnClick="@OnChipClick"></ChipEvents>
124+
</SfChip>
125+
126+
@code {
127+
private void OnChipClick(ChipEventArgs args)
128+
{
129+
// Write your code here
130+
}
131+
}
132+
```
133+
## OnDelete
134+
135+
The `OnDelete` event triggers before removing the chip.
136+
137+
```cshtml
138+
@using Syncfusion.Blazor.Buttons
139+
140+
<SfChip Selection="SelectionType.Multiple" EnableDelete="true">
141+
<ChipItems>
142+
<ChipItem Text="Small"></ChipItem>
143+
<ChipItem Text="Medium"></ChipItem>
144+
<ChipItem Text="Large"></ChipItem>
145+
<ChipItem Text="Extra Large"></ChipItem>
146+
</ChipItems>
147+
<ChipEvents OnDelete="@OnChipDelete"></ChipEvents>
148+
</SfChip>
149+
150+
@code {
151+
private void OnChipDelete(ChipEventArgs args)
152+
{
153+
// Write your code here
154+
}
155+
}
156+
```
157+
## SelectionChanged
158+
159+
The `SelectionChanged` event triggers when the selected chips are changed.
160+
161+
```cshtml
162+
@using Syncfusion.Blazor.Buttons
163+
164+
<SfChip Selection="SelectionType.Multiple">
165+
<ChipItems>
166+
<ChipItem Text="Small"></ChipItem>
167+
<ChipItem Text="Medium"></ChipItem>
168+
<ChipItem Text="Large"></ChipItem>
169+
<ChipItem Text="Extra Large"></ChipItem>
170+
</ChipItems>
171+
<ChipEvents SelectionChanged="@OnSelectionChanged"></ChipEvents>
172+
</SfChip>
173+
174+
@code {
175+
private void OnSelectionChanged(SelectionChangedEventArgs args)
176+
{
177+
// Write your code here
178+
}
179+
}
180+
```
181+
182+

blazor/color-picker/how-to/customize-color-picker.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ By default, the Palette will be rendered with default colors. To load custom col
7676
</style>
7777
7878
```
79-
{% previewsample "https://blazorplayground.syncfusion.com/embed/BDrKsLhcASTCtgHM?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
80-
81-
![Blazor ColorPicker with Custom Palette](./../images/blazor-colorpicker-with-custom-palette.png)
79+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BDrKsLhcASTCtgHM?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Blazor ColorPicker with Custom Palette](./../images/blazor-colorpicker-with-custom-palette.png)" %}
8280

8381
## Hide input area from picker
8482

@@ -92,9 +90,7 @@ In the following sample, the Color Picker is rendered without input area.
9290
<h4>Choose a color</h4>
9391
<SfColorPicker ModeSwitcher="false" CssClass="e-hide-value"></SfColorPicker>
9492
```
95-
{% previewsample "https://blazorplayground.syncfusion.com/embed/LXhKMLLwqoJqULKi?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
96-
97-
![Hide Input Area in Blazor ColorPicker](./../images/blazor-colorpicker-hide-input.png)
93+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LXhKMLLwqoJqULKi?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Hide Input Area in Blazor ColorPicker](./../images/blazor-colorpicker-hide-input.png)" %}
9894

9995
## Custom handle
10096

@@ -126,6 +122,4 @@ The following sample shows the customized Color Picker handle.
126122
</style>
127123
128124
```
129-
{% previewsample "https://blazorplayground.syncfusion.com/embed/hjhKWrLGKyTIhQGO?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
130-
131-
![Customizing Blazor ColorPicker Handle Shape](./../images/blazor-colorpicker-handle-customization.png)
125+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hjhKWrLGKyTIhQGO?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Customizing Blazor ColorPicker Handle Shape](./../images/blazor-colorpicker-handle-customization.png)" %}

blazor/color-picker/how-to/disable-color-picker.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@ The following example shows the `Disabled` state of Color Picker component.
1919
<h4>Choose a color</h4>
2020
<SfColorPicker Disabled="true"></SfColorPicker>
2121
```
22-
{% previewsample "https://blazorplayground.syncfusion.com/embed/htLKsLrGgeJFrvZn?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
23-
24-
![Disable State in Blazor ColorPicker](./../images/blazor-colorpicker-disable-state.png)
22+
{% previewsample "https://blazorplayground.syncfusion.com/embed/htLKsLrGgeJFrvZn?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Disable State in Blazor ColorPicker](./../images/blazor-colorpicker-disable-state.png)" %}

blazor/color-picker/how-to/hide-control-buttons.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ Color Picker can be rendered without control buttons (Apply/Cancel). In this cas
1717
<h4>Choose a color</h4>
1818
<SfColorPicker ShowButtons="false"></SfColorPicker>
1919
```
20-
{% previewsample "https://blazorplayground.syncfusion.com/embed/hDhAWLBcqoIBqnae?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
21-
22-
![Hide Control Buttons in Blazor ColorPicker](./../images/blazor-colorpicker-hide-control.png)
20+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hDhAWLBcqoIBqnae?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Hide Control Buttons in Blazor ColorPicker](./../images/blazor-colorpicker-hide-control.png)" %}

blazor/color-picker/how-to/no-color-support.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ To achieve this, set [NoColor](https://help.syncfusion.com/cr/blazor/Syncfusion.
4040
</style>
4141
4242
```
43-
{% previewsample "https://blazorplayground.syncfusion.com/embed/VDVUsLLGKoIFoxSv?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
44-
45-
![Blazor ColorPicker with Default No Color](./../images/blazor-colorpicker-nocolor.png)
43+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VDVUsLLGKoIFoxSv?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Blazor ColorPicker with Default No Color](./../images/blazor-colorpicker-nocolor.png)" %}
4644

4745
>If the [NoColor](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfColorPicker.html#Syncfusion_Blazor_Inputs_SfColorPicker_NoColor) property is enabled, make sure to disable the [ModeSwitcher](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfColorPicker.html#Syncfusion_Blazor_Inputs_SfColorPicker_ModeSwitcher) property.
4846
@@ -130,6 +128,4 @@ The following sample shows the color palette with custom no color option.
130128
</style>
131129
132130
```
133-
{% previewsample "https://blazorplayground.syncfusion.com/embed/VthAsLLwAyxsVKHl?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
134-
135-
![Blazor ColorPicker with Custom No Color](./../images/blazor-colorpicker-custom-nocolor.png)
131+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VthAsLLwAyxsVKHl?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Blazor ColorPicker with Custom No Color](./../images/blazor-colorpicker-custom-nocolor.png)" %}

blazor/color-picker/how-to/render-palette-alone.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ In the following sample, the [ShowButtons](https://help.syncfusion.com/cr/blazor
1919
<h4>Choose a color</h4>
2020
<SfColorPicker Mode="ColorPickerMode.Palette" ModeSwitcher="false" ShowButtons="false"></SfColorPicker>
2121
```
22-
{% previewsample "https://blazorplayground.syncfusion.com/embed/LtLKiLLGUoxTFJzx?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
23-
24-
![Rendering Palette Alone in Blazor ColorPicker](./../images/blazor-colorpicker-with-palette-alone.png)
22+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LtLKiLLGUoxTFJzx?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Rendering Palette Alone in Blazor ColorPicker](./../images/blazor-colorpicker-with-palette-alone.png)" %}
2523

2624
N> To render `Picker` alone, specify the [Mode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfColorPicker.html#Syncfusion_Blazor_Inputs_SfColorPicker_Mode) property as 'Picker'.

blazor/color-picker/how-to/show-recent-color.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,4 @@ In the following sample, the [`ShowRecentColors`](https://help.syncfusion.com/cr
2121
<h4>Choose a color</h4>
2222
<SfColorPicker ShowRecentColors="true"></SfColorPicker>
2323
```
24-
{% previewsample "https://blazorplayground.syncfusion.com/embed/LtLKiLLGUoxTFJzx?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
25-
26-
![Rendering Show Recent color in Blazor ColorPicker](./../images/blazor-colorpicker-show-recent-color.png)
24+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LtLKiLLGUoxTFJzx?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Rendering Show Recent color in Blazor ColorPicker](./../images/blazor-colorpicker-show-recent-color.png)" %}

blazor/color-picker/inline-rendering.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ The following sample shows the inline type rendering of ColorPicker.
2020
<SfColorPicker Value="035a" Inline="true" ShowButtons="false"></SfColorPicker>
2121
```
2222

23-
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNVKsVrQgIVKJnGz?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
24-
25-
![Inline Rendering in Blazor ColorPicker](./images/blazor-colorpicker-inline-rendering.png)
23+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNVKsVrQgIVKJnGz?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Inline Rendering in Blazor ColorPicker](./images/blazor-colorpicker-inline-rendering.png)" %}
2624

2725
N> The `ShowButtons` property is disabled in this sample because the control buttons are not needed for inline type. To know about the control buttons functionality, refer to the [ShowButtons](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfColorPicker.html#Syncfusion_Blazor_Inputs_SfColorPicker_ShowButtons).

blazor/color-picker/localization.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ You can modify the default value in `.res` file added to Resource folder. Enter
2929
<SfColorPicker></SfColorPicker>
3030
3131
```
32-
{% previewsample "https://blazorplayground.syncfusion.com/embed/LZhKsVVwqSUTjofI?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
33-
34-
![Localization in Blazor ColorPicker](./images/blazor-colorpicker-localization.png)
32+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LZhKsVVwqSUTjofI?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Localization in Blazor ColorPicker](./images/blazor-colorpicker-localization.png)" %}
3533

3634
## RTL
3735

@@ -46,6 +44,4 @@ In the following example, Color Picker component is rendered in RTL mode with `a
4644
<SfColorPicker EnableRtl="true"></SfColorPicker>
4745
4846
```
49-
{% previewsample "https://blazorplayground.syncfusion.com/embed/LZBUsrLmqSKnHwGP?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
50-
51-
![Right to Left in Blazor ColorPicker](./images/blazor-colorpicker-right-to-left.png)
47+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LZBUsrLmqSKnHwGP?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Right to Left in Blazor ColorPicker](./images/blazor-colorpicker-right-to-left.png)" %}

0 commit comments

Comments
 (0)