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

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

    <SolidColorBrush x:Key="C1Calendar_Border_Brush" Color="#FFd5d8dc" />

    <!-- Font settings -->
    <FontFamily x:Key="C1Calendar_Font">Segoe UI</FontFamily>
    <sys:Double x:Key="C1Calendar_FontSize">11</sys:Double>
    <SolidColorBrush x:Key="C1Calendar_Foreground_Brush" Color="Black" PresentationOptions:Freeze="true" />
    <SolidColorBrush x:Key="C1Calendar_Background" Color="White" PresentationOptions:Freeze="true" />

    <!-- Month Header resources -->
    <LinearGradientBrush x:Key="C1Calendar_MonthHeader_Brush" StartPoint="0,0" EndPoint="0,1" PresentationOptions:Freeze="true">
        <GradientStop Color="#FFb2ccd8" Offset="0" />
        <GradientStop Color="#FF83acc0" Offset="0.1" />
        <GradientStop Color="#FF3f7f9d" Offset="0.5" />
        <GradientStop Color="#FF0a5376" Offset="0.51" />
        <GradientStop Color="#FF4e97aa" Offset="0.9" />
        <GradientStop Color="#FF95c4ce" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="C1Calendar_MonthHeaderText_Brush" Color="#FFFFFFFF" PresentationOptions:Freeze="true" />
    <FontWeight x:Key="C1Calendar_MonthHeader_FontWeight">Normal</FontWeight>

    <SolidColorBrush x:Key="C1Calendar_NavArrow_Brush" Color="#66FFFFFF" PresentationOptions:Freeze="true" />
    <!-- DaysOfWeekPresenter border -->
    <Thickness x:Key="C1Calendar_DaysOfWeekBorder_Thickness">0,0,0,1</Thickness>
    <Thickness x:Key="C1Calendar_WeekNumbersBorder_Thickness">0,0,1,0</Thickness>
    <SolidColorBrush x:Key="C1Calendar_DaysOfWeekBorder_Brush" Color="#FF9CC7FF" PresentationOptions:Freeze="true" />
    <!-- Calendar days -->
    <LinearGradientBrush x:Key="C1Calendar_SelectedDate_Brush" StartPoint="0,0" EndPoint="0,1" PresentationOptions:Freeze="true">
        <GradientStop Color="#FFe3f7ff" Offset="0" />
        <GradientStop Color="#FFe3f7ff" Offset="0.2" />
        <GradientStop Color="#FFbdedff" Offset="0.25" />
        <GradientStop Color="#FFb7e7fb" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="C1Calendar_AdjucentDateText_Brush" Color="#FF7c8a95" PresentationOptions:Freeze="true" />
    <SolidColorBrush x:Key="C1Calendar_Today_Brush" Color="#FF3399ff" PresentationOptions:Freeze="true" />
    <Thickness x:Key="C1Calendar_TodayBorder_Thickness">2,2,2,2</Thickness>
    <SolidColorBrush x:Key="C1Calendar_Weekend_Brush" Color="#FF064D87" PresentationOptions:Freeze="true" />

    <!-- Font settings -->
    <FontFamily x:Key="C1Calendar_MonthHeader_Font">Calibri</FontFamily>
    <sys:Double x:Key="C1Calendar_MonthHeader_FontSize">13</sys:Double>

    <!-- Background and border -->
    <Color x:Key="C1Scheduler_BaseBackgroundColor">#FFA1BFDF</Color>
    <SolidColorBrush x:Key="C1Scheduler_Background" Color="{StaticResource C1Scheduler_BaseBackgroundColor}" />
    <Color x:Key="C1Scheduler_BaseColor">#FFd5d8dc</Color>

    <SolidColorBrush x:Key="C1Scheduler_Border_Brush" Color="{StaticResource C1Scheduler_BaseColor}" />
    <SolidColorBrush x:Key="C1Scheduler_Foreground_Brush" Color="#FFFFFFFF" />

    <!-- All-day area -->
    <Thickness x:Key="C1Scheduler_AllDayAreaBorder_Thickness">1px,0,1px,2px</Thickness>
    <LinearGradientBrush x:Key="C1Scheduler_AllDayArea_Brush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFf2f9fc" Offset="0" />
        <GradientStop Color="#FFf2f9fc" Offset="0.2" />
        <GradientStop Color="#FFe1f1f9" Offset="0.25" />
        <GradientStop Color="#FFd8ecf6" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="C1Scheduler_AllDayArea_SelectedBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFe3f7ff" Offset="0" />
        <GradientStop Color="#FFe3f7ff" Offset="0.2" />
        <GradientStop Color="#FFbdedff" Offset="0.25" />
        <GradientStop Color="#FFb7e7fb" Offset="1" />
    </LinearGradientBrush>

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

    <!-- determines the style used for displaying All-Day area in a Day view -->
    <Style x:Key="C1Scheduler_AllDayInterval_Style" TargetType="c1sched:VisualIntervalPresenter">
        <Setter Property="BorderThickness" Value="{DynamicResource C1Scheduler_AllDayAreaBorder_Thickness}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1sched:VisualIntervalPresenter">
                    <Grid SnapsToDevicePixels="True">
                        <Border x:Name="AllDayBorder" IsHitTestVisible="False" Background="{DynamicResource C1Scheduler_AllDayArea_Brush}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type c1sched:VisualIntervalGroupsPresenter}}}">
                            <Rectangle Fill="{DynamicResource C1Scheduler_AllDayArea_SelectedBrush}" Visibility="{Binding IsSelected, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" />
                        </Border>
                        <Border Background="{Binding Path=VisualIntervals[0].StatusBrush}" Opacity="0.2" Margin="{Binding BorderThickness, ElementName=AllDayBorder}" c1sched:CoverElementsPane.Orientation="Horizontal" c1sched:CoverElementsPane.PaneName="allDayPane" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding IsToday}" Value="True">
                            <Setter TargetName="AllDayBorder" Property="BorderThickness" Value="{DynamicResource C1Scheduler_AllDayAreaTodayBorder_Thickness}" />
                            <Setter TargetName="AllDayBorder" Property="BorderBrush" Value="{Binding Path=Scheduler.TodayBackground}" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Time slots -->
    <SolidColorBrush x:Key="C1Scheduler_WorkHour_Brush" Color="White" />
    <SolidColorBrush x:Key="C1Scheduler_WorkHourBorder_Brush" Color="#FFD5D8DC" />
    <SolidColorBrush x:Key="C1Scheduler_WorkHourLightBorder_Brush" Color="#FFF2F4F5" />
    <SolidColorBrush x:Key="C1Scheduler_FreeHour_Brush" Color="#FFF0F0F0" />
    <SolidColorBrush x:Key="C1Scheduler_FreeHourBorder_Brush" Color="#FFD5D8DC" />
    <SolidColorBrush x:Key="C1Scheduler_FreeHourLightBorder_Brush" Color="#FFF2F4F5" />
    <LinearGradientBrush x:Key="C1Scheduler_TimeSlot_SelectedBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFF9FDFF" Offset="0" />
        <GradientStop Color="#FFEAF7FF" Offset="0.7" />
        <GradientStop Color="#FFBDEDFF" Offset="1" />
    </LinearGradientBrush>

    <!-- C1BrushBuilder style which is used for coloring selected time slot. todo -->
    <Style x:Key="C1Scheduler_TimeSlotSelected_BrushStyle" TargetType="c1:C1BrushBuilder">
        <Setter Property="DesignColor" Value="{StaticResource C1Scheduler_BaseBackgroundColor}" />
        <Setter Property="DesignBrush" Value="{StaticResource C1Scheduler_TimeSlot_SelectedBrush}" />
    </Style>

    <!-- Selected day background in a month view -->
    <LinearGradientBrush x:Key="C1Scheduler_Selected_Brush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFF9FDFF" Offset="0" />
        <GradientStop Color="#FFEAF7FF" Offset="0.7" />
        <GradientStop Color="#FFBDEDFF" Offset="1" />
    </LinearGradientBrush>

    <!-- Alternate month day background (used in a month view) -->
    <LinearGradientBrush x:Key="C1Scheduler_AlternateMonthDay_Brush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFf2f4f5" Offset="0" />
        <GradientStop Color="#FFf0f0f0" Offset="0.7" />
        <GradientStop Color="#FFdddfe1" Offset="1" />
    </LinearGradientBrush>

    <!-- Control area (time ruler and month grid header) -->
    <LinearGradientBrush x:Key="C1Scheduler_ControlArea_Brush" EndPoint="1,0" StartPoint="0,0">
        <GradientStop Color="#FFffffff" Offset="0" />
        <GradientStop Color="#FFdff0f9" Offset="0.4" />
        <GradientStop Color="#FFe5f3fa" Offset="0.6" />
        <GradientStop Color="#FFeef5fa" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="C1Scheduler_ControlAreaLines_Brush" Color="#FFd5dfe5" />
    <SolidColorBrush x:Key="C1Scheduler_ControlAreaText_Brush" Color="#FF7c8a95" />
    <Style x:Key="C1Scheduler_ControlAreaDark_BrushStyle" TargetType="c1:C1BrushBuilder">
        <Setter Property="DesignColor" Value="{StaticResource C1Scheduler_BaseBackgroundColor}" />
        <Setter Property="DesignBrush" Value="#FFffffff" />
    </Style>

    <!-- 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>

    <!-- determines the template used for the single time interval of a time ruler in a Day view -->
    <DataTemplate x:Key="C1Scheduler_TimeRuler_Template">
        <Grid>
            <c1sched:TimeRulerHelper Interval="{Binding}" x:Name="helper" />
            <Rectangle Height="1" Margin="0,0,4,0" Width="20" Fill="{DynamicResource C1Scheduler_ControlAreaLines_Brush}" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <Grid SnapsToDevicePixels="True" Visibility="{Binding IsZeroMinute, ElementName=helper, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="30" />
                    <ColumnDefinition MinWidth="25" />
                </Grid.ColumnDefinitions>
                <Rectangle Height="1" Margin="4,0,4,0" Grid.Column="0" Grid.ColumnSpan="2" Fill="{DynamicResource C1Scheduler_ControlAreaLines_Brush}" HorizontalAlignment="Stretch" VerticalAlignment="Top"/>
                <TextBlock FontSize="16" Grid.Column="0" Foreground="{Binding Path=Scheduler.ControlForeground}" HorizontalAlignment="Right" Padding="3,1,3,0" Text="{Binding Hours, ElementName=helper}" />
                <TextBlock FontSize="11" Grid.Column="1" Foreground="{Binding Path=Scheduler.ControlForeground}" HorizontalAlignment="Right" Padding="3,2,2,0" Margin="0,0,4,0" Text="{Binding Minutes, ElementName=helper}" />
            </Grid>
        </Grid>
    </DataTemplate>

    <!-- determines the style of the month grid header (week day names) -->
    <Style x:Key="C1Scheduler_MonthHeader_Style" TargetType="ContentControl">
        <Setter Property="Foreground" Value="{Binding ControlForeground,          RelativeSource={RelativeSource AncestorType={x:Type c1sched:C1Scheduler}}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Border BorderThickness="0,0,1,0" SnapsToDevicePixels="True" Background="{DynamicResource C1Scheduler_ControlArea_Brush}" BorderBrush="{DynamicResource C1Scheduler_ControlAreaLines_Brush}">
                        <ContentPresenter Margin="0,2,0,2" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Navigation panels -->
    <LinearGradientBrush x:Key="C1Scheduler_NavPane_Brush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFd8ecfa" Offset="0" />
        <GradientStop Color="#FFd5eafd" Offset="0.4" />
        <GradientStop Color="#FFd4e9fd" Offset="0.6" />
        <GradientStop Color="#FFcde4fc" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="C1Scheduler_NavPane_HoverBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFd6f0fe" Offset="0" />
        <GradientStop Color="#FFc7e5fe" Offset="0.4" />
        <GradientStop Color="#FFc5e3fe" Offset="0.6" />
        <GradientStop Color="#FFb2d5fd" Offset="1" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="C1Scheduler_NavPaneText_Brush" Color="#FF064D87" />
    <SolidColorBrush x:Key="C1Scheduler_NavPaneBorder_Brush" Color="#FFABCCF9" />

    <!-- determines the style of the prev button -->
    <Style x:Key="C1Scheduler_PreviousButton_Style" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderThickness="1" CornerRadius="0,0,2,2" BorderBrush="{DynamicResource C1Scheduler_NavPaneBorder_Brush}" Background="{DynamicResource C1Scheduler_NavPane_Brush}">
                            <Border x:Name="MouseOverElement" CornerRadius="0,0,2,2" Background="{DynamicResource C1Scheduler_NavPane_HoverBrush}" Visibility="Collapsed" />
                        </Border>
                        <Grid TextBlock.Foreground="{DynamicResource C1Scheduler_NavPaneText_Brush}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="20" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="30" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Padding="0,3,0,3" Grid.Column="1" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            <TextBlock Padding="3,0,3,0" Text="&gt;|" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <TextBlock.LayoutTransform>
                                    <RotateTransform Angle="-90" />
                                </TextBlock.LayoutTransform>
                            </TextBlock>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- determines the style of the next button -->
    <Style x:Key="C1Scheduler_NextButton_Style" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderThickness="1" CornerRadius="2,2,0,0" BorderBrush="{DynamicResource C1Scheduler_NavPaneBorder_Brush}" Background="{DynamicResource C1Scheduler_NavPane_Brush}">
                            <Border x:Name="MouseOverElement" CornerRadius="2,2,0,0" Background="{DynamicResource C1Scheduler_NavPane_HoverBrush}" Visibility="Collapsed" />
                        </Border>
                        <Grid TextBlock.Foreground="{DynamicResource C1Scheduler_NavPaneText_Brush}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="20" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="30" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Padding="0,3,0,3" Grid.Column="1" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            <TextBlock Padding="3,0,3,0" Text="&gt;|" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <TextBlock.LayoutTransform>
                                    <RotateTransform Angle="90" />
                                </TextBlock.LayoutTransform>
                            </TextBlock>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Week tabs in a month view -->
    <LinearGradientBrush x:Key="C1Scheduler_WeekTab_Brush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFf2f9fc" Offset="0" />
        <GradientStop Color="#FFf2f9fc" Offset="0.5" />
        <GradientStop Color="#FFe1f1f9" Offset="0.51" />
        <GradientStop Color="#FFd8ecf6" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="C1Scheduler_WeekTab_HoverBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFe3f7ff" Offset="0" />
        <GradientStop Color="#FFe3f7ff" Offset="0.5" />
        <GradientStop Color="#FFbdedff" Offset="0.51" />
        <GradientStop Color="#FFb7e7fb" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="C1Scheduler_WeekTabText_Brush" Color="#FF7C8A95" />
    <SolidColorBrush x:Key="C1Scheduler_WeekTabBorder_Brush" Color="#FFD5D8DC" />

    <!-- determines the style of the week tab in a Month view -->
    <Style x:Key="C1Scheduler_WeekTab_Style" TargetType="Button">
        <Setter Property="Foreground" Value="{DynamicResource C1Scheduler_WeekTabText_Brush}" />
        <Setter Property="FontWeight" Value="{DynamicResource C1Scheduler_WeekTabText_FontWeight}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="WeekTabBorder" BorderThickness="0.75" SnapsToDevicePixels="True" BorderBrush="{DynamicResource C1Scheduler_WeekTabBorder_Brush}" Background="{DynamicResource C1Scheduler_WeekTab_Brush}">
                            <Rectangle x:Name="MouseOverElement" Visibility="Collapsed" Fill="{DynamicResource C1Scheduler_WeekTab_HoverBrush}" />
                        </Border>
                        <ContentPresenter Content="{TemplateBinding Content}" Margin="0.75" TextBlock.Foreground="{TemplateBinding Foreground}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Day header -->
    <LinearGradientBrush x:Key="C1Scheduler_DayHeader_Brush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFb2ccd8" Offset="0" />
        <GradientStop Color="#FF83acc0" Offset="0.1" />
        <GradientStop Color="#FF3f7f9d" Offset="0.5" />
        <GradientStop Color="#FF0a5376" Offset="0.51" />
        <GradientStop Color="#FF4e97aa" Offset="0.9" />
        <GradientStop Color="#FF95c4ce" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="C1Scheduler_DayHeader_HoverBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFdfe9ef" Offset="0" />
        <GradientStop Color="#FFb9ceda" Offset="0.1" />
        <GradientStop Color="#FF6794ae" Offset="0.5" />
        <GradientStop Color="#FF0a5376" Offset="0.51" />
        <GradientStop Color="#FF4e97aa" Offset="0.9" />
        <GradientStop Color="#FF95c4ce" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="C1Scheduler_DayHeaderBorder_Brush" Color="#FF8daed9" />

    <!-- Current day border color -->
    <Color x:Key="C1Scheduler_Today_Color">#FF3399ff</Color>
    <!-- The brush which is used as default value for C1Scheduler.TodayBackground property. 
       It is used as a base color for co0loring current day elements. -->
    <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="#FFeaf5fe" Offset="0" />
        <GradientStop Color="#FF8fbbed" Offset="0.1" />
        <GradientStop Color="#FF295591" Offset="0.5" />
        <GradientStop Color="#FF183d76" Offset="0.51" />
        <GradientStop Color="#FF325f9e" Offset="0.9" />
        <GradientStop Color="#FF325f9e" Offset="1" />
    </LinearGradientBrush>
    <DrawingBrush x:Key="C1Scheduler_TodayHeader_HoverBrush" RenderOptions.CachingHint="Cache">
        <DrawingBrush.Drawing>
            <DrawingGroup>
                <GeometryDrawing>
                    <GeometryDrawing.Brush>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Color="#FFeaf5fe" Offset="0" />
                            <GradientStop Color="#FF8fbbed" Offset="0.1" />
                            <GradientStop Color="#FF295591" Offset="0.5" />
                            <GradientStop Color="#FF183d76" Offset="0.51" />
                            <GradientStop Color="#FF325f9e" Offset="0.9" />
                            <GradientStop Color="#FF325f9e" Offset="1" />
                        </LinearGradientBrush>
                    </GeometryDrawing.Brush>
                    <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,0,1,1" />
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
                <GeometryDrawing>
                    <GeometryDrawing.Brush>
                        <RadialGradientBrush>
                            <RadialGradientBrush.RelativeTransform>
                                <TransformGroup>
                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="2.255" />
                                    <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5" />
                                    <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5" />
                                    <TranslateTransform X="0" Y="0.372" />
                                </TransformGroup>
                            </RadialGradientBrush.RelativeTransform>
                            <GradientStop Color="#FF8fbbed" Offset="0" />
                            <GradientStop Color="#00eaf5fe" Offset="1" />
                        </RadialGradientBrush>
                    </GeometryDrawing.Brush>
                    <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,0,1,1" />
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>

    <!-- determines the template used for displaying group headers -->
    <DataTemplate x:Key="GroupHeaderTemplate">
        <Grid SnapsToDevicePixels="True" TextBlock.Foreground="{DynamicResource C1Scheduler_NavPaneText_Brush}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <c1:C1BrushBuilder x:Name="Background" Style="{StaticResource C1Scheduler_ControlArea_BrushStyle}" Input="{Binding Background}" />
            <c1:C1BrushBuilder x:Name="BorderBrush" Style="{StaticResource C1Scheduler_MonthHeaderForeground_BrushStyle}" Input="{Binding Background}" />
            <Border VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.ColumnSpan="3" BorderThickness="1,0,1,0" BorderBrush="{Binding Output, ElementName=BorderBrush}" Background="{Binding Output, ElementName=Background}" />
            <Button Style="{StaticResource GroupHeaderButton}" Grid.Column="0" VerticalAlignment="Center" Margin="4" Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" CommandTarget="{Binding Scheduler}" Visibility="{Binding ShowPreviousButton, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" BorderBrush="{Binding Output, ElementName=BorderBrush}" Background="{Binding Output, ElementName=Background}">
                <Path Data="M4.5352716,0 C4.7911787,0 5.0470867,0.097625732 5.2423372,0.29287648 C5.6328392,0.68337822 5.6328392,1.3165059 5.2423372,1.7070076 L3.1820319,3.7673135 L8.2674026,3.7673135 C8.8196878,3.7673135 9.2674026,4.2150288 9.2674026,4.7673135 C9.2674026,5.3195982 8.8196878,5.7673135 8.2674026,5.7673135 L3.1816781,5.7673135 L5.2423363,7.8279719 C5.6328382,8.2184734 5.6328382,8.8516016 5.2423363,9.2421036 C4.8518353,9.6326046 4.2187071,9.6326046 3.8282053,9.2421026 L0.29287642,5.7067738 C-0.32626158,5.064395 -0.32671508,4.5018373 0.29287884,3.8282032 L3.8282061,0.29287601 C4.0234566,0.097625256 4.2793646,-2.3841858E-07 4.5352716,0 z" Fill="{Binding Output, ElementName=Background}" Stretch="Fill" Height="10" Width="10" />
            </Button>
            <Button Style="{StaticResource GroupHeaderButton}" Grid.Column="2" VerticalAlignment="Center" Margin="4" Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" CommandTarget="{Binding Scheduler}" Visibility="{Binding ShowNextButton, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" BorderBrush="{Binding Output, ElementName=BorderBrush}" Background="{Binding Output, ElementName=Background}">
                <Path Data="M4.7322359,0 C4.9881582,2.3841858E-07 5.2440805,0.097631216 5.4393425,0.29289341 L8.9748764,3.8284273 C9.5511045,4.4046021 9.5983429,5.0837431 8.9748774,5.7071066 L5.4393435,9.2426405 C5.0488191,9.6331644 4.4156542,9.6331644 4.0251298,9.2426405 C3.6346054,8.8521166 3.6346054,8.2189512 4.0251298,7.8284273 L6.0857897,5.767767 L0.99999994,5.767767 C0.44771519,5.767767 -5.2450769E-08,5.3200521 3.5527137E-15,4.767767 C-5.2450769E-08,4.2154822 0.44771519,3.7677672 0.99999994,3.7677672 L6.0857897,3.7677672 L4.0251293,1.7071068 C3.6346049,1.3165827 3.6346049,0.68341756 4.0251293,0.29289341 C4.2203913,0.097631216 4.4763136,2.3841858E-07 4.7322359,0 z" Fill="{Binding Output, ElementName=Background}" Stretch="Fill" Height="10" Width="10" />
            </Button>
            <TextBlock Margin="10,4,10,4" Grid.Column="1" Visibility="{Binding IsSelected, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}, ConverterParameter=Invert}" Text="{Binding DisplayName}" VerticalAlignment="Center" HorizontalAlignment="Center" />
            <TextBlock Margin="10,4,10,4" Grid.Column="1" FontWeight="Bold" Visibility="{Binding IsSelected, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" Text="{Binding DisplayName}" VerticalAlignment="Center" HorizontalAlignment="Center" />
        </Grid>
    </DataTemplate>

    <!-- very simple Group Header for the TimeLine view -->
    <DataTemplate x:Key="TimeLineGroupHeaderTemplate">
        <Grid IsHitTestVisible="False">
            <c1:C1BrushBuilder x:Name="Background" Style="{StaticResource C1Scheduler_ControlArea_BrushStyle}" Input="{Binding Background}" />
            <c1:C1BrushBuilder x:Name="BorderBrush" Style="{StaticResource C1Scheduler_MonthHeaderForeground_BrushStyle}" Input="{Binding Background}" />
            <Border VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderThickness="4,1,0,1" BorderBrush="{Binding Output, ElementName=BorderBrush}" Background="{Binding Output, ElementName=Background}">
                <TextBlock TextWrapping="Wrap" Foreground="{DynamicResource C1Scheduler_NavPaneText_Brush}" Margin="2" Text="{Binding DisplayName}" VerticalAlignment="Center" HorizontalAlignment="Center" />
            </Border>
        </Grid>
    </DataTemplate>

    <!-- determines the style used for the day header button in all views -->
    <Style TargetType="Button" x:Key="C1Scheduler_DayHeaderButton_Style">
        <Setter Property="Foreground" Value="{Binding Foreground,          RelativeSource={RelativeSource AncestorType={x:Type c1sched:C1Scheduler}}}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid SnapsToDevicePixels="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderThickness="1" x:Name="DayHeaderBorder" BorderBrush="{DynamicResource C1Scheduler_DayHeaderBorder_Brush}" Background="{DynamicResource C1Scheduler_DayHeader_Brush}" VerticalAlignment="Stretch">
                            <Rectangle x:Name="MouseOverElement" Visibility="Collapsed" Fill="{DynamicResource C1Scheduler_DayHeader_HoverBrush}" />
                        </Border>
                        <ContentPresenter Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}" TextBlock.Foreground="{TemplateBinding Foreground}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding IsToday}" Value="True">
                            <Setter TargetName="DayHeaderBorder" Property="BorderBrush" Value="{DynamicResource C1Scheduler_Today_Brush}" />
                            <Setter TargetName="DayHeaderBorder" Property="Background" Value="{DynamicResource C1Scheduler_TodayHeader_Brush}" />
                            <Setter TargetName="MouseOverElement" Property="Fill" Value="{DynamicResource C1Scheduler_TodayHeader_HoverBrush}" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- determines the style used for displaying time slots in a Day view.
         Copy it into every theme, as using DynamicResource here affects performance -->
    <c1sched:TimeSlotStyleSelector x:Key="TimeSlotStyleSelector">
        <!-- Don't use selection states. With selection states multiple selection works incorrectly. -->
        <c1sched:TimeSlotStyleSelector.Resources>
            <ResourceDictionary>
                <Style x:Key="C1Scheduler_WorkSlot_Style" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_WorkHourLightBorder_Brush}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="c1sched:VisualIntervalPresenter">
                                <Grid>
                                    <Border Background="{Binding Path=Scheduler.AlternatingBackground}" BorderThickness="0,1,0,0" IsHitTestVisible="False" BorderBrush="{TemplateBinding BorderBrush}">
                                        <Rectangle Fill="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type c1sched:VisualIntervalsPresenter}}}" Visibility="{Binding IsSelected, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" />
                                    </Border>
                                    <ContentPresenter Content="{TemplateBinding Content}" Margin="0,1,0,0" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

                <Style x:Key="C1Scheduler_TopWorkSlot_Style" BasedOn="{StaticResource C1Scheduler_WorkSlot_Style}" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_WorkHourBorder_Brush}" />
                </Style>

                <Style x:Key="C1Scheduler_FreeSlot_Style" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_FreeHourLightBorder_Brush}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="c1sched:VisualIntervalPresenter">
                                <Grid>
                                    <Border Background="{StaticResource C1Scheduler_FreeHour_Brush}" BorderThickness="0,1,0,0" BorderBrush="{TemplateBinding BorderBrush}">
                                        <Rectangle Fill="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type c1sched:VisualIntervalsPresenter}}}" Visibility="{Binding IsSelected, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" />
                                    </Border>
                                    <ContentPresenter Content="{TemplateBinding Content}" Margin="0,1,0,0" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

                <Style x:Key="C1Scheduler_TopFreeSlot_Style" BasedOn="{StaticResource C1Scheduler_FreeSlot_Style}" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_FreeHourBorder_Brush}" />
                </Style>

            </ResourceDictionary>
        </c1sched:TimeSlotStyleSelector.Resources>
    </c1sched:TimeSlotStyleSelector>

    <!-- Determines the style used for displaying time slots in the TimeLine view availability status line.
         Copy it into every theme, as using DynamicResource here affects performance -->
    <c1sched:TimeSlotStyleSelector x:Key="AvailabilityStatusStyleSelector">
        <c1sched:TimeSlotStyleSelector.Resources>
            <ResourceDictionary>
                <Style x:Key="C1Scheduler_WorkSlot_Style" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_WorkHourLightBorder_Brush}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="c1sched:VisualIntervalPresenter">
                                <!-- Background="{Binding Path=Scheduler.AlternatingBackground}"-->
                                <Border x:Name="IntervalBorder" IsHitTestVisible="False" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderThickness="1,0,0,0" BorderBrush="{TemplateBinding BorderBrush}">
                                    <Rectangle Fill="{Binding Path=TotalStatusBrush}" Margin="-1,7,0,7" />
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

                <Style x:Key="C1Scheduler_TopWorkSlot_Style" BasedOn="{StaticResource C1Scheduler_WorkSlot_Style}" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_WorkHourBorder_Brush}" />
                </Style>

                <Style x:Key="C1Scheduler_FreeSlot_Style" BasedOn="{StaticResource C1Scheduler_WorkSlot_Style}" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_FreeHourLightBorder_Brush}" />
                </Style>

                <Style x:Key="C1Scheduler_TopFreeSlot_Style" BasedOn="{StaticResource C1Scheduler_WorkSlot_Style}" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_FreeHourBorder_Brush}" />
                </Style>
            </ResourceDictionary>
        </c1sched:TimeSlotStyleSelector.Resources>
    </c1sched:TimeSlotStyleSelector>

    <!-- Determines the style used for displaying time slots in the TimeLine view.
         Copy it into every theme, as using DynamicResource here affects performance -->
    <c1sched:TimeSlotStyleSelector x:Key="HorizontalTimeSlotStyleSelector">
        <c1sched:TimeSlotStyleSelector.Resources>
            <ResourceDictionary>
                <Style x:Key="C1Scheduler_WorkSlot_Style" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_WorkHourLightBorder_Brush}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="c1sched:VisualIntervalPresenter">
                                <Grid>
                                    <Border x:Name="IntervalBorder" IsHitTestVisible="False" Background="{Binding Path=Scheduler.AlternatingBackground}" BorderThickness="1,0,0,0" BorderBrush="{TemplateBinding BorderBrush}">
                                        <Rectangle Fill="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type c1sched:VisualIntervalsPresenter}}}" Visibility="{Binding IsSelected, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" />
                                    </Border>
                                    <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="1,0,0,0" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

                <Style x:Key="C1Scheduler_TopWorkSlot_Style" BasedOn="{StaticResource C1Scheduler_WorkSlot_Style}" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_WorkHourBorder_Brush}" />
                </Style>

                <Style x:Key="C1Scheduler_FreeSlot_Style" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_FreeHourLightBorder_Brush}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="c1sched:VisualIntervalPresenter">
                                <Grid>
                                    <Border x:Name="IntervalBorder" IsHitTestVisible="False" Background="{StaticResource C1Scheduler_FreeHour_Brush}" BorderThickness="1,0,0,0" BorderBrush="{TemplateBinding BorderBrush}">
                                        <Rectangle Fill="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type c1sched:VisualIntervalsPresenter}}}" Visibility="{Binding IsSelected, Converter={x:Static c1sched:BooleanToVisibilityConverter.Default}}" />
                                    </Border>
                                    <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="1,0,0,0" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

                <Style x:Key="C1Scheduler_TopFreeSlot_Style" BasedOn="{StaticResource C1Scheduler_FreeSlot_Style}" TargetType="c1sched:VisualIntervalPresenter">
                    <Setter Property="BorderBrush" Value="{StaticResource C1Scheduler_FreeHourBorder_Brush}" />
                </Style>
            </ResourceDictionary>
        </c1sched:TimeSlotStyleSelector.Resources>
    </c1sched:TimeSlotStyleSelector>

</ResourceDictionary>