<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:c1sched="clr-namespace:C1.WPF.Schedule" 
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="clr-namespace:C1.WPF;assembly=C1.WPF.4">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/C1.WPF.Schedule.4;component/themes/SchedulerThemes/Office2007/Default.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Color x:Key="ForegroundTextBoxColor">Black</Color>
    <!-- @ Base Colors used in Scheduler -->
    
    <Color x:Key="C1Scheduler_BaseBackgroundColor">#FFA5BFE1</Color>
    <Color x:Key="C1Scheduler_BaseColor">#FFA5BFE1</Color>
    <SolidColorBrush x:Key="C1Scheduler_Background" Color="{StaticResource C1Scheduler_BaseBackgroundColor}" />
    <SolidColorBrush x:Key="C1Scheduler_Border_Brush" Color="#FF8DAED9" />
    <SolidColorBrush x:Key="C1Scheduler_Foreground_Brush" Color="{StaticResource ForegroundTextBoxColor}" />

    <Color x:Key="C1Scheduler_Selected_Color">#FFE6EDF7</Color>
    <SolidColorBrush x:Key="C1Scheduler_Selected_Brush" Color="{StaticResource C1Scheduler_Selected_Color}" />

    <!-- Control area (time ruler and month grid header) -->
    <SolidColorBrush x:Key="C1Scheduler_ControlArea_Brush" Color="White" />
    <SolidColorBrush x:Key="C1Scheduler_ControlAreaText_Brush" Color="#FF1E395B" />
    <!-- C1BrushBuilder style which is used for coloring month header. -->
    <Style x:Key="C1Scheduler_MonthHeaderForeground_BrushStyle" TargetType="c1:C1BrushBuilder">
        <Setter Property="DesignColor" Value="{StaticResource C1Scheduler_BaseBackgroundColor}" />
        <Setter Property="DesignBrush" Value="{StaticResource C1Scheduler_ControlAreaText_Brush}" />
    </Style>
    <Style x:Key="C1Scheduler_GroupBorder_BrushStyle" TargetType="c1:C1BrushBuilder">
        <Setter Property="DesignColor" Value="{StaticResource C1Scheduler_BaseColor}" />
        <Setter Property="DesignBrush" Value="{StaticResource C1Scheduler_Border_Brush}" />
    </Style>
    <Style x:Key="C1Scheduler_ControlAreaDark_BrushStyle" TargetType="c1:C1BrushBuilder">
        <Setter Property="DesignColor" Value="{StaticResource C1Scheduler_BaseBackgroundColor}" />
        <Setter Property="DesignBrush" Value="{StaticResource C1Scheduler_ControlArea_Brush}" />
    </Style>

    <!-- Navigation panels -->
    <LinearGradientBrush x:Key="C1Scheduler_NavPane_Brush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFB0C7E5" Offset="0" />
        <GradientStop Color="#FF8DAED9" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="C1Scheduler_NavPane_HoverBrush" StartPoint="0,0.5" EndPoint="1,0.5">
        <GradientStop Color="#FFBED1EB" Offset="0" />
        <GradientStop Color="#FF8DAED9" Offset="0.5" />
        <GradientStop Color="#FFBED1EB" Offset="1" />
    </LinearGradientBrush>

    <!-- Day header -->
    <SolidColorBrush x:Key="C1Scheduler_DayHeader_Brush" Color="#FFA5BFE1" />
    <SolidColorBrush x:Key="C1Scheduler_DayHeader_HoverBrush" Color="#FFA5BFE1" />
    <Thickness x:Key="C1Scheduler_DayHeaderBorder_Thickness">1 0</Thickness>
    <Thickness x:Key="C1Scheduler_MonthViewDayHeaderBorder_Thickness">0,0,1,0</Thickness>

    <!-- Current day border color -->
    <Color x:Key="C1Scheduler_Today_Color">#FFFFDA6C</Color>
    <SolidColorBrush x:Key="C1Scheduler_Today_Brush" Color="{StaticResource C1Scheduler_Today_Color}" />
    <!-- Current day header -->
    <LinearGradientBrush x:Key="C1Scheduler_TodayHeader_Brush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFFFED79" Offset="0" />
        <GradientStop Color="#FFFFE433" Offset="0.5" />
        <GradientStop Color="#FFFFED79" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="C1Scheduler_TodayHeader_HoverBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFFFE433" Offset="0" />
        <GradientStop Color="#FFFFED79" Offset="0.5" />
        <GradientStop Color="#FFFFE433" Offset="1" />
    </LinearGradientBrush>

    <!-- All-day area -->
    <Thickness x:Key="C1Scheduler_AllDayAreaBorder_Thickness">1,0,1,2</Thickness>
    <SolidColorBrush x:Key="C1Scheduler_AllDayArea_Brush" Color="#FFA5BFE1" />
    <SolidColorBrush x:Key="C1Scheduler_AllDayArea_SelectedBrush" Color="#FF294C7A" />

    <!-- All-day area for the current date -->
    <Thickness x:Key="C1Scheduler_AllDayAreaTodayBorder_Thickness">2,1,2,2</Thickness>

    <!-- Time slots lines-->
    <SolidColorBrush x:Key="C1Scheduler_WorkHour_Brush" Color="White" />
    <SolidColorBrush x:Key="C1Scheduler_WorkHourBorder_Brush" Color="#FFA5BFE1" />
    <SolidColorBrush x:Key="C1Scheduler_WorkHourLightBorder_Brush" Color="#FFE6EDF7" />
    <SolidColorBrush x:Key="C1Scheduler_FreeHour_Brush" Color="#FFE6EDF7" />
    <SolidColorBrush x:Key="C1Scheduler_FreeHourBorder_Brush" Color="#FFA5BFE1" />
    <SolidColorBrush x:Key="C1Scheduler_FreeHourLightBorder_Brush" Color="#FFE6EDF7" />
    <SolidColorBrush x:Key="C1Scheduler_TimeSlot_SelectedBrush" Color="#FF294C7A" />
    <Color x:Key="C1Scheduler_TimeSlot_SelectedColor">#FF294C7A</Color>

    <!-- Week tabs in a month view -->
    <SolidColorBrush x:Key="C1Scheduler_WeekTab_Brush" Color="#FFE6EDF6" />
    <SolidColorBrush x:Key="C1Scheduler_WeekTab_HoverBrush" Color="#FFE6EDF6" />

    <!-- Alternate month day background (used in a month view) -->
    <SolidColorBrush x:Key="C1Scheduler_AlternateMonthDay_Brush" Color="#FFA5BFE1" />

    <CornerRadius x:Key="C1Scheduler_Appointment_CornerRadius">0</CornerRadius>
    <CornerRadius x:Key="C1Scheduler_Appointment_InnerCornerRadius">0</CornerRadius>

    <!-- very simple Group Header for the TimeLine view -->
    <DataTemplate x:Key="TimeLineGroupHeaderTemplate">
        <Grid IsHitTestVisible="False">
            <Border VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderThickness="1,1,1,1" BorderBrush="Black" Background="{Binding Background}">
                <TextBlock TextWrapping="Wrap" Foreground="{Binding Path=Scheduler.Foreground}" Margin="2" Text="{Binding DisplayName}" VerticalAlignment="Center" HorizontalAlignment="Center" />
            </Border>
        </Grid>
    </DataTemplate>

    <c1sched:AlternateMonthBrushConverter x:Key="AlternateMonthBrushConverter" AlternateMonthBrush="{StaticResource C1Scheduler_AlternateMonthDay_Brush}" />

    <!-- determines the style used for displaying single day in a Month view -->
    <c1sched:DayIntervalStyleSelector x:Key="MonthDayStyleSelector">
        <c1sched:DayIntervalStyleSelector.Resources>
            <ResourceDictionary>
                <DataTemplate x:Key="DayHeaderTemplate">
                    <Button HorizontalContentAlignment="Stretch" CommandParameter="{Binding Path=Scheduler.OneDayStyle}" Command="c1sched:C1Scheduler.ChangeStyleCommand" BorderThickness="{DynamicResource C1Scheduler_MonthViewDayHeaderBorder_Thickness}" Style="{DynamicResource C1Scheduler_DayHeaderButton_Style}">
                        <DockPanel>
                            <TextBlock DockPanel.Dock="Right" Margin="2" FontWeight="Semibold" Text="{Binding Converter={x:Static c1sched:VisualIntervalToStringConverter.Default}, ConverterParameter=MonthViewDayHeaderDayFormat}" />
                            <TextBlock DockPanel.Dock="Left" x:Name="MonthName" Margin="2,2,0,2" FontWeight="Semibold" Text="{Binding Converter={x:Static c1sched:MonthToStringConverter.Default}}" />
                            <!-- Add empty block to fill panel (it's needed for command) -->
                            <TextBlock />
                        </DockPanel>
                    </Button>
                </DataTemplate>

                <DataTemplate x:Key="VisualIntervalTemplate">
                    <Grid Background="{Binding Path=OwnerGroup.Background}">
                        <Border Background="{Binding Converter={StaticResource AlternateMonthBrushConverter}}" IsHitTestVisible="False">
                            <Rectangle Fill="{Binding Path=Scheduler.SelectedBackground}" Visibility="{Binding IsSelected, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" />
                        </Border>
                        <Border x:Name="DayContentBorder" c1sched:CoverElementsPane.Orientation="Horizontal" Background="{Binding Path=StatusBrush}" Opacity="0.2" />
                        <Button Name="overflowJumper" HorizontalAlignment="Right" Foreground="{Binding Path=Scheduler.Foreground}" CommandParameter="{Binding Path=Scheduler.OneDayStyle}" Command="c1sched:C1Scheduler.ChangeStyleCommand" VerticalAlignment="Bottom" Visibility="{Binding Path=(c1sched:CoverElementsPane.CoverElementsOverflow),                                 ElementName=DayContentBorder, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" Style="{DynamicResource C1Scheduler_OverflowJumper_Style}" />
                    </Grid>
                </DataTemplate>

                <!-- determines the style of the day header. It is used in all Office 2007 views -->
                <Style x:Key="C1Scheduler_Day_Style" TargetType="ListBoxItem">
                    <Setter Property="BorderThickness" Value="0,0,1,1" />
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                    <Setter Property="VerticalContentAlignment" Value="Stretch" />
                    <Setter Property="SnapsToDevicePixels" Value="true" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ListBoxItem">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <!-- avoid placing C1BrushBuilder here, use binding to the relative ancestor instead -->
                                    <ContentPresenter Content="{TemplateBinding Content}" Grid.Row="0" ContentTemplate="{StaticResource DayHeaderTemplate}" />
                                    <Border BorderThickness="{TemplateBinding BorderThickness}" Grid.Row="1" BorderBrush="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type c1sched:VisualIntervalsPresenter}}}">
                                        <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{StaticResource VisualIntervalTemplate}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                    </Border>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

                <!-- determines the style of the today header. It is used in all Office 2007 views -->
                <Style x:Key="C1Scheduler_Today_Style" TargetType="ListBoxItem">
                    <Setter Property="BorderThickness" Value="0,0,1,1" />
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                    <Setter Property="VerticalContentAlignment" Value="Stretch" />
                    <Setter Property="SnapsToDevicePixels" Value="true" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ListBoxItem">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <ContentPresenter Content="{TemplateBinding Content}" Grid.Row="0" ContentTemplate="{StaticResource DayHeaderTemplate}" />
                                    <Border Grid.Row="1" BorderThickness="2,1,2,2" BorderBrush="{Binding Path=Scheduler.TodayBackground}">
                                        <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{StaticResource VisualIntervalTemplate}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                    </Border>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </ResourceDictionary>
        </c1sched:DayIntervalStyleSelector.Resources>
    </c1sched:DayIntervalStyleSelector>

</ResourceDictionary>