# scheduler-appointment

> SfSchedule with appointment customization, DataTemplates for events, and appointment binding.

**Framework:** wpf  **Component:** Scheduler  **Variant:** appointment

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/wpf/scheduler-appointment.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.SfScheduler.WPF
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/scheduler-appointment/Scheduler.xaml

```xaml
<UserControl x:Class="syncfusion.schedulerdemos.wpf.Appointment.Scheduler"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:interactivity="http://schemas.microsoft.com/xaml/behaviors"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        xmlns:local="clr-namespace:syncfusion.schedulerdemos.wpf" Unloaded="OnSampleUnloaded">

    <UserControl.DataContext>
        <local:AppointmentViewModel/>
    </UserControl.DataContext>

    <UserControl.Resources>
        <local:ImageTemplateSelector x:Key="imageTemplateSelector"/>

        <DataTemplate x:Key="appointmentTemplate">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.2*"/>
                    <RowDefinition Height="0.7*"/>
                    <RowDefinition Height="0.1*"/>
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Vertical" Background="{Binding Data.Color}" >
                    <TextBlock Text="{Binding Data.EventName}" TextTrimming="CharacterEllipsis" FontSize="12" FontWeight="Medium" Margin="5,10,0,0"/>
                    <TextBlock Text="{Binding Data.TimeValue}" FontSize="8" Margin="5,5,0,0"/>
                </StackPanel>
                <StackPanel Grid.Row="1" Orientation="Vertical" Background="{Binding Data.Color}" Opacity="0.8" >
                    <Label Height="60" Margin="0,10,0,0" ContentTemplate="{Binding Data.EventName, Converter={StaticResource imageTemplateSelector}}" HorizontalContentAlignment="Center"/>
                    <TextBlock Text="{Binding Data.Notes}" TextWrapping="WrapWithOverflow" Margin="3,10,0,0" FontSize="10" />
                </StackPanel>
                <Border Grid.Row="2"  Background="{Binding Data.Color}"/>
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="monthAppointmentTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="12"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border Grid.Column="0" Background="{Binding Data.Color}" Height="8" Width="8" CornerRadius="4" Margin="3,0,0,0"/>
                <TextBlock Grid.Column="1" Foreground="Black" FontSize="10" VerticalAlignment="Center" Margin="3,0,0,0" TextTrimming="CharacterEllipsis">
                    <TextBlock.Text>
                        <MultiBinding StringFormat="{}{0} {1}">
                            <Binding Path="Data.TimeValue" />
                            <Binding Path="Data.EventName" />
                        </MultiBinding>
                    </TextBlock.Text>
                </TextBlock>
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="timelineAppointmentTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.05*"/>
                    <ColumnDefinition Width="0.95*"/>
                </Grid.ColumnDefinitions>
                <Border Grid.Column="0" Background="{Binding Data.Color}" />
                <Border Grid.Column="1" Background="{Binding Data.Color}" Opacity="0.8">
                    <TextBlock TextAlignment="Center" Text="{Binding Data.EventName}" FontSize="10" FontWeight="Bold" HorizontalAlignment="Center"  VerticalAlignment="Center" />
                </Border>
            </Grid>
        </DataTemplate>
    </UserControl.Resources>

    <syncfusion:SfScheduler x:Name="Schedule" ShowBusyIndicator="True" BorderThickness="0"
                            ViewType="Week"
                            DisplayDate="{Binding DisplayDate}" AppointmentEditFlag="None"
                            AllowedViewTypes="Month,Week,WorkWeek">

        <syncfusion:SfScheduler.MonthViewSettings>
            <syncfusion:MonthViewSettings AppointmentDisplayMode="Appointment"
                                          AppointmentDisplayCount="2"
                                          AppointmentTemplate="{StaticResource monthAppointmentTemplate}">
            </syncfusion:MonthViewSettings>
        </syncfusion:SfScheduler.MonthViewSettings>

        <syncfusion:SfScheduler.DaysViewSettings>
            <syncfusion:DaysViewSettings AppointmentTemplate="{StaticResource appointmentTemplate}"
                                         MinimumAppointmentDuration="0:30:0"/>
        </syncfusion:SfScheduler.DaysViewSettings>

        <syncfusion:SfScheduler.TimelineViewSettings>
            <syncfusion:TimelineViewSettings AppointmentTemplate="{StaticResource timelineAppointmentTemplate}"
                                             MinimumAppointmentDuration="0:30:0"/>
        </syncfusion:SfScheduler.TimelineViewSettings>

        <syncfusion:SfScheduler.AppointmentMapping>
            <syncfusion:AppointmentMapping StartTime="From"
                                           EndTime="To"
                                           Subject="EventName"
                                           AppointmentBackground="Color"
                                           StartTimeZone="StartTimeZone"
                                           EndTimeZone="EndTimeZone"
                                           IsAllDay="IsAllDay"
                                           RecurrenceExceptionDates="RecurrenceExceptions"
                                           RecurrenceRule="RecurrenceRule"
                                           RecurrenceId="RecurrenceId"/>
        </syncfusion:SfScheduler.AppointmentMapping>
        <interactivity:Interaction.Behaviors>
            <local:AppointmentCustomizationBehavior />
        </interactivity:Interaction.Behaviors>
    </syncfusion:SfScheduler>
</UserControl>

```
