# Special Slots

The Telerik UI for .NET MAUI Scheduler control exposes an option to define the special and read-only slots and apply different styles to them. You need to prepare a collection of `Slot` objects and assign it to the `SpecialSlotsSource` property of the corresponding view definition.

Every `Slot` has the following properties:

* `Start`(`DateTime`)—Defines the start date of the slot.
* `End`(`DateTime`)—Defines the end date of the slot.
* `ReccurencePattern`(`RecurrencePattern`)—Defines whether the slot will be displayed for repeating days.
* `IsReadOnly`(`bool`)—When set to `True` the slot is disabled.
* `TimeZone`(`TimeZoneInfo`)—Specifies the slot time zone.

Below you can find a quick example how to create special slots.

**1.** First, create a ViewModel class with a collection of `Slot` objects. In the example two repeating slots are added for rest hours during weekdays.

```C#
public class ViewModel
{
    public ViewModel()
    {
        this.RestHours = new ObservableCollection<Slot>();

        var today = DateTime.Today;
        var dailyRecurrence = new RecurrencePattern()
        {
            DaysOfWeekMask = RecurrenceDays.WeekDays,
            Frequency = RecurrenceFrequency.Weekly,
            MaxOccurrences = 30
        };

        this.RestHours.Add(new Slot(today.AddHours(12), today.AddHours(13))
        {
            RecurrencePattern = dailyRecurrence,
            IsReadOnly = true
        });

        this.RestHours.Add(new Slot(today.AddHours(16), today.AddHours(16).AddMinutes(15))
        {
            RecurrencePattern = dailyRecurrence
        });
    }

    public ObservableCollection<Slot> RestHours { get; set; }
}
```

**2.** Then, add `RadScheduler` definition with some sample views with `SpecialSource` property applied:

```XAML
<telerik:RadScheduler x:Name="scheduler">
    <telerik:RadScheduler.ViewDefinitions>
        <telerik:DayViewDefinition SpecialSlotsSource="{Binding RestHours}" />
        <telerik:MultidayViewDefinition VisibleDays="3" Title="3 Day" SpecialSlotsSource="{Binding RestHours}" />
    </telerik:RadScheduler.ViewDefinitions>
</telerik:RadScheduler>
```

**3.** Last step is to set the BindingContext to the ViewModel class:

```C#
this.BindingContext = new ViewModel();
```

Check in the image below how the special slots look in MultiDay View:

![Telerik .NET MAUI Scheduler Special Slots](https://www.telerik.com/maui-ui/documentation/assets/4fa54ee671206d0f31e1b437f0474d03/scheduler-special-slots.png)

## See Also

* [Special Slots Template](https://www.telerik.com/maui-ui/documentation/controls/scheduler/specialslots/special-slot-template)
* [Views](https://www.telerik.com/maui-ui/documentation/controls/scheduler/views/overview)
* [Non-Working Hours](https://www.telerik.com/maui-ui/documentation/knowledge-base/scheduler-net-maui-non-working-hours)
