|
1 | 1 | --- |
2 | 2 | layout: post |
3 | | -title: Appointment customization in Blazor Scheduler Component | Syncfusion |
| 3 | +title: Appointment Customization in Blazor Scheduler Component | Syncfusion |
4 | 4 | description: Checkout and learn here all about appointment customization in Syncfusion Blazor Scheduler component. |
5 | 5 | platform: Blazor |
6 | 6 | control: Scheduler |
7 | 7 | documentation: ug |
8 | 8 | --- |
9 | 9 |
|
10 | | -# Appointment customization |
| 10 | +# Appointment Customization in Blazor Scheduler Component |
11 | 11 |
|
12 | 12 | The look and feel of the Scheduler events can be customized using any one of the following ways. |
13 | 13 |
|
14 | 14 | * [Using event template](#using-template) |
15 | 15 | * [Using EventRendered event](#using-eventrendered-event) |
16 | 16 | * [Using CssClass property](#using-cssclass) |
17 | 17 |
|
18 | | -## Using template |
| 18 | +## Using Template |
19 | 19 |
|
20 | | -Any kind of text, images and links can be added to customize the look of the events. The user can format and change the default appearance of the events by making use of the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.ScheduleEventSettings-1.html#Syncfusion_Blazor_Schedule_ScheduleEventSettings_1_Template) option available within the `ScheduleEventSettings` tag helper. |
| 20 | +An event template provides full control over the rendering of each appointment's content. Text, images, links, and even other Blazor components can be dynamically added to customize the look of events. This is achieved using the [`Template`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.ScheduleEventSettings-1.html#Syncfusion_Blazor_Schedule_ScheduleEventSettings_1_Template) option available within the `ScheduleEventSettings` property. |
21 | 21 |
|
22 | | -To get start quickly on customizing events using template, you can check on this video: |
| 22 | +To get started quickly customizing events using a template, refer to this video: |
23 | 23 |
|
24 | 24 | {% youtube |
25 | 25 | "youtube:https://www.youtube.com/watch?v=8kBXcBjL12A"%} |
@@ -68,11 +68,15 @@ The following code example customizes the appointment. |
68 | 68 | } |
69 | 69 | ``` |
70 | 70 |
|
| 71 | +{% previewsample "https://blazorplayground.syncfusion.com/embed/hZLICjtdhIoxxqEi?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
| 72 | + |
| 73 | + |
| 74 | + |
71 | 75 | N> All the built-in fields that are mapped to the appropriate field properties within the `ScheduleEventSettings`, as well as custom mapped fields from the Scheduler dataSource can be accessed within the template code. |
72 | 76 |
|
73 | | -## Using EventRendered event |
| 77 | +## Using EventRendered Event |
74 | 78 |
|
75 | | -The [EventRendered](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.ScheduleEvents-1.html#Syncfusion_Blazor_Schedule_ScheduleEvents_1_EventRendered) event triggers before the appointment renders on the Scheduler. Therefore, this event can be utilized to customize the look of events based on any specific criteria, before rendering them on the scheduler. |
| 79 | +The [EventRendered](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.ScheduleEvents-1.html#Syncfusion_Blazor_Schedule_ScheduleEvents_1_EventRendered) event triggers just before each appointment is rendered on the Scheduler. This event is highly versatile and can be used to dynamically customize the visual appearance of events based on specific criteria or conditions. |
76 | 80 |
|
77 | 81 | In the following code example, the custom class has been added to events using [CssClasses](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.EventRenderedArgs-1.html#Syncfusion_Blazor_Schedule_EventRenderedArgs_1_CssClasses) to apply color to the events. |
78 | 82 |
|
@@ -122,8 +126,11 @@ In the following code example, the custom class has been added to events using [ |
122 | 126 | } |
123 | 127 | </style> |
124 | 128 | ``` |
| 129 | +{% previewsample "https://blazorplayground.syncfusion.com/embed/BtrosjDHBybiXDhd?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
125 | 130 |
|
126 | | -Also, we can customize the events by adding or modifying its element attribute using [Attributes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.EventRenderedArgs-1.html#Syncfusion_Blazor_Schedule_EventRenderedArgs_1_Attributes). In the following code example, event attributes have been modified through the `Attributes` to apply color to the events. |
| 131 | + |
| 132 | + |
| 133 | +Events can also be customized by adding or modifying its element attribute using [Attributes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.EventRenderedArgs-1.html#Syncfusion_Blazor_Schedule_EventRenderedArgs_1_Attributes). In the following code example, event attributes have been modified through the `Attributes` to apply color to the events. |
127 | 134 |
|
128 | 135 | ```cshtml |
129 | 136 | @using Syncfusion.Blazor.Schedule |
@@ -166,8 +173,11 @@ Also, we can customize the events by adding or modifying its element attribute u |
166 | 173 | } |
167 | 174 | } |
168 | 175 | ``` |
| 176 | +{% previewsample "https://blazorplayground.syncfusion.com/embed/LNVSWtNxVnDNNdNI?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
| 177 | + |
| 178 | + |
169 | 179 |
|
170 | | -## Using CssClass |
| 180 | +## Using CssClass |
171 | 181 |
|
172 | 182 | The customization of events can also be achieved using the built-in field [CssClass](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.SfSchedule-1.html#Syncfusion_Blazor_Schedule_SfSchedule_1_CssClass) in which you can pass the class name to be applied to specific appointments. In the following example, the background of appointments has been changed. |
173 | 183 |
|
@@ -220,6 +230,9 @@ The customization of events can also be achieved using the built-in field [CssCl |
220 | 230 | } |
221 | 231 | </style> |
222 | 232 | ``` |
| 233 | +{% previewsample "https://blazorplayground.syncfusion.com/embed/LZLoWXtxBdWIIoLL?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
| 234 | + |
| 235 | + |
223 | 236 |
|
224 | 237 | Also, the customization of events can be achieved using [CssClass](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.SfSchedule-1.html#Syncfusion_Blazor_Schedule_SfSchedule_1_CssClass) property of the Scheduler. In the following example, the background of appointments has been changed using the CssClass. |
225 | 238 |
|
@@ -268,4 +281,8 @@ Also, the customization of events can be achieved using [CssClass](https://help. |
268 | 281 | </style> |
269 | 282 | ``` |
270 | 283 |
|
| 284 | +{% previewsample "https://blazorplayground.syncfusion.com/embed/hjBSWNDnVdhFnoie?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
| 285 | + |
| 286 | + |
| 287 | + |
271 | 288 | N> The events can't be customized using the styles that are `height`, `width`, `top`, `left`, `right`, and `display`. |
0 commit comments