<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="SchedulerSamples.Calendar" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:local="clr-namespace:SchedulerSamples">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/SchedulerSamples.4;component/CommonResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style x:Key="tbStyle" TargetType="{x:Type TextBlock}">
                <Setter Property="Margin" Value="3" />
                <Setter Property="Foreground" Value="{DynamicResource text_Brush}" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="405" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

		<Border Grid.Column="1">
            <ScrollViewer Style="{DynamicResource GralScrollViewer}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
            <Grid Margin="3,0,3,0" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource tbStyle}">Show Trailing Days</TextBlock>
                <CheckBox x:Name="chkShowTrailDate" Grid.Row="0" Grid.Column="1" IsChecked="True" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource tbStyle}">MaxSelectionCount</TextBlock>
                <c1:C1NumericBox Grid.Row="1" Grid.Column="1" Maximum="70" Minimum="1" Style="{DynamicResource inputStyle}" Value="{Binding MaxSelectionCount, ElementName=calendar1, Mode=TwoWay}" Format="##" />
                <TextBlock Grid.Row="2" Grid.Column="0" Style="{StaticResource tbStyle}">Background</TextBlock>
                <c1:C1ColorPicker x:Name="back" Grid.Row="2" Grid.Column="2" Padding="0" SelectedColor="White" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="3" Grid.Column="0" Style="{StaticResource tbStyle}">Foreground</TextBlock>
                <c1:C1ColorPicker x:Name="fore" Grid.Row="3" Grid.Column="2" Padding="0" SelectedColor="Black" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="4" Grid.Column="0" Style="{StaticResource tbStyle}">Border brush</TextBlock>
                <c1:C1ColorPicker x:Name="border" Grid.Row="4" Grid.Column="2" Padding="0" SelectedColor="#FF777676" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="5" Grid.Column="0" Style="{StaticResource tbStyle}">Trailing days</TextBlock>
                <c1:C1ColorPicker x:Name="trail" Grid.Row="5" Grid.Column="2" Padding="0" SelectedColor="LightGray" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="6" Grid.Column="0" Style="{StaticResource tbStyle}">Month header background</TextBlock>
                <c1:C1ColorPicker x:Name="monthHB" Grid.Row="6" Grid.Column="2" Padding="0" SelectedColor="#FFBDDBFF" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="7" Grid.Column="0" Style="{StaticResource tbStyle}">Month header foreground</TextBlock>
                <c1:C1ColorPicker x:Name="monthHF" Grid.Row="7" Grid.Column="2" Padding="0" SelectedColor="Black" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="8" Grid.Column="0" Style="{StaticResource tbStyle}">Navigation arrow brush</TextBlock>
                <c1:C1ColorPicker x:Name="arrow" Grid.Row="8" Grid.Column="2" Padding="0" SelectedColor="#FF6F9DD9" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="9" Grid.Column="0" Style="{StaticResource tbStyle}">Weekend brush</TextBlock>
                <c1:C1ColorPicker x:Name="week" Grid.Row="9" Grid.Column="2" Padding="0" SelectedColor="Black" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="10" Grid.Column="0" Style="{StaticResource tbStyle}">Selected day brush</TextBlock>
                <c1:C1ColorPicker x:Name="sel" Grid.Row="10" Grid.Column="2" Padding="0" SelectedColor="#FFFBC84F" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="11" Grid.Column="0" Style="{StaticResource tbStyle}">Today brush</TextBlock>
                <c1:C1ColorPicker x:Name="today" Grid.Row="11" Grid.Column="2" Padding="0" SelectedColor="#FFBB5503" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="12" Grid.Column="0" Style="{StaticResource tbStyle}">Days of week border brush</TextBlock>
                <c1:C1ColorPicker x:Name="daysBorder" Grid.Row="12" Grid.Column="2" Padding="0" SelectedColor="#FF9CC7FF" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="13" Grid.Column="0" Style="{StaticResource tbStyle}">Show Week Numbers</TextBlock>
                <CheckBox x:Name="chkShowWeekNumbers" Grid.Row="13" Grid.Column="1" IsChecked="False" Style="{DynamicResource inputStyle}" />
                <TextBlock Grid.Row="14" Grid.Column="0" Style="{StaticResource tbStyle}">Selection mode</TextBlock>
                <ComboBox x:Name="selModeCombo" Grid.Row="14" Grid.Column="2" Style="{DynamicResource inputStyle}" />
              </Grid>
            </ScrollViewer>
        </Border>

        <Border Grid.Column="0">
			<c1:C1Calendar x:Name="calendar1" Margin="5" DaysOfWeekBorderBrush="{Binding SelectedBrush, ElementName=daysBorder}" TodayBrush="{Binding SelectedBrush, ElementName=today}" SelectedDayBrush="{Binding SelectedBrush, ElementName=sel}" WeekendBrush="{Binding SelectedBrush, ElementName=week}" NavigationButtonBrush="{Binding SelectedBrush, ElementName=arrow}" MonthHeaderForeground="{Binding SelectedBrush, ElementName=monthHF}" MonthHeaderBackground="{Binding SelectedBrush, ElementName=monthHB}" BorderBrush="{Binding SelectedBrush, ElementName=border}" Background="{Binding SelectedBrush, ElementName=back}" Foreground="{Binding SelectedBrush, ElementName=fore}" AdjacentMonthDayBrush="{Binding SelectedBrush, ElementName=trail}" BorderThickness="2" MaxSelectionCount="42" ShowWeekNumbers="{Binding ElementName=chkShowWeekNumbers, Path=IsChecked}" GenerateAdjacentMonthDays="{Binding ElementName=chkShowTrailDate, Path=IsChecked}" Theme="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=c1:CalendarBase, ResourceId=Default}}" />
		</Border>

	</Grid>
</UserControl>