# scheduler-fare-calendar

> Interactive fare calendar scheduler for airline pricing with special date highlighting.

**Framework:** wpf  **Component:** Scheduler  **Variant:** fare-calendar

## 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-fare-calendar.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-fare-calendar/Scheduler.xaml

```xaml
<UserControl x:Class="syncfusion.schedulerdemos.wpf.FareCalendar.Scheduler"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        xmlns:local="clr-namespace:syncfusion.schedulerdemos.wpf" Unloaded="OnSampleUnloaded">

    <UserControl.Resources>
        <syncfusion:TodayBorderSizeConverter x:Key="TodayBorderSizeConverter" FontSize="12"/>
        <local:ImageTemplateSelector x:Key="imageTemplateSelector"/>
        <DataTemplate x:Key="monthCellTemplateWithBestPrice">
            <Grid Background="LightYellow">
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.3*"/>
                    <RowDefinition Height="0.7*"/>
                </Grid.RowDefinitions>
                <Grid Width="Auto">
                    <Border x:Name="TodayHighlightBorder"
                            Margin="2,3,0,0"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            Width="{Binding Path=FontSize, Converter={StaticResource TodayBorderSizeConverter}}"
                            Height="{Binding Path=FontSize, Converter={StaticResource TodayBorderSizeConverter}}"
                            CornerRadius="{Binding Path=FontSize, Converter={StaticResource TodayBorderSizeConverter}}">
                        <TextBlock x:Name="TextBlock"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Center"
                                   Foreground="{Binding Foreground}"
                                   Text="{Binding Path=DateText}" />
                    </Border>
                    <Label Content="Best Price" Foreground="#000000" Background="#FFF066" FontSize="10" Width="53" Height="20" FontFamily="Roboto" VerticalAlignment="Top" HorizontalAlignment="Right" />
                </Grid>
                <Grid Grid.Row="1">
                    <ListView ItemsSource="{Binding Appointments}" Padding="0,5,0,0"
                              BorderThickness="0" HorizontalAlignment="Center"
                              Background="LightYellow" IsHitTestVisible="False"
                              ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                        <ListView.Resources>
                            <Style TargetType="GridViewColumnHeader">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </Style>
                        </ListView.Resources>
                        <ListView.View>
                            <GridView>
                                <GridViewColumn>
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <Grid Margin="0,-8,0,0" Background="LightYellow">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition />
                                                    <RowDefinition />
                                                </Grid.RowDefinitions>
                                                <TextBlock Grid.Row="0" Text="{Binding Notes}" FontSize="12" HorizontalAlignment="Center" FontWeight="Medium" Foreground="SteelBlue" Margin="5"/>
                                                <Grid Grid.Row="1" HorizontalAlignment="Center" Background="Transparent">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="0.3*"/>
                                                        <ColumnDefinition Width="0.7*"/>
                                                    </Grid.ColumnDefinitions>
                                                    <Label HorizontalAlignment="Left" ContentTemplate="{Binding Subject, Converter={StaticResource imageTemplateSelector}}"/>
                                                    <TextBlock Text="{Binding Subject}" Margin="0,5,0,0" TextTrimming="CharacterEllipsis" Grid.Column="1" HorizontalAlignment="Right" Foreground="Black" FontSize="12">
                                                        <TextBlock.Style>
                                                            <Style TargetType="TextBlock">
                                                                <Setter Property="Foreground" Value="{Binding Foreground}"/>
                                                            </Style>
                                                        </TextBlock.Style>
                                                    </TextBlock>
                                                </Grid>
                                            </Grid>
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                            </GridView>
                        </ListView.View>
                    </ListView>
                </Grid>
            </Grid>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding Path=DayType}" Value="Today">
                    <Setter TargetName="TodayHighlightBorder" Property="Background" Value="#FF2B579A"/>
                    <Setter TargetName="TextBlock" Property="Foreground" Value="White" />
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <DataTemplate x:Key="monthCellTemplateWithoutBestPrice">
            <Border BorderThickness="2">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0.3*"/>
                        <RowDefinition Height="0.7*"/>
                    </Grid.RowDefinitions>
                    <Grid Width="Auto">
                        <Border x:Name="TodayHighlightBorder"
                                Margin="2,3,0,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Width="{Binding Path=FontSize, Converter={StaticResource TodayBorderSizeConverter}}"
                                Height="{Binding Path=FontSize, Converter={StaticResource TodayBorderSizeConverter}}"
                                CornerRadius="{Binding Path=FontSize, Converter={StaticResource TodayBorderSizeConverter}}">
                            <TextBlock x:Name="TextBlock"
                                       HorizontalAlignment="Center"
                                       VerticalAlignment="Center"
                                       Foreground="{Binding Foreground}"
                                       Text="{Binding Path=DateText}" />
                        </Border>
                    </Grid>

                    <Grid Grid.Row="1" Background="Transparent">
                        <ListView ItemsSource="{Binding Appointments}"
                                  Padding="0,5,0,0"
                                  BorderThickness="0"
                                  HorizontalAlignment="Center"
                                  Background="Transparent"
                                  IsHitTestVisible="False"
                                  ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                            <ListView.Resources>
                                <Style TargetType="GridViewColumnHeader">
                                    <Setter Property="Visibility" Value="Collapsed" />
                                </Style>
                            </ListView.Resources>
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn>
                                        <GridViewColumn.CellTemplate>
                                            <DataTemplate>
                                                <Grid Margin="0,-8,0,0">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition />
                                                        <RowDefinition />
                                                    </Grid.RowDefinitions>
                                                    <TextBlock Grid.Row="0" Text="{Binding Notes}" FontSize="12" HorizontalAlignment="Center" FontWeight="Medium" Foreground="SteelBlue" Margin="5"/>
                                                    <Grid Grid.Row="1" Background="Transparent">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="0.3*"/>
                                                            <ColumnDefinition Width="0.7*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <Label HorizontalAlignment="Left" ContentTemplate="{Binding Subject, Converter={StaticResource imageTemplateSelector}}"/>
                                                        <TextBlock Text="{Binding Subject}" Margin="0,5,0,0" Grid.Column="1" TextTrimming="CharacterEllipsis" HorizontalAlignment="Right" Foreground="Black" FontSize="12">
                                                            <TextBlock.Style>
                                                                <Style TargetType="TextBlock">
                                                                    <Setter Property="Foreground" Value="{Binding Foreground}"/>
                                                                </Style>
                                                            </TextBlock.Style>
                                                        </TextBlock>
                                                    </Grid>
                                                </Grid>
                                            </DataTemplate>
                                        </GridViewColumn.CellTemplate>
                                    </GridViewColumn>
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </Grid>
                </Grid>
            </Border>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding Path=DayType}" Value="Today">
                    <Setter TargetName="TodayHighlightBorder" Property="Background" Value="#FF2B579A"/>
                    <Setter TargetName="TextBlock" Property="Foreground" Value="White" />
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>
    </UserControl.Resources>

    <Grid>
        <Grid.Resources>
            <local:MonthCellTemplateSelector x:Key="monthCellTemplateSelector" MonthCellWithBestPriceTemplate="{StaticResource monthCellTemplateWithBestPrice}" MonthCellWithoutBestPriceTemplate="{StaticResource monthCellTemplateWithoutBestPrice}"/>
        </Grid.Resources>
        <Grid.DataContext>
            <local:BindingViewModel/>
        </Grid.DataContext>
        <syncfusion:SfScheduler x:Name="Schedule" AppointmentEditFlag="None" BorderThickness="0"
                                ViewType="Month"
                                ItemsSource="{Binding MonthCellAppointments}"
                                MinimumDate="{Binding MinDate}"
                                MaximumDate="{Binding MaxDate}"
                                ShowBusyIndicator="True">
            <syncfusion:SfScheduler.MonthViewSettings>
                <syncfusion:MonthViewSettings AppointmentDisplayMode="None"
                                              MonthCellTemplateSelector="{StaticResource monthCellTemplateSelector}">
                </syncfusion:MonthViewSettings>
            </syncfusion:SfScheduler.MonthViewSettings>

            <syncfusion:SfScheduler.AppointmentMapping>
                <syncfusion:AppointmentMapping StartTime="From"
                                               EndTime="To"
                                               Subject="EventName"
                                               Notes="Notes"
                                               AppointmentBackground="Color"
                                               StartTimeZone="StartTimeZone"
                                               EndTimeZone="EndTimeZone"
                                               IsAllDay="IsAllDay"
                                               RecurrenceExceptionDates="RecurrenceExceptions"
                                               RecurrenceRule="RecurrenceRule"
                                               RecurrenceId="RecurrenceId"/>
            </syncfusion:SfScheduler.AppointmentMapping>
        </syncfusion:SfScheduler>
    </Grid>
</UserControl>

```
