<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.CalendarPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:sc="clr-namespace:SamplesCommon;assembly=SamplesCommon"
    mc:Ignorable="d">

    <ScrollViewer>
        <ui:SimpleStackPanel Margin="{StaticResource ControlPageContentMargin}">
            <sc:ControlExample HeaderText="A basic calendar.">
                <Calendar
                    x:Name="calendar"
                    VerticalAlignment="Top" />
                <sc:ControlExample.Options>
                    <ui:SimpleStackPanel Style="{StaticResource OptionsPanelStyle}">
                        <CheckBox
                            Content="IsTodayHighlighted"
                            IsChecked="{Binding ElementName=calendar, Path=IsTodayHighlighted}" />
                        <CheckBox
                            Content="IsEnabled"
                            IsChecked="{Binding ElementName=calendar, Path=IsEnabled}" />
                        <ComboBox
                            ui:ControlHelper.Header="SelectionMode"
                            ItemsSource="{Binding Source={x:Type CalendarSelectionMode}, Converter={StaticResource EnumValuesConverter}}"
                            SelectedItem="{Binding ElementName=calendar, Path=SelectionMode}" />
                        <Button
                            Content="Make past dates not selectable"
                            Click="AddDatesInPastToBlackoutDates" />
                    </ui:SimpleStackPanel>
                </sc:ControlExample.Options>
            </sc:ControlExample>
        </ui:SimpleStackPanel>
    </ScrollViewer>
</ui:Page>
