<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		
                            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                            xmlns:sys="clr-namespace:System;assembly=mscorlib"
							
							xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
							xmlns:calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input"
							xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
							xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
							xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
							xmlns:telerikMaskedTextBox="clr-namespace:Telerik.Windows.Controls.MaskedTextBox;assembly=Telerik.Windows.Controls.Input"
                            xmlns:telerikRating="clr-namespace:Telerik.Windows.Controls.Rating;assembly=Telerik.Windows.Controls.Input"


>
    
    <telerik:Windows7Theme x:Key="Theme" />
<Thickness x:Key="CalendarButtonButtonChromeMargin">2</Thickness>
<CornerRadius x:Key="SplitButton_SpanCornerRadius">2</CornerRadius>
<Thickness x:Key="CalendarButtonTodayVisualMargin">1</Thickness>
<SolidColorBrush x:Key="ControlOuterBorder_Pressed" Color="#FFC0CBD9" />
<SolidColorBrush x:Key="CalendarOuterBorder" Color="#FF83A5D2" />
<SolidColorBrush x:Key="CalendarViewBackground" Color="#FFFFFFFF" />
<Thickness x:Key="CalendarViewBorderThickness">1</Thickness>
<Thickness x:Key="CalendarViewHeaderPadding">3</Thickness>
<Thickness x:Key="CalendarViewMargin">-1 -1 0 0</Thickness>
<Thickness x:Key="CalendarViewHeaderMargin">0 0 0 0</Thickness>
<LinearGradientBrush x:Key="CalendarSubHeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFEBF3FF" Offset="0"/>
            <GradientStop Color="#FFD0E8FF" Offset="1"/>
            <GradientStop Color="#FFABC9EE" Offset="0.43"/>
            <GradientStop Color="#FFC6DFFF" Offset="0.42"/>
        </LinearGradientBrush>
<SolidColorBrush x:Key="CalendarSubHeaderOuterBorder" Color="#FF83A5D2" />
<SolidColorBrush x:Key="CalendarSubHeaderInnerBorder" Color="#FFEFF6FF" />
<Thickness x:Key="CalendarItemsMargin">1 0 1 1</Thickness>
<sys:Int32 x:Key="CalendarWeekHeaderVerticalOuterBorderZIndex">0</sys:Int32>
<SolidColorBrush x:Key="CalendarWeekHeaderVerticalOuterBorder" Color="#FF83A5D2" />
<Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderThickness">1</Thickness>
<Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderMargin">0 0 -1 0</Thickness>
<sys:Int32 x:Key="CalendarWeekHeaderHorizontalOuterBorderZIndex">0</sys:Int32>
<SolidColorBrush x:Key="CalendarWeekHeaderHorizontalOuterBorder" Color="#FF83A5D2"  />
<Thickness x:Key="CalendarWeekHeaderHorizontalOuterBorderThickness">1 0 1 1</Thickness>
<Thickness x:Key="CalendarWeekHeaderHorizontalOuterBorderMargin">0 0 0 0</Thickness>
<sys:Int32 x:Key="CalendarWeekHeaderVerticalInnerBorderZIndex">0</sys:Int32>
<SolidColorBrush x:Key="CalendarWeekHeaderVerticalInnerBorder" Color="#FFEFF6FF" />
<Thickness x:Key="CalendarWeekHeaderVerticalInnerBorderThickness">1</Thickness>
<Thickness x:Key="CalendarWeekHeaderVerticalInnerBorderMargin">1 1 0 1</Thickness>
<sys:Int32 x:Key="CalendarWeekHeaderHorizontalInnerBorderZIndex">0</sys:Int32>
<SolidColorBrush x:Key="CalendarWeekHeaderHorizontalInnerBorder" Color="#FFEFF6FF" />
<Thickness x:Key="CalendarWeekHeaderHorizontalInnerBorderThickness">1</Thickness>
<Thickness x:Key="CalendarWeekHeaderHorizontalInnerBorderMargin">1 0 1 1</Thickness>
<sys:Int32 x:Key="CalendarWeekHeaderVerticalBackgroundZIndex">0</sys:Int32>
<SolidColorBrush x:Key="CalendarWeekHeaderVerticalBackground" Color="#FFE2F0FD" />
<Thickness x:Key="CalendarWeekHeaderVerticalBackgroundMargin">2 2 1 2</Thickness>
<sys:Int32 x:Key="CalendarWeekHeaderHorizontalBackgroundZIndex">0</sys:Int32>
<SolidColorBrush x:Key="CalendarWeekHeaderHorizontalBackground" Color="#FFE2F0FD" />
<Thickness x:Key="CalendarWeekHeaderHorizontalBackgroundMargin">2 1 2 2</Thickness>
<SolidColorBrush x:Key="HeaderButtonOuterBorder_Normal" Color="Transparent" />
<SolidColorBrush x:Key="HeaderButtonBackground_Normal" Color="Transparent" />
<SolidColorBrush x:Key="HeaderButtonInnerBorder_Normal" Color="Transparent" />
<SolidColorBrush x:Key="HeaderButtonOuterBorder_MouseOver" Color="#FFFFC92B" />
<SolidColorBrush x:Key="HeaderButtonInnerBorder_MouseOver" Color="#FFFFFFFF" />
<LinearGradientBrush x:Key="HeaderButtonBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFFBA3" Offset="1"/>
            <GradientStop Color="#FFFFFBDA" Offset="0"/>
            <GradientStop Color="#FFFFD25A" Offset="0.43"/>
            <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
        </LinearGradientBrush>
<LinearGradientBrush x:Key="HeaderButtonOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF5F5F5F" Offset="1"/>
            <GradientStop Color="#FF282828"/>
        </LinearGradientBrush>
<LinearGradientBrush x:Key="HeaderButtonInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFB69A78"/>
            <GradientStop Color="#FFFFE17A" Offset="0.126"/>
        </LinearGradientBrush>
<LinearGradientBrush x:Key="HeaderButtonBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFD74E" Offset="0.996"/>
            <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
            <GradientStop Color="#FFFE9227" Offset="0.57"/>
            <GradientStop Color="#FFFFD18F" Offset="0.56"/>
            <GradientStop Color="#FFFFBA74" Offset="0"/>
        </LinearGradientBrush>
<SolidColorBrush x:Key="HeaderButtonIconBackground_Normal" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="HeaderButtonIconForeground_Normal" Color="#FF567DB1" />
<SolidColorBrush x:Key="HeaderButtonIconBackground_MouseOver" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="HeaderButtonIconForeground_MouseOver" Color="#FF567DB1" />
<SolidColorBrush x:Key="HeaderButtonIconBackground_Pressed" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="HeaderButtonIconForeground_Pressed" Color="#FF000000" />
<SolidColorBrush x:Key="HeaderButtonIconBackground_Disabled" Color="#88FFFFFF" />
<SolidColorBrush x:Key="HeaderButtonIconForeground_Disabled" Color="#88FFFFFF" />
<FontWeight x:Key="HeaderTextFontWeight">Bold</FontWeight>
<SolidColorBrush x:Key="HeaderTextBackground" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="HeaderTextForeground" Color="#FF000000" />
<SolidColorBrush x:Key="PickerForeground_Normal" Color="#FF000000" />
<SolidColorBrush x:Key="PanelBackground" Color="#FFFFFFFF" />
<Thickness x:Key="CalendarHeaderPadding">0</Thickness>
<Thickness x:Key="CalendarTransitionPanelMargin">0 0 0 0</Thickness>
<CornerRadius x:Key="CalendarOuterBorderCornerRadius">0</CornerRadius>
<SolidColorBrush x:Key="CalendarInnerBorder" Color="Transparent" />
<CornerRadius x:Key="CalendarInnerBorderCornerRadius">0</CornerRadius>
<Thickness x:Key="CalendarHeaderBorderThickness">1</Thickness>
<CornerRadius x:Key="CalendarHeaderOuterCornerRadius">0</CornerRadius>
<SolidColorBrush x:Key="HeaderOuterBorder" Color="#FF83A5D2" />
<LinearGradientBrush x:Key="HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFEBF3FF" Offset="0"/>
            <GradientStop Color="#FFD0E8FF" Offset="1"/>
            <GradientStop Color="#FFABC9EE" Offset="0.43"/>
            <GradientStop Color="#FFC6DFFF" Offset="0.42"/>
        </LinearGradientBrush>
<SolidColorBrush x:Key="HeaderInnerBorder" Color="#FFEFF6FF" />
<CornerRadius x:Key="CalendarHeaderInnerCornerRadius">0</CornerRadius>
<Thickness x:Key="ClockItemPadding">5 3</Thickness>
<Thickness x:Key="ClockButtonChromeMargin">2</Thickness>
<SolidColorBrush x:Key="PanelBorderBrush" Color="#FFB0B0B0" />
<SolidColorBrush x:Key="ClockBackground" Color="#FFFFFFFF" />
<CornerRadius x:Key="ClockOuterBorderCornerRadius">0</CornerRadius>
<CornerRadius x:Key="ClockInnerBorderCornerRadius">0</CornerRadius>
<SolidColorBrush x:Key="ClockInnerBorderBrush" Color="White" />
<Thickness x:Key="ClockItemsMargin">1 0 1 1</Thickness>
<LinearGradientBrush x:Key="TooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFDFEFF" Offset="0"/>
        <GradientStop Color="#FFDDE9F7" Offset="1"/>
    </LinearGradientBrush>
<SolidColorBrush x:Key="Tooltip_OuterBorderBrush" Color="#FFA0AFC3" />
<Thickness x:Key="Tooltip_OuterBorderThickness" >1</Thickness>
<SolidColorBrush x:Key="TooltipInnerBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="TooltipForeground" Color="#FF1E395B" />
<SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF" />
<LinearGradientBrush x:Key="ControlOuterBorder_Normal" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFA9BFD6" />
            <GradientStop Color="#FFCDDAEA" Offset="1" />
        </LinearGradientBrush>
<SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FFB8D6FB" />
<SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF6CAFFF" />
<SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="Transparent" />
<CornerRadius x:Key="SplitButton_SpanInnerCornerRadius">1</CornerRadius>
<CornerRadius x:Key="SplitButton_RightPartCornerRadius">0 2 2 0</CornerRadius>
<ControlTemplate x:Key="CalendarIcon" TargetType="ContentControl">
            <Grid>
                <Path x:Name="CalendarIconBackground" Width="7" Height="7" Margin="0 1 0 0" Stroke="{TemplateBinding Background}" Data="M0,0.5 L7,0.5 M0,2.5 L7,2.5 M0,4.5 L7,4.5 M0,6.5 L7,6.5 M0.5,0 L0.5,7 M2.5,0 L2.5,7 M4.5,0 L4.5,7 M6.5,0 L6.5,7" />
                <Path x:Name="CalendarIconForeground" Width="7" Height="7" Margin="0 0 0 1" Stroke="{TemplateBinding Foreground}" Data="M0,0.5 L7,0.5 M0,2.5 L7,2.5 M0,4.5 L7,4.5 M0,6.5 L7,6.5 M0.5,0 L0.5,7 M2.5,0 L2.5,7 M4.5,0 L4.5,7 M6.5,0 L6.5,7" />
            </Grid>
        </ControlTemplate>
<SolidColorBrush x:Key="ButtonIconBackground_Normal" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="ButtonIconForeground_Normal" Color="#FF000000" />
<SolidColorBrush x:Key="ButtonIconForeground_MouseOver" Color="#FF000000" />
<SolidColorBrush x:Key="ButtonIconBackground_MouseOver" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="ButtonIconForeground_Pressed" Color="#FF000000" />
<SolidColorBrush x:Key="ButtonIconBackground_Pressed" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FFD9D9D9" />
<SolidColorBrush x:Key="PickerForeground_Disabled" Color="#FF8D8D8D" />
<SolidColorBrush x:Key="ButtonIconForeground_Disabled" Color="#FF8D8D8D" />
<SolidColorBrush x:Key="ButtonIconBackground_Disabled" Color="#FFFFFFFF" />

	

    <!-- Calendar and DatePicker -->
    <telerik:InvertedBooleanToVisibilityConverter
            x:Key="InvertedBooleanToVisibilityConverterInstance" />

    <!-- CalendarButtonStyle -->
    <Style x:Key="CalendarButtonStyle" TargetType="calendar:CalendarButton">
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="calendar:CalendarButton">
                    <Grid x:Name="LayoutRoot">
                        
                        <Border Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderThickness}" />
                        <telerikChromes:ButtonChrome x:Name="SelectionChrome"
                                telerik:StyleManager.Theme="{StaticResource Theme}"
                                Margin="{StaticResource CalendarButtonButtonChromeMargin}"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                                RenderNormal="False" RenderFocused="{TemplateBinding IsFocused}"
                                RenderSelected="{TemplateBinding IsSelected}"
                                RenderHighlighted="{TemplateBinding IsMouseOver}" />
                        <Border x:Name="TodayVisual"
                                Margin="{StaticResource CalendarButtonTodayVisualMargin}"
                                Visibility="Collapsed" BorderThickness="1" CornerRadius="2"
                                BorderBrush="{StaticResource ControlOuterBorder_Pressed}" />
                        <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Grid>
                    
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFromCurrentView" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="0.5" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="LayoutRoot" Property="Opacity" Value="0.75" />
                        </Trigger>
                        <Trigger Property="ButtonType" Value="TodayDate">
                            <Setter TargetName="TodayVisual" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="ButtonType" Value="WeekNumber">
                            <Setter TargetName="SelectionChrome" Property="Visibility"
                                    Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="ButtonType" Value="WeekName">
                            <Setter TargetName="SelectionChrome" Property="Visibility"
                                    Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- calendar:CalendarButton -->
    <Style BasedOn="{StaticResource CalendarButtonStyle}" TargetType="calendar:CalendarButton" x:Key="{telerik:ThemeResourceKey ThemeType=
        telerik:Windows7Theme , ElementType=calendar:CalendarButton}"
         >
    </Style>

    <!--CalendarViewStyle-->
    <Style TargetType="calendar:CalendarView" x:Key="CalendarViewStyle">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderBrush" Value="{StaticResource CalendarOuterBorder}" />
        <Setter Property="Background" Value="{StaticResource CalendarViewBackground}" />
        <Setter Property="BorderThickness" Value="{StaticResource CalendarViewBorderThickness}" />
        <Setter Property="Padding" Value="{StaticResource CalendarViewHeaderPadding}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="calendar:CalendarView">
                    <Grid Margin="{StaticResource CalendarViewMargin}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <Border x:Name="BackgroundVisual" Grid.RowSpan="2"
                                Background="{TemplateBinding Background}" />

                        <Border x:Name="Header" Visibility="{TemplateBinding HeaderVisibility}"
                                Margin="{StaticResource CalendarViewHeaderMargin}"
                                Background="{StaticResource CalendarSubHeaderBackground}"
                                BorderBrush="{StaticResource CalendarSubHeaderOuterBorder}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource CalendarSubHeaderInnerBorder}">
                                <ContentPresenter Content="{TemplateBinding Header}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        Margin="{TemplateBinding Padding}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </Border>
                        </Border>

                        <ItemsPresenter Grid.Row="1" Margin="{StaticResource CalendarItemsMargin}" />

                        <Border x:Name="BorderBrush" Grid.RowSpan="2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}" />

                        <Rectangle x:Name="MinDesiredSize" Grid.Row="1" Width="240" Height="155" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Margin" Value="0" />
    </Style>

    <!--MonthViewStyle-->
    <Style x:Key="MonthViewStyle" TargetType="calendar:CalendarView">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderBrush" Value="{StaticResource CalendarOuterBorder}" />
        <Setter Property="Background" Value="{StaticResource CalendarViewBackground}" />
        <Setter Property="BorderThickness" Value="{StaticResource CalendarViewBorderThickness}" />
        <Setter Property="Padding" Value="{StaticResource CalendarViewHeaderPadding}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="calendar:CalendarView">
                    <Grid Margin="{StaticResource CalendarViewMargin}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <Border x:Name="BackgroundVisual" Grid.RowSpan="2"
                                Background="{TemplateBinding Background}" />

                        <Border x:Name="Header" Visibility="{TemplateBinding HeaderVisibility}"
                                Margin="{StaticResource CalendarViewHeaderMargin}"
                                Background="{StaticResource CalendarSubHeaderBackground}"
                                BorderBrush="{StaticResource CalendarSubHeaderOuterBorder}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource CalendarSubHeaderInnerBorder}">
                                <ContentPresenter Content="{TemplateBinding Header}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        Margin="{TemplateBinding Padding}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </Border>
                        </Border>

                        <Grid x:Name="WeekHeaders" Grid.Row="1"
                                DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="6*" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="7*" />
                            </Grid.ColumnDefinitions>

                            <Border x:Name="VerticalOuterBorder" Grid.RowSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalOuterBorderZIndex}"
                                    BorderBrush="{StaticResource CalendarWeekHeaderVerticalOuterBorder}"
                                    BorderThickness="{StaticResource CalendarWeekHeaderVerticalOuterBorderThickness}"
                                    Margin="{StaticResource CalendarWeekHeaderVerticalOuterBorderMargin}"
                                    Visibility="{Binding Path=HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
                            <Border x:Name="HorizontalOuterBorder" Grid.ColumnSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalOuterBorderZIndex}"
                                    BorderBrush="{StaticResource CalendarWeekHeaderHorizontalOuterBorder}"
                                    BorderThickness="{StaticResource CalendarWeekHeaderHorizontalOuterBorderThickness}"
                                    Margin="{StaticResource CalendarWeekHeaderHorizontalOuterBorderMargin}"
                                    Visibility="{Binding Path=HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
                            <Border x:Name="VerticalInnerBorder" Grid.RowSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalInnerBorderZIndex}"
                                    BorderBrush="{StaticResource CalendarWeekHeaderVerticalInnerBorder}"
                                    BorderThickness="{StaticResource CalendarWeekHeaderVerticalInnerBorderThickness}"
                                    Margin="{StaticResource CalendarWeekHeaderVerticalInnerBorderMargin}"
                                    Visibility="{Binding Path=HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
                            <Border x:Name="HorizontalInnerBorder" Grid.ColumnSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalInnerBorderZIndex}"
                                    BorderBrush="{StaticResource CalendarWeekHeaderHorizontalInnerBorder}"
                                    BorderThickness="{StaticResource CalendarWeekHeaderHorizontalInnerBorderThickness}"
                                    Margin="{StaticResource CalendarWeekHeaderHorizontalInnerBorderMargin}"
                                    Visibility="{Binding Path=HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
                            <Rectangle x:Name="VerticalBackground" Grid.RowSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalBackgroundZIndex}"
                                    Fill="{StaticResource CalendarWeekHeaderVerticalBackground}"
                                    Margin="{StaticResource CalendarWeekHeaderVerticalBackgroundMargin}"
                                    Visibility="{Binding Path=HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
                            <Rectangle x:Name="HorizontalBackground" Grid.ColumnSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalBackgroundZIndex}"
                                    Fill="{StaticResource CalendarWeekHeaderHorizontalBackground}"
                                    Margin="{StaticResource CalendarWeekHeaderHorizontalBackgroundMargin}"
                                    Visibility="{Binding Path=HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />

                        </Grid>

                        <ItemsPresenter Grid.Row="1" Margin="{StaticResource CalendarItemsMargin}" />

                        <Border x:Name="BorderBrush" Grid.RowSpan="2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}" />

                        <Rectangle x:Name="MinDesiredSize" Grid.Row="1" Width="240" Height="155" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Margin" Value="0" />
    </Style>

    <!--calendar:CalendarView-->
    <Style TargetType="calendar:CalendarView" BasedOn="{StaticResource MonthViewStyle}" x:Key="{telerik:ThemeResourceKey ThemeType=
        telerik:Windows7Theme , ElementType=calendar:CalendarView}"
         >
    </Style>

    <!-- HeaderButtonChrome -->
    <Style x:Key="HeaderButtonChrome" TargetType="telerikChromes:ButtonChrome">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource HeaderButtonOuterBorder_Normal}" />
        <Setter Property="Background" Value="{StaticResource HeaderButtonBackground_Normal}" />
        <Setter Property="CornerRadius" Value="{StaticResource SplitButton_SpanCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikChromes:ButtonChrome">
                    <Grid>
                        
                        <Border x:Name="OuterBorder" CornerRadius="{TemplateBinding CornerRadius}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border x:Name="InnerBorder"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource HeaderButtonInnerBorder_Normal}" />
                        </Border>
                    </Grid>
                    
                    <ControlTemplate.Triggers>
                        <Trigger Property="RenderMouseOver" Value="True">
                            <Setter TargetName="OuterBorder" Property="BorderBrush"
                                    Value="{StaticResource HeaderButtonOuterBorder_MouseOver}" />
                            <Setter TargetName="InnerBorder" Property="BorderBrush"
                                    Value="{StaticResource HeaderButtonInnerBorder_MouseOver}" />
                            <Setter TargetName="OuterBorder" Property="Background"
                                    Value="{StaticResource HeaderButtonBackground_MouseOver}" />
                        </Trigger>
                        <Trigger Property="RenderPressed" Value="True">
                            <Setter TargetName="OuterBorder" Property="BorderBrush"
                                    Value="{StaticResource HeaderButtonOuterBorder_Pressed}" />
                            <Setter TargetName="InnerBorder" Property="BorderBrush"
                                    Value="{StaticResource HeaderButtonInnerBorder_Pressed}" />
                            <Setter TargetName="OuterBorder" Property="Background"
                                    Value="{StaticResource HeaderButtonBackground_Pressed}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--MoveLeftButtonStyle-->
    <Style x:Key="MoveLeftButtonStyle" TargetType="RepeatButton">
        <Setter Property="Width" Value="22" />
        <Setter Property="Height" Value="22" />
        <Setter Property="Margin" Value="3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid Background="Transparent">
                        
                        <telerikChromes:ButtonChrome Style="{StaticResource HeaderButtonChrome}"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                                RenderMouseOver="{TemplateBinding IsMouseOver}"
                                RenderPressed="{TemplateBinding IsPressed}"
                                RenderFocused="{TemplateBinding IsFocused}" />
                        <Path x:Name="BackgroundIcon"
                                Fill="{StaticResource HeaderButtonIconBackground_Normal}"
                                Margin="0 2 0 0" Width="4" Height="7"
                                Data="M4,0 L4,7 3,7 3,6 2,6 2,5 1,5 1,4 0,4 0,3 1,3 1,2 2,2 2,1 3,1 3,0 z" />
                        <Path x:Name="ForegroundIcon"
                                Fill="{StaticResource HeaderButtonIconForeground_Normal}"
                                Margin="0 1 0 1" Width="4" Height="7"
                                Data="M4,0 L4,7 3,7 3,6 2,6 2,5 1,5 1,4 0,4 0,3 1,3 1,2 2,2 2,1 3,1 3,0 z" />
                    </Grid>
                    
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BackgroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconBackground_MouseOver}" />
                            <Setter TargetName="ForegroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconForeground_MouseOver}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BackgroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconBackground_Pressed}" />
                            <Setter TargetName="ForegroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconForeground_Pressed}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BackgroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconBackground_Disabled}" />
                            <Setter TargetName="ForegroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconForeground_Disabled}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--MoveRightButtonStyle-->
    <Style x:Key="MoveRightButtonStyle" TargetType="RepeatButton">
        <Setter Property="Width" Value="22" />
        <Setter Property="Height" Value="22" />
        <Setter Property="Margin" Value="3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid Background="Transparent">
                        
                        <telerikChromes:ButtonChrome Style="{StaticResource HeaderButtonChrome}"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                                RenderMouseOver="{TemplateBinding IsMouseOver}"
                                RenderPressed="{TemplateBinding IsPressed}"
                                RenderFocused="{TemplateBinding IsFocused}" />
                        <Path x:Name="BackgroundIcon"
                                Fill="{StaticResource HeaderButtonIconBackground_Normal}"
                                Margin="0 2 0 0" Width="4" Height="7"
                                Data="M0,0 L0,7 1,7 1,6 2,6 2,5 3,5 3,4 4,4 4,3 3,3 3,2 2,2 2,1 1,1 1,0 z" />
                        <Path x:Name="ForegroundIcon"
                                Fill="{StaticResource HeaderButtonIconForeground_Normal}"
                                Margin="0 1 0 1" Width="4" Height="7"
                                Data="M0,0 L0,7 1,7 1,6 2,6 2,5 3,5 3,4 4,4 4,3 3,3 3,2 2,2 2,1 1,1 1,0 z" />
                    </Grid>
                    
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BackgroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconBackground_MouseOver}" />
                            <Setter TargetName="ForegroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconForeground_MouseOver}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BackgroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconBackground_Pressed}" />
                            <Setter TargetName="ForegroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconForeground_Pressed}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BackgroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconBackground_Disabled}" />
                            <Setter TargetName="ForegroundIcon" Property="Fill"
                                    Value="{StaticResource HeaderButtonIconForeground_Disabled}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--CalendarHeaderButton-->
    <Style x:Key="CalendarHeaderButton" TargetType="Button">
        <Setter Property="Height" Value="22" />
        <Setter Property="Margin" Value="3" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid x:Name="LayoutRoot">
                        
                        <TextBlock x:Name="BackgroundText" Text="{TemplateBinding Content}"
                                Margin="0 2 0 0" HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                FontWeight="{StaticResource HeaderTextFontWeight}"
                                Foreground="{StaticResource HeaderTextBackground}" />
                        <TextBlock x:Name="ForegroundText" Text="{TemplateBinding Content}"
                                Margin="0 1 0 1" HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                FontWeight="{StaticResource HeaderTextFontWeight}"
                                Foreground="{StaticResource HeaderTextForeground}" />
                    </Grid>
                    
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BackgroundText" Property="TextDecorations"
                                    Value="Underline" />
                            <Setter TargetName="ForegroundText" Property="TextDecorations"
                                    Value="Underline" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BackgroundText" Property="TextDecorations"
                                    Value="Underline" />
                            <Setter TargetName="ForegroundText" Property="TextDecorations"
                                    Value="Underline" />
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="BackgroundText" Property="TextDecorations"
                                    Value="Underline" />
                            <Setter TargetName="ForegroundText" Property="TextDecorations"
                                    Value="Underline" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="LayoutRoot" Property="Opacity" Value="0.75" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--telerikInput:RadCalendar-->
    <Style TargetType="telerikInput:RadCalendar" 
        
         x:Key="{telerik:ThemeResourceKey ThemeType=
        telerik:Windows7Theme ,  ElementType=telerikInput:RadCalendar}"
         >
        <Setter Property="Columns" Value="1" />
        <Setter Property="Rows" Value="1" />
        <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
        <Setter Property="MonthViewStyle" Value="{StaticResource MonthViewStyle}" />
        <Setter Property="YearViewStyle" Value="{StaticResource CalendarViewStyle}" />
        <Setter Property="DecadeViewStyle" Value="{StaticResource CalendarViewStyle}" />
        <Setter Property="CenturyViewStyle" Value="{StaticResource CalendarViewStyle}" />
        <Setter Property="DayButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
        <Setter Property="MonthButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
        <Setter Property="YearButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
        <Setter Property="DecadeButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
        <Setter Property="Background" Value="{StaticResource PanelBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource CalendarOuterBorder}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="{StaticResource CalendarHeaderPadding}" />
        <Setter Property="ViewsHeaderVisibility" Value="Collapsed" />
        <Setter Property="IsTabStop" Value="False" />
        
        <Setter Property="SnapsToDevicePixels" Value="True" />
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput:RadCalendar">
                    <Grid>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <Border x:Name="Background" Grid.RowSpan="2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}" />

                        <calendar:TransitionPanel x:Name="TransitionPanel" Grid.Row="1"
                                ClipToBounds="True"
                                Margin="{StaticResource CalendarTransitionPanelMargin}">
                            <primitives:RadUniformGrid x:Name="MonthViews" Margin="1 1 0 0"
                                    Rows="{TemplateBinding Rows}"
                                    Columns="{TemplateBinding Columns}" />
                            <primitives:RadUniformGrid x:Name="YearViews" Margin="1 1 0 0"
                                    Rows="{TemplateBinding Rows}"
                                    Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
                            <primitives:RadUniformGrid x:Name="DecadeViews" Margin="1 1 0 0"
                                    Rows="{TemplateBinding Rows}"
                                    Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
                            <primitives:RadUniformGrid x:Name="CenturyViews" Margin="1 1 0 0"
                                    Rows="{TemplateBinding Rows}"
                                    Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
                        </calendar:TransitionPanel>

                        <Border x:Name="OuterBorder" Grid.RowSpan="2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{StaticResource CalendarOuterBorderCornerRadius}"
                                BorderBrush="{TemplateBinding BorderBrush}">
                            <Border x:Name="InnerBorder"
                                    BorderBrush="{StaticResource CalendarInnerBorder}"
                                    CornerRadius="{StaticResource CalendarInnerBorderCornerRadius}"
                                    BorderThickness="1" />
                        </Border>

                        <Border x:Name="Navigation" Margin="0 0 0 -1" Canvas.ZIndex="2"
                                Visibility="{TemplateBinding HeaderVisibility}"
                                BorderThickness="{StaticResource CalendarHeaderBorderThickness}"
                                CornerRadius="{StaticResource CalendarHeaderOuterCornerRadius}"
                                BorderBrush="{StaticResource HeaderOuterBorder}"
                                Background="{StaticResource HeaderBackground}">
                            <Border BorderThickness="{StaticResource CalendarHeaderBorderThickness}"
                                    BorderBrush="{StaticResource HeaderInnerBorder}"
                                    CornerRadius="{StaticResource CalendarHeaderInnerCornerRadius}"
                                    Padding="{TemplateBinding Padding}">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>

                                    <RepeatButton x:Name="MoveLeft" Grid.Column="0"
                                            Style="{StaticResource MoveLeftButtonStyle}" />
                                    <Button x:Name="Header" Grid.Column="1"
                                            Style="{StaticResource CalendarHeaderButton}" />
                                    <RepeatButton x:Name="MoveRight" Grid.Column="2"
                                            Style="{StaticResource MoveRightButtonStyle}" />

                                </Grid>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="MonthViewPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" FirstColumn="1"
                            VerticalAlignment="Stretch" Rows="7" Columns="8" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="YearViewPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True"
                            VerticalAlignment="Stretch" Rows="3" Columns="4" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DecadeViewPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True"
                            VerticalAlignment="Stretch" Rows="3" Columns="4" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="CenturyViewPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True"
                            VerticalAlignment="Stretch" Rows="3" Columns="4" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>

    </Style>

    

    <!-- Clock and TimePicker -->

    <Style TargetType="telerikInput:RadClockItem" x:Key="{telerik:ThemeResourceKey ThemeType=
        telerik:Windows7Theme , ElementType=telerikInput:RadClockItem}"
         >
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="{StaticResource ClockItemPadding}" />
        
        <Setter Property="SnapsToDevicePixels" Value="True" />
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput:RadClockItem">
                    <Grid x:Name="LayoutRoot" Background="Transparent">
                        

                        <telerikChromes:ButtonChrome x:Name="SelectionChrome"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                                Margin="{StaticResource ClockButtonChromeMargin}"
                                RenderNormal="False"
                                telerik:StyleManager.Theme="{StaticResource Theme}" RenderSelected="{TemplateBinding IsSelected}" RenderHighlighted="{TemplateBinding IsMouseOver}"
                             />
                            <ContentPresenter x:Name="Content"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Margin="{TemplateBinding Padding}" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--telerikInput:RadClock-->
    <Style TargetType="telerikInput:RadClock"
           
         x:Key="{telerik:ThemeResourceKey ThemeType=
        telerik:Windows7Theme , ElementType=telerikInput:RadClock}"
         >

        <Setter Property="Header" Value="Clock" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderBrush" Value="{StaticResource PanelBorderBrush}" />
        <Setter Property="Background" Value="{StaticResource ClockBackground}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="{StaticResource CalendarHeaderPadding}" />
        <Setter Property="IsTabStop" Value="False" />

        <Setter Property="StartTime" Value="0:0:0" />
        <Setter Property="EndTime" Value="23:59:0" />
        <Setter Property="TimeInterval" Value="1:0:0" />

        
        <Setter Property="SnapsToDevicePixels" Value="True" />
        

        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <primitives:RadUniformGrid x:Name="uniformGrid" Columns="4" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock x:Name="ContentText" Text="{Binding}" TextAlignment="Center"
                            HorizontalAlignment="Center" VerticalAlignment="Center" />
                </DataTemplate>
            </Setter.Value>
        </Setter>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput:RadClock">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <Border x:Name="BackgroundVisual" Grid.RowSpan="2"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{StaticResource ClockOuterBorderCornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}">
                            <Border CornerRadius="{StaticResource ClockInnerBorderCornerRadius}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource ClockInnerBorderBrush}" />
                        </Border>

                        <Border x:Name="Header"
                                BorderThickness="{StaticResource CalendarHeaderBorderThickness}"
                                CornerRadius="{StaticResource CalendarHeaderOuterCornerRadius}"
                                BorderBrush="{StaticResource HeaderOuterBorder}"
                                Background="{StaticResource HeaderBackground}" MinHeight="32">
                            <Border BorderThickness="{StaticResource CalendarHeaderBorderThickness}"
                                    BorderBrush="{StaticResource HeaderInnerBorder}"
                                    CornerRadius="{StaticResource CalendarHeaderInnerCornerRadius}"
                                    Padding="{TemplateBinding Padding}">
                                <ContentControl Foreground="{StaticResource HeaderTextForeground}"
                                        IsTabStop="False"
                                        FontWeight="{StaticResource HeaderTextFontWeight}"
                                        Content="{TemplateBinding Header}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        Margin="{TemplateBinding Padding}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </Border>
                        </Border>

                        <ItemsPresenter Grid.Row="1" Margin="{StaticResource ClockItemsMargin}" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    

    <DataTemplate x:Key="WatermarkTemplate">
		<TextBlock Opacity="0.5" Text="{Binding}" />
    </DataTemplate>

    <DataTemplate x:Key="TooltipTemplate">
        <Border CornerRadius="2" Background="{StaticResource TooltipBackground}"
                BorderBrush="{StaticResource Tooltip_OuterBorderBrush}"
                BorderThickness="{StaticResource Tooltip_OuterBorderThickness}" Margin="0 2">
            <Border CornerRadius="1" BorderBrush="{StaticResource TooltipInnerBorderBrush}"
                    BorderThickness="{StaticResource Tooltip_OuterBorderThickness}">
                <ContentControl Foreground="{StaticResource TooltipForeground}" Margin="5 2"
                        Content="{Binding}" />
            </Border>
        </Border>
    </DataTemplate>

    <Style TargetType="telerikInput:RadDateTimePicker" x:Key="dateTimePickerStyle">
        
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once" />
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
        
        
        <Setter Property="TooltipTemplate" Value="{StaticResource TooltipTemplate}" />
        <Setter Property="Background" Value="{StaticResource PickerBackground_Normal}" />
        <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontStyle" Value="Normal" />
        <Setter Property="FontWeight" Value="Normal" />

        <Setter Property="MinHeight" Value="22" />
        <Setter Property="Padding" Value="4 2" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />

        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="DateTimeWatermarkTemplate" Value="{StaticResource WatermarkTemplate}" />

        <Setter Property="IsTabStop" Value="False" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput:RadDateTimePicker">
                    <Grid>
                        

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="auto" />
                        </Grid.ColumnDefinitions>

                        <Border x:Name="BackgroundVisual" Grid.ColumnSpan="2"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />

                        <Border x:Name="MouseOverVisual" Grid.ColumnSpan="2"
                                IsHitTestVisible="False"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}"
                                BorderThickness="{TemplateBinding BorderThickness}" Opacity="0"
                                Visibility="Collapsed"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />

                        <telerik:RadWatermarkTextBox x:Name="PART_DateTimeInput" Grid.Column="0"
                                Text="{Binding DateTimeText, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                CurrentText="{Binding CurrentDateTimeText, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                IsReadOnly="{TemplateBinding IsReadOnly}"
                                VerticalAlignment="Stretch" Padding="{TemplateBinding Padding}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0"
                                MinHeight="0" Margin="{TemplateBinding BorderThickness}"
                                WatermarkContent="{TemplateBinding DateTimeWatermarkContent}"
                                WatermarkTemplate="{TemplateBinding DateTimeWatermarkTemplate}"
                                TextAlignment="{TemplateBinding TextAlignment}" TabIndex="0"
                                SelectionOnFocus="SelectAll"
                                telerik:StyleManager.Theme="{StaticResource Theme}" />

                        <Border x:Name="FocusVisual" Visibility="Collapsed" Grid.ColumnSpan="2"
                                IsHitTestVisible="False"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border BorderBrush="{StaticResource ControlInnerBorder_Focused}"
                                    CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}"
                                    BorderThickness="{TemplateBinding BorderThickness}" />
                        </Border>

                        <telerik:RadDropDownButton Grid.Column="1" TabIndex="1" Margin="-1 0 0 0"
                                Padding="0" DropDownIndicatorVisibility="Collapsed"
                                x:Name="PART_DropDownButton"
                                PopupPlacementTarget="{Binding ElementName=PART_DateTimeInput}"
                                IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                CloseOnEnter="True" IsTabStop="False"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch" HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                telerikInput:DateTimePickerExtensions.FocusContentOnOpen="True"
                                telerik:StyleManager.Theme="{StaticResource Theme}"
                                
                            Focusable="False"
                             >

                            <telerik:RadDropDownButton.DropDownContent>
                                <Grid>

                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>

                                    <telerikInput:RadCalendar x:Name="PART_Calendar" Grid.Column="0"
                                            IsReadOnly="{TemplateBinding IsReadOnly}"
                                            DateSelectionMode="{TemplateBinding DateSelectionMode}"
                                            Culture="{TemplateBinding Culture}"
                                            SelectionMode="Single"
                                            Style="{TemplateBinding CalendarStyle}"
                                            DisplayDateStart="{Binding DisplayDateStart, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            DisplayDate="{Binding DisplayDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            DisplayDateEnd="{Binding DisplayDateEnd, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            SelectableDateStart="{Binding SelectableDateStart, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            SelectableDateEnd="{Binding SelectableDateEnd, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            telerik:StyleManager.Theme="{StaticResource Theme}"
                                         />

                                        <telerikInput:DateTimePickerClock x:Name="PART_Clock"
                                                Grid.Column="1"
                                                ItemsSource="{TemplateBinding ClockItemsSource}"
                                                StartTime="{TemplateBinding StartTime}"
                                                EndTime="{TemplateBinding EndTime}"
                                                TimeInterval="{Binding TimeInterval, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                                IsReadOnly="{TemplateBinding IsReadOnly}"
                                                Style="{TemplateBinding ClockStyle}"
                                                Culture="{TemplateBinding Culture}"
                                                SelectedTime="{Binding SelectedTime, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            telerik:StyleManager.Theme="{StaticResource Theme}"
                                             />
                                </Grid>
                            </telerik:RadDropDownButton.DropDownContent>

                            <telerik:RadDropDownButton.Template>
                                <ControlTemplate TargetType="telerik:RadDropDownButton">
                                    <Grid>
                                        <ContentPresenter Margin="{TemplateBinding Padding}"
                                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />

										
										<Popup x:Name="DropDownPopup" 
							AllowsTransparency="True" StaysOpen="False" Focusable="false" Placement="Bottom"
							IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
											

											
												
											
                                            <ContentPresenter x:Name="DropDownPopupContent"
                                                    Content="{TemplateBinding DropDownContent}"
                                                    ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                                    DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}" />
										
										</Popup>
										
										
									</Grid>
                                </ControlTemplate>
                            </telerik:RadDropDownButton.Template>
                            <Grid>
                                <telerikChromes:ButtonChrome x:Name="ButtonChrome"
                                        telerik:StyleManager.Theme="{StaticResource Theme}"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        RenderEnabled="{TemplateBinding IsEnabled}"
                                        RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}"
                                        CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}"
                                        
                                    RenderActive="{TemplateBinding IsMouseOver}"
							            RenderFocused="{TemplateBinding IsKeyboardFocusWithin}"
                                     />

                                    <ContentControl x:Name="DropDownIcon" IsTabStop="False"
                                            Margin="4 0" Template="{StaticResource CalendarIcon}"
                                            Background="{StaticResource ButtonIconBackground_Normal}"
                                            Foreground="{StaticResource ButtonIconForeground_Normal}" />
                            </Grid>

                        </telerik:RadDropDownButton>

                        

						
						<Popup x:Name="PART_InputPopup"
                                telerik:PopupExtensions.IsOpen="{Binding IsTooltipOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                telerik:PopupExtensions.Placement="Top"
                                telerik:PopupExtensions.PlacementTarget="{Binding ElementName=PART_DateTimeInput}"
                                telerik:PopupExtensions.Owner="{Binding RelativeSource={RelativeSource TemplatedParent}}"
							       StaysOpen="False"
                                AllowsTransparency="True">
							

							
								
                            <ContentPresenter Content="{TemplateBinding TooltipContent}"
                                    ContentTemplate="{TemplateBinding TooltipTemplate}" />

								
						</Popup>
						
						
									
					</Grid>

                    
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                                Storyboard.TargetName="MouseOverVisual"
                                                Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="0:0:0.115" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetName="MouseOverVisual"
                                                Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                                Storyboard.TargetName="MouseOverVisual"
                                                Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="0:0:0.150" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetName="MouseOverVisual"
                                                Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                            <Setter TargetName="DropDownIcon" Property="Foreground"
                                    Value="{StaticResource ButtonIconForeground_MouseOver}" />
                            <Setter TargetName="DropDownIcon" Property="Background"
                                    Value="{StaticResource ButtonIconBackground_MouseOver}" />
                        </MultiTrigger>
                        <Trigger Property="IsDropDownOpen" Value="True">
                            <Setter TargetName="DropDownIcon" Property="Foreground"
                                    Value="{StaticResource ButtonIconForeground_Pressed}" />
                            <Setter TargetName="DropDownIcon" Property="Background"
                                    Value="{StaticResource ButtonIconBackground_Pressed}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="BorderBrush" TargetName="BackgroundVisual"
                                    Value="{StaticResource ControlOuterBorder_Disabled}" />
                            <Setter Property="Opacity" TargetName="MouseOverVisual" Value="0" />
                            <Setter Property="Visibility" TargetName="MouseOverVisual"
                                    Value="Collapsed" />
                            <Setter Property="Foreground" TargetName="PART_DateTimeInput"
                                    Value="{StaticResource PickerForeground_Disabled}" />
                            <Setter TargetName="DropDownIcon" Property="Foreground"
                                    Value="{StaticResource ButtonIconForeground_Disabled}" />
                            <Setter TargetName="DropDownIcon" Property="Background"
                                    Value="{StaticResource ButtonIconBackground_Disabled}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True">
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="InputMode" Value="DatePicker">
                            <Setter TargetName="PART_Clock" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="InputMode" Value="TimePicker">
                            <Setter TargetName="PART_Calendar" Property="Visibility"
                                    Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--telerikInput:RadDateTimePicker-->
    <Style TargetType="telerikInput:RadDateTimePicker"
            BasedOn="{StaticResource dateTimePickerStyle}" x:Key="{telerik:ThemeResourceKey ThemeType=
        telerik:Windows7Theme , ElementType=telerikInput:RadDateTimePicker}"
         />

        
</ResourceDictionary>
