New to Telerik UI for .NET MAUI? Start a free 30-day trial

SpecialSlot Template

By default the special slots are marked with a different background, so that they are easily noticable across the view. In addition you can show a content of your choice inside special slots through the SpecialSlotTemplate property of the view definitions.

  • SpecialSlotTemplate(DataTemplate)—Defines the template of the special slots.

Here is a quick example how to apply a custom slot template to the Scheduler:

1. Add the template to the page resources:

<DataTemplate x:Key="RestHoursTemplate">
    <Grid IsClippedToBounds="True"
          ColumnDefinitions="Auto, *"
        <Label Text="&#xe834;"
               VerticalTextAlignment="Center" />
        <Label Grid.Column="1"
               Text="Coffee break"
               VerticalTextAlignment="Center" />

2. Add the Scheduler definition with the SpecialSlotTemplate applied:

<telerik:RadScheduler x:Name="scheduler">
        <telerik:DayViewDefinition SpecialSlotsSource="{Binding RestHours}"
                                   SpecialSlotTemplate="{StaticResource RestHoursTemplate}" />
        <telerik:MultidayViewDefinition VisibleDays="3" 
                                        Title="3 Day" 
                                        SpecialSlotsSource="{Binding RestHours}"
                                        SpecialSlotTemplate="{StaticResource RestHoursTemplate}" />

Check the image below which shows the applied SpecialSlotTemplate:

Telerik .NET MAUI Scheduler Special Slot Template

See Also

In this article