<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.DatePickerPage"
    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 Style="{StaticResource ControlPageContentPanelStyle}">
            <sc:ControlExample HeaderText="DatePicker with a header and placeholder text.">
                <DatePicker
                    x:Name="datePicker"
                    VerticalAlignment="Top"
                    ui:ControlHelper.Header="Calendar"
                    ui:ControlHelper.PlaceholderText="Pick a date" />

                <sc:ControlExample.Options>
                    <ui:SimpleStackPanel Style="{StaticResource OptionsPanelStyle}">
                        <TextBox
                            ui:ControlHelper.Header="Header"
                            Text="{Binding ElementName=datePicker, Path=(ui:ControlHelper.Header), UpdateSourceTrigger=PropertyChanged}" />

                        <TextBox
                            ui:ControlHelper.Header="PlaceholderText"
                            Text="{Binding ElementName=datePicker, Path=(ui:ControlHelper.PlaceholderText), UpdateSourceTrigger=PropertyChanged}" />

                        <TextBox
                            ui:ControlHelper.Header="Description"
                            Text="{Binding ElementName=datePicker, Path=(ui:ControlHelper.Description), UpdateSourceTrigger=PropertyChanged}" />

                        <DatePicker
                            ui:ControlHelper.Header="DisplayDateStart"
                            SelectedDate="{Binding ElementName=datePicker, Path=DisplayDateStart}" />

                        <DatePicker
                            ui:ControlHelper.Header="DisplayDateEnd"
                            SelectedDate="{Binding ElementName=datePicker, Path=DisplayDateEnd}" />

                        <CheckBox
                            Content="IsTodayHighlighted"
                            IsChecked="{Binding ElementName=datePicker, Path=IsTodayHighlighted}" />

                        <CheckBox
                            Content="IsDropDownOpen"
                            IsChecked="{Binding ElementName=datePicker, Path=IsDropDownOpen}" />

                        <Button
                            Content="Blackout dates in the past"
                            Click="BlackoutDatesInPast" />

                        <CheckBox
                            Content="IsEnabled"
                            IsChecked="{Binding ElementName=datePicker, Path=IsEnabled}" />
                    </ui:SimpleStackPanel>
                </sc:ControlExample.Options>
            </sc:ControlExample>
        </ui:SimpleStackPanel>
    </ScrollViewer>

</ui:Page>
