How do I change the Mouse over orange color to blue color in RadDatePicker control

4 posts, 0 answers
  1. Debranjan
    Debranjan avatar
    9 posts
    Member since:
    May 2011

    Posted 19 Jul 2011 Link to this post


    How do I change the Mouse over orange color to blue color in RadDatePicker control. (in Calendar Icon Mouse over background and border)

    I am also given below my edit style and image. Please given me a demo file.


    <

     

     

    UserControl x:Class="Task.red_date_pikar"

     

     

     

    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:System="clr-namespace:System;assembly=mscorlib"

     

     

     

    xmlns:Telerik_Windows_Controls_Calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input"

     

     

     

    xmlns:Telerik_Windows_Controls_Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"

     

     

     

    xmlns:panels="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"

     

     

     

    xmlns:input="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"

     

     

     

    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"

     

     

     

    xmlns:calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input"

     

     

     

    Width="400"

     

     

     

    Height="330">

     

     

     

     

    <UserControl.Resources>

     

            <SolidColorBrush x:Key="PickerForeground_Normal" Color="#FF000000"/>
            <!-- Resource dictionary entries should be defined here. -->
            <SolidColorBrush x:Key="CalendarOuterBorder" Color="#FF848484"/>
            <SolidColorBrush x:Key="CalendarViewBackground" Color="#FFFFFFFF"/>
            <Thickness x:Key="CalendarViewBorderThickness">1</Thickness>
            <Thickness x:Key="CalendarViewHeaderPadding">3</Thickness>
            <SolidColorBrush x:Key="CalendarSubHeaderOuterBorder" Color="#FF848484"/>
            <LinearGradientBrush x:Key="CalendarSubHeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="White" Offset="0"/>
                <GradientStop Color="#FFCDCDCD" Offset="1"/>
                <GradientStop Color="#FFCECECE" Offset="0.42"/>
                <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="CalendarSubHeaderInnerBorder" Color="#FFFFFFFF"/>
            <Thickness x:Key="CalendarViewHeaderMargin">0 0 0 0</Thickness>
            <SolidColorBrush x:Key="CalendarWeekHeaderVerticalOuterBorder" Color="#FF848484"/>
            <Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderThickness">1</Thickness>
            <Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderMargin">0 0 -1 0</Thickness>
            <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverterInstance"/>
            <System:Int32 x:Key="CalendarWeekHeaderVerticalOuterBorderZIndex">0</System:Int32>
            <SolidColorBrush x:Key="CalendarWeekHeaderHorizontalOuterBorder" Color="#FF848484"/>
            <Thickness x:Key="CalendarWeekHeaderHorizontalOuterBorderThickness">1 0 1 1</Thickness>
            <Thickness x:Key="CalendarWeekHeaderHorizontalOuterBorderMargin">0 0 0 0</Thickness>
            <System:Int32 x:Key="CalendarWeekHeaderHorizontalOuterBorderZIndex">0</System:Int32>
            <SolidColorBrush x:Key="CalendarWeekHeaderVerticalInnerBorder" Color="#FF8AF3FF"/>
            <Thickness x:Key="CalendarWeekHeaderVerticalInnerBorderThickness">1</Thickness>
            <Thickness x:Key="CalendarWeekHeaderVerticalInnerBorderMargin">1 1 0 1</Thickness>
            <System:Int32 x:Key="CalendarWeekHeaderVerticalInnerBorderZIndex">0</System:Int32>
            <SolidColorBrush x:Key="CalendarWeekHeaderHorizontalInnerBorder" Color="#FF8AF3FF"/>
            <Thickness x:Key="CalendarWeekHeaderHorizontalInnerBorderThickness">1</Thickness>
            <Thickness x:Key="CalendarWeekHeaderHorizontalInnerBorderMargin">1 0 1 1</Thickness>
            <System:Int32 x:Key="CalendarWeekHeaderHorizontalInnerBorderZIndex">0</System:Int32>
            <SolidColorBrush x:Key="CalendarWeekHeaderVerticalBackground" Color="#FFD6F9FD"/>
            <Thickness x:Key="CalendarWeekHeaderVerticalBackgroundMargin">2 2 1 2</Thickness>
            <System:Int32 x:Key="CalendarWeekHeaderVerticalBackgroundZIndex">0</System:Int32>
            <SolidColorBrush x:Key="CalendarWeekHeaderHorizontalBackground" Color="#FFD6F9FD"/>
            <Thickness x:Key="CalendarWeekHeaderHorizontalBackgroundMargin">2 1 2 2</Thickness>
            <System:Int32 x:Key="CalendarWeekHeaderHorizontalBackgroundZIndex">0</System:Int32>
            <Thickness x:Key="CalendarItemsMargin">1 0 1 1</Thickness>
            <Thickness x:Key="CalendarViewMargin">-1 -1 0 0</Thickness>
            <Style x:Key="MonthViewStyle" TargetType="Telerik_Windows_Controls_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="Telerik_Windows_Controls_Calendar:CalendarView">
                            <Grid Margin="{StaticResource CalendarViewMargin}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Border x:Name="BackgroundVisual" Background="{TemplateBinding Background}" Grid.RowSpan="2"/>
                                <Border x:Name="Header" BorderBrush="{StaticResource CalendarSubHeaderOuterBorder}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource CalendarSubHeaderBackground}" Margin="{StaticResource CalendarViewHeaderMargin}" Visibility="{TemplateBinding HeaderVisibility}">
                                    <Border BorderBrush="{StaticResource CalendarSubHeaderInnerBorder}" BorderThickness="{TemplateBinding BorderThickness}">
                                        <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                    </Border>
                                </Border>
                                <Grid x:Name="WeekHeaders" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="7*"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="6*"/>
                                    </Grid.RowDefinitions>
                                    <Border x:Name="VerticalOuterBorder" BorderBrush="{StaticResource CalendarWeekHeaderVerticalOuterBorder}" BorderThickness="{StaticResource CalendarWeekHeaderVerticalOuterBorderThickness}" Margin="{StaticResource CalendarWeekHeaderVerticalOuterBorderMargin}" Grid.RowSpan="2" Visibility="{Binding HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalOuterBorderZIndex}"/>
                                    <Border x:Name="HorizontalOuterBorder" BorderBrush="{StaticResource CalendarWeekHeaderHorizontalOuterBorder}" BorderThickness="{StaticResource CalendarWeekHeaderHorizontalOuterBorderThickness}" Grid.ColumnSpan="2" Margin="{StaticResource CalendarWeekHeaderHorizontalOuterBorderMargin}" Visibility="{Binding HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalOuterBorderZIndex}"/>
                                    <Border x:Name="VerticalInnerBorder" BorderBrush="{StaticResource CalendarWeekHeaderVerticalInnerBorder}" BorderThickness="{StaticResource CalendarWeekHeaderVerticalInnerBorderThickness}" Margin="{StaticResource CalendarWeekHeaderVerticalInnerBorderMargin}" Grid.RowSpan="2" Visibility="{Binding HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalInnerBorderZIndex}"/>
                                    <Border x:Name="HorizontalInnerBorder" BorderBrush="{StaticResource CalendarWeekHeaderHorizontalInnerBorder}" BorderThickness="{StaticResource CalendarWeekHeaderHorizontalInnerBorderThickness}" Grid.ColumnSpan="2" Margin="{StaticResource CalendarWeekHeaderHorizontalInnerBorderMargin}" Visibility="{Binding HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalInnerBorderZIndex}"/>
                                    <Rectangle x:Name="VerticalBackground" Fill="{StaticResource CalendarWeekHeaderVerticalBackground}" Margin="{StaticResource CalendarWeekHeaderVerticalBackgroundMargin}" Grid.RowSpan="2" Visibility="{Binding HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalBackgroundZIndex}"/>
                                    <Rectangle x:Name="HorizontalBackground" Grid.ColumnSpan="2" Fill="{StaticResource CalendarWeekHeaderHorizontalBackground}" Margin="{StaticResource CalendarWeekHeaderHorizontalBackgroundMargin}" Visibility="{Binding HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalBackgroundZIndex}"/>
                                </Grid>
                                <ItemsPresenter Margin="{StaticResource CalendarItemsMargin}" Grid.Row="1"/>
                                <Border x:Name="BorderBrush" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.RowSpan="2"/>
                                <Rectangle x:Name="MinDesiredSize" Height="155" Grid.Row="1" Width="240"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Margin" Value="0"/>
            </Style>
            <Style x:Key="CalendarViewStyle" TargetType="Telerik_Windows_Controls_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="Telerik_Windows_Controls_Calendar:CalendarView">
                            <Grid Margin="{StaticResource CalendarViewMargin}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Border x:Name="BackgroundVisual" Background="{TemplateBinding Background}" Grid.RowSpan="2"/>
                                <Border x:Name="Header" BorderBrush="{StaticResource CalendarSubHeaderOuterBorder}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource CalendarSubHeaderBackground}" Margin="{StaticResource CalendarViewHeaderMargin}" Visibility="{TemplateBinding HeaderVisibility}">
                                    <Border BorderBrush="{StaticResource CalendarSubHeaderInnerBorder}" BorderThickness="{TemplateBinding BorderThickness}">
                                        <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                    </Border>
                                </Border>
                                <ItemsPresenter Margin="{StaticResource CalendarItemsMargin}" Grid.Row="1"/>
                                <Border x:Name="BorderBrush" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.RowSpan="2"/>
                                <Rectangle x:Name="MinDesiredSize" Height="155" Grid.Row="1" Width="240"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Margin" Value="0"/>
            </Style>
            <CornerRadius x:Key="SplitButton_SpanCornerRadius">1</CornerRadius>
            <Thickness x:Key="CalendarButtonButtonChromeMargin">2</Thickness>
            <telerik:Office_BlackTheme x:Key="Theme"/>
            <LinearGradientBrush x:Key="ControlOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF282828"/>
                <GradientStop Color="#FF5F5F5F" Offset="1"/>
            </LinearGradientBrush>
            <Thickness x:Key="CalendarButtonTodayVisualMargin">1</Thickness>
            <Style x:Key="CalendarButtonStyle" TargetType="Telerik_Windows_Controls_Calendar:CalendarButton">
                <Setter Property="Padding" Value="0"/>
                <Setter Property="HorizontalContentAlignment" Value="Center"/>
                <Setter Property="VerticalContentAlignment" Value="Center"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Telerik_Windows_Controls_Calendar:CalendarButton">
                            <Grid x:Name="LayoutRoot">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteDoubleKeyFrame KeyTime="0" Value="0.75"/>
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="ViewStates">
                                        <VisualState x:Name="IsInAnotherView"/>
                                        <VisualState x:Name="IsNotFromCurrentView">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content">
                                                    <DiscreteDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="ButtonType">
                                        <VisualState x:Name="Year"/>
                                        <VisualState x:Name="Decade"/>
                                        <VisualState x:Name="Date"/>
                                        <VisualState x:Name="WeekName">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectionChrome">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="WeekNumber">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectionChrome">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="TodayDate">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TodayVisual">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Month"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Unfocused"/>
                                        <VisualState x:Name="Focused"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                        <VisualState x:Name="Unselected"/>
                                        <VisualState x:Name="Selected"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border BorderBrush="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                                <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="SelectionChrome" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" Margin="{StaticResource CalendarButtonButtonChromeMargin}" RenderNormal="False" RenderSelected="{TemplateBinding IsSelected}" RenderFocused="{TemplateBinding IsFocused}" RenderHighlighted="{TemplateBinding IsMouseOver}" />
                                <Border x:Name="TodayVisual" BorderBrush="{StaticResource ControlOuterBorder_Pressed}" BorderThickness="1" CornerRadius="2" Margin="{StaticResource CalendarButtonTodayVisualMargin}" Visibility="Collapsed"/>
                                <ContentPresenter x:Name="Content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <SolidColorBrush x:Key="PanelBackground" Color="#FFFFFFFF"/>
            <Thickness x:Key="CalendarHeaderPadding">0</Thickness>
            <Thickness x:Key="CalendarTransitionPanelMargin">0 0 0 0</Thickness>
            <SolidColorBrush x:Key="CalendarInnerBorder" Color="Transparent"/>
            <CornerRadius x:Key="CalendarInnerBorderCornerRadius">0</CornerRadius>
            <CornerRadius x:Key="CalendarOuterBorderCornerRadius">0</CornerRadius>
            <SolidColorBrush x:Key="HeaderOuterBorder" Color="#FF389BFF"/>
            <Thickness x:Key="CalendarHeaderBorderThickness">1</Thickness>
            <LinearGradientBrush x:Key="HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFDAEBFD" Offset="1"/>
                <GradientStop Color="#FFD8EBFD"/>
                <GradientStop Color="#FF389BFF" Offset="0.428"/>
                <GradientStop Color="#FF0066CC" Offset="0.448"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="HeaderInnerBorder" Color="#FFDAEBFD"/>
            <SolidColorBrush x:Key="HeaderButtonOuterBorder_Normal" Color="#FF848484"/>
            <SolidColorBrush x:Key="HeaderButtonBackground_Normal" Color="Transparent"/>
            <SolidColorBrush x:Key="HeaderButtonInnerBorder_Normal" Color="#0066cc"/>
            <SolidColorBrush x:Key="HeaderButtonOuterBorder_MouseOver" Color="#0066CC"/>
            <SolidColorBrush x:Key="HeaderButtonInnerBorder_MouseOver" Color="#0066CC"/>
            <SolidColorBrush x:Key="HeaderButtonBackground_MouseOver" Color="White"/>
            <LinearGradientBrush x:Key="HeaderButtonOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF5F5F5F" Offset="1"/>
                <GradientStop Color="#FF282828"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="HeaderButtonInnerBorder_Pressed" Color="Transparent"/>
            <SolidColorBrush x:Key="HeaderButtonBackground_Pressed" Color="White"/>
            <Style x:Key="HeaderButtonChrome" TargetType="Telerik_Windows_Controls_Chromes: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="Telerik_Windows_Controls_Chromes:ButtonChrome">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="OuterBorder">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonOuterBorder_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="InnerBorder">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonInnerBorder_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="OuterBorder">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonBackground_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="OuterBorder">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonOuterBorder_Pressed}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="InnerBorder">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonInnerBorder_Pressed}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="OuterBorder">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonBackground_Pressed}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}">
                                    <Border x:Name="InnerBorder" BorderBrush="{StaticResource HeaderButtonInnerBorder_Normal}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                                </Border>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <SolidColorBrush x:Key="HeaderButtonIconBackground_Normal" Color="#FF000000"/>
            <SolidColorBrush x:Key="HeaderButtonIconForeground_Normal" Color="#FFFFFFFF"/>
            <SolidColorBrush x:Key="HeaderButtonIconBackground_Disabled" Color="#88000000"/>
            <SolidColorBrush x:Key="HeaderButtonIconForeground_Disabled" Color="#88FFFFFF"/>
            <SolidColorBrush x:Key="HeaderButtonIconBackground_MouseOver" Color="#FFFFFFFF"/>
            <SolidColorBrush x:Key="HeaderButtonIconForeground_MouseOver" Color="#FF000000"/>
            <SolidColorBrush x:Key="HeaderButtonIconBackground_Pressed" Color="#FFFFFFFF"/>
            <SolidColorBrush x:Key="HeaderButtonIconForeground_Pressed" Color="#FF000000"/>
            <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">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_Disabled}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_Disabled}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_Pressed}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_Pressed}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Telerik_Windows_Controls_Chromes:ButtonChrome CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" Style="{StaticResource HeaderButtonChrome}"/>
                                <Path x:Name="BackgroundIcon" 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" Fill="{StaticResource HeaderButtonIconBackground_Normal}" Height="7" Margin="0 2 0 0" Width="4"/>
                                <Path x:Name="ForegroundIcon" 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" Fill="{StaticResource HeaderButtonIconForeground_Normal}" Height="7" Margin="0 1 0 1" Width="4"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <SolidColorBrush x:Key="HeaderTextBackground" Color="#FF000000"/>
            <FontWeight x:Key="HeaderTextFontWeight">Bold</FontWeight>
            <SolidColorBrush x:Key="HeaderTextForeground" Color="#FFFFFFFF"/>
            <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">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteDoubleKeyFrame KeyTime="0" Value="0.75"/>
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="TextDecorations" Storyboard.TargetName="BackgroundText">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Underline"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="TextDecorations" Storyboard.TargetName="ForegroundText">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Underline"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Focused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="TextDecorations" Storyboard.TargetName="BackgroundText">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Underline"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="TextDecorations" Storyboard.TargetName="ForegroundText">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Underline"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="TextDecorations" Storyboard.TargetName="BackgroundText">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Underline"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="TextDecorations" Storyboard.TargetName="ForegroundText">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Underline"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <TextBlock x:Name="BackgroundText" Foreground="{StaticResource HeaderTextBackground}" FontWeight="{StaticResource HeaderTextFontWeight}" HorizontalAlignment="Center" Margin="0 2 0 0" Text="{TemplateBinding Content}" VerticalAlignment="Center"/>
                                <TextBlock x:Name="ForegroundText" Foreground="{StaticResource HeaderTextForeground}" FontWeight="{StaticResource HeaderTextFontWeight}" HorizontalAlignment="Center" Margin="0 1 0 1" Text="{TemplateBinding Content}" VerticalAlignment="Center"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <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">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_Disabled}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_Disabled}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_Pressed}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_Pressed}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Telerik_Windows_Controls_Chromes:ButtonChrome CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" Style="{StaticResource HeaderButtonChrome}"/>
                                <Path x:Name="BackgroundIcon" 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" Fill="{StaticResource HeaderButtonIconBackground_Normal}" Height="7" Margin="0 2 0 0" Width="4"/>
                                <Path x:Name="ForegroundIcon" 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" Fill="{StaticResource HeaderButtonIconForeground_Normal}" Height="7" Margin="0 1 0 1" Width="4"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <CornerRadius x:Key="CalendarHeaderInnerCornerRadius">0</CornerRadius>
            <CornerRadius x:Key="CalendarHeaderOuterCornerRadius">0</CornerRadius>
            <Style x:Key="RadCalendarDefaultStyleKey" TargetType="telerik: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="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="telerik:RadCalendar">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.RowSpan="2"/>
                                <Telerik_Windows_Controls_Calendar:TransitionPanel x:Name="TransitionPanel" ClipToBounds="True" Margin="{StaticResource CalendarTransitionPanelMargin}" Grid.Row="1">
                                    <telerik:RadUniformGrid x:Name="MonthViews" Columns="{TemplateBinding Columns}" Margin="1 1 0 0" Rows="{TemplateBinding Rows}"/>
                                    <telerik:RadUniformGrid x:Name="YearViews" Columns="{TemplateBinding Columns}" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Visibility="Collapsed"/>
                                    <telerik:RadUniformGrid x:Name="DecadeViews" Columns="{TemplateBinding Columns}" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Visibility="Collapsed"/>
                                    <telerik:RadUniformGrid x:Name="CenturyViews" Columns="{TemplateBinding Columns}" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Visibility="Collapsed"/>
                                </Telerik_Windows_Controls_Calendar:TransitionPanel>
                                <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource CalendarOuterBorderCornerRadius}" Grid.RowSpan="2">
                                    <Border x:Name="InnerBorder" BorderBrush="{StaticResource CalendarInnerBorder}" BorderThickness="1" CornerRadius="{StaticResource CalendarInnerBorderCornerRadius}"/>
                                </Border>
                                <Border x:Name="Navigation" BorderBrush="{StaticResource HeaderOuterBorder}" BorderThickness="{StaticResource CalendarHeaderBorderThickness}" Background="{StaticResource HeaderBackground}" CornerRadius="{StaticResource CalendarHeaderOuterCornerRadius}" Margin="0 0 0 -1" Visibility="{TemplateBinding HeaderVisibility}" Canvas.ZIndex="2">
                                    <Border BorderBrush="{StaticResource HeaderInnerBorder}" BorderThickness="{StaticResource CalendarHeaderBorderThickness}" 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>
                            <Telerik_Windows_Controls_Calendar:CalendarPanel Columns="8" FirstColumn="1" PreserveSpaceForCollapsedChildren="True" Rows="7" VerticalAlignment="Stretch"/>
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="YearViewPanel">
                    <Setter.Value>
                        <ItemsPanelTemplate>
                            <Telerik_Windows_Controls_Calendar:CalendarPanel Columns="4" PreserveSpaceForCollapsedChildren="True" Rows="3" VerticalAlignment="Stretch"/>
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="DecadeViewPanel">
                    <Setter.Value>
                        <ItemsPanelTemplate>
                            <Telerik_Windows_Controls_Calendar:CalendarPanel Columns="4" PreserveSpaceForCollapsedChildren="True" Rows="3" VerticalAlignment="Stretch"/>
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="CenturyViewPanel">
                    <Setter.Value>
                        <ItemsPanelTemplate>
                            <Telerik_Windows_Controls_Calendar:CalendarPanel Columns="4" PreserveSpaceForCollapsedChildren="True" Rows="3" VerticalAlignment="Stretch"/>
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <SolidColorBrush x:Key="PanelBorderBrush" Color="#FF848484"/>
            <SolidColorBrush x:Key="ClockBackground" Color="#FFFFFFFF"/>
            <SolidColorBrush x:Key="ClockInnerBorderBrush" Color="White"/>
            <CornerRadius x:Key="ClockInnerBorderCornerRadius">0</CornerRadius>
            <CornerRadius x:Key="ClockOuterBorderCornerRadius">0</CornerRadius>
            <Thickness x:Key="ClockItemsMargin">1 0 1 1</Thickness>
            <Style x:Key="RadClockDefaultStyleKey" TargetType="telerik: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="ItemsPanel">
                    <Setter.Value>
                        <ItemsPanelTemplate>
                            <telerik:RadUniformGrid x:Name="uniformGrid" Columns="4"/>
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="ItemTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <TextBlock x:Name="ContentText" HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding}" VerticalAlignment="Center"/>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="telerik:RadClock">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Border x:Name="BackgroundVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{StaticResource ClockOuterBorderCornerRadius}" Grid.RowSpan="2">
                                    <Border BorderBrush="{StaticResource ClockInnerBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ClockInnerBorderCornerRadius}"/>
                                </Border>
                                <Border x:Name="Header" BorderBrush="{StaticResource HeaderOuterBorder}" BorderThickness="{StaticResource CalendarHeaderBorderThickness}" Background="{StaticResource HeaderBackground}" CornerRadius="{StaticResource CalendarHeaderOuterCornerRadius}" MinHeight="32">
                                    <Border BorderBrush="{StaticResource HeaderInnerBorder}" BorderThickness="{StaticResource CalendarHeaderBorderThickness}" CornerRadius="{StaticResource CalendarHeaderInnerCornerRadius}" Padding="{TemplateBinding Padding}">
                                        <ContentControl ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Foreground="{StaticResource HeaderTextForeground}" FontWeight="{StaticResource HeaderTextFontWeight}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                    </Border>
                                </Border>
                                <ItemsPresenter Margin="{StaticResource ClockItemsMargin}" Grid.Row="1"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <SolidColorBrush x:Key="Tooltip_OuterBorderBrush" Color="#FF848484"/>
            <Thickness x:Key="Tooltip_OuterBorderThickness">1</Thickness>
            <LinearGradientBrush x:Key="TooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                <GradientStop Color="#FFDEDEDE" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="TooltipInnerBorderBrush" Color="Transparent"/>
            <SolidColorBrush x:Key="TooltipForeground" Color="#FF000000"/>
            <DataTemplate x:Key="TooltipTemplate">
                <Border BorderBrush="{StaticResource Tooltip_OuterBorderBrush}" BorderThickness="{StaticResource Tooltip_OuterBorderThickness}" Background="{StaticResource TooltipBackground}" CornerRadius="2" Margin="0 2">
                    <Border BorderBrush="{StaticResource TooltipInnerBorderBrush}" BorderThickness="{StaticResource Tooltip_OuterBorderThickness}" CornerRadius="1">
                        <ContentControl Content="{Binding}" Foreground="{StaticResource TooltipForeground}" Margin="5 2"/>
                    </Border>
                </Border>
            </DataTemplate>
            <SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF"/>
            <SolidColorBrush x:Key="ControlOuterBorderN_Normal" Color="#FF848484"/>
            <DataTemplate x:Key="WatermarkTemplate">
                <Grid Margin="1" VerticalAlignment="Center">
                    <TextBlock Opacity="0.5" Text="{Binding}"/>
                </Grid>
            </DataTemplate>
            <SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#0066CC"/>
            <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#0066CC"/>
            <SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="Transparent"/>
            <CornerRadius x:Key="SplitButton_SpanInnerCornerRadius">0</CornerRadius>
            <CornerRadius x:Key="SplitButton_RightPartCornerRadius">0 1 1 0</CornerRadius>
            <SolidColorBrush x:Key="ButtonIconBackground_Normal" Color="blue"/>
            <SolidColorBrush x:Key="ButtonIconForeground_Normal" Color="#FF000000"/>
            <ControlTemplate x:Key="CalendarIcon" TargetType="ContentControl">
                <Grid>
                    <!--<Path x:Name="CalendarIconBackground" 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" Height="7" Margin="0 1 0 0" Stroke="{TemplateBinding Background}" Width="7"/>
                    <Path x:Name="CalendarIconForeground" 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" Height="7" Margin="0 0 0 1" Stroke="{TemplateBinding Foreground}" Width="7"/>-->
                    <Border Margin="0 0 0 0" BorderThickness="1" BorderBrush="Transparent" x:Name="CalendarIconForeground">
                        <Image Width="17" Height="19" Source="calendar.png" Margin="0,0,0,0"/>
                    </Border>
                </Grid>
            </ControlTemplate>
            <SolidColorBrush x:Key="ButtonIconForeground_MouseOver" Color="#FF000000"/>
            <SolidColorBrush x:Key="ButtonIconBackground_MouseOver" Color="#FFFFFFFF"/>
            <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FF989898"/>
            <SolidColorBrush x:Key="PickerForeground_Disabled" Color="#FF8D8D8D"/>
            <SolidColorBrush x:Key="ButtonIconForeground_Disabled" Color="#FF8D8D8D"/>
            <SolidColorBrush x:Key="ButtonIconBackground_Disabled" Color="#FFFFFFFF"/>
            <Style x:Key="RadDatePickerStyle1" TargetType="telerik:RadDatePicker">
                <Setter Property="TabNavigation" Value="Once"/>
                <Setter Property="CalendarStyle" Value="{StaticResource RadCalendarDefaultStyleKey}"/>
                <Setter Property="ClockStyle" Value="{StaticResource RadClockDefaultStyleKey}"/>
                <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 ControlOuterBorderN_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="telerik:RadDatePicker">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition Width="auto"/>
                                </Grid.ColumnDefinitions>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual">
                                                    <LinearDoubleKeyFrame KeyTime="0:0:0.150" Value="0"/>
                                                </DoubleAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Collapsed</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual">
                                                    <LinearDoubleKeyFrame KeyTime="0:0:0.115" Value="1"/>
                                                </DoubleAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Visible</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="RenderActive" Storyboard.TargetName="ButtonChrome">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <System:Boolean>True</System:Boolean>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="DropDownIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="DropDownIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BackgroundVisual">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual">
                                                    <LinearDoubleKeyFrame KeyTime="0:0:0.050" Value="0"/>
                                                </DoubleAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.050">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Collapsed</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="PART_DateTimeInput">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource PickerForeground_Disabled}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="DropDownIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="DropDownIcon">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="RenderFocused" Storyboard.TargetName="ButtonChrome">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <System:Boolean>True</System:Boolean>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Visible</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Unfocused"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="InputTypeStates">
                                        <VisualState x:Name="DateTimePicker"/>
                                        <VisualState x:Name="DatePicker">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PART_Clock">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="TimePicker">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PART_Calendar">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="ValidationStates">
                                        <VisualState x:Name="Valid"/>
                                        <VisualState x:Name="InvalidUnfocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationTooltip">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="InvalidFocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationTooltip">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="ValidationTooltip">
                                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.1">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <System:Boolean>True</System:Boolean>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border x:Name="BackgroundVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"/>
                                <Border x:Name="MouseOverVisual" BorderBrush="{StaticResource ControlOuterBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" IsHitTestVisible="False" Opacity="0" Visibility="Collapsed"/>
                                <telerik:RadWatermarkTextBox x:Name="PART_DateTimeInput" BorderBrush="{x:Null}" BorderThickness="0" Background="{x:Null}" Grid.Column="0" CurrentText="{Binding CurrentDateTimeText, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{TemplateBinding IsReadOnly}" Margin="{TemplateBinding BorderThickness}" MinHeight="0" Padding="{TemplateBinding Padding}" SelectionOnFocus="SelectAll" TextAlignment="{TemplateBinding TextAlignment}" Text="{Binding DateTimeText, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" TabIndex="0" VerticalAlignment="Stretch" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" WatermarkTemplate="{TemplateBinding DateTimeWatermarkTemplate}" WatermarkContent="{TemplateBinding DateTimeWatermarkContent}"/>
                                <Border x:Name="FocusVisual" BorderBrush="{StaticResource ControlOuterBorder_Focused}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" IsHitTestVisible="False" Visibility="Collapsed">
                                    <Border BorderBrush="{StaticResource ControlInnerBorder_Focused}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}"/>
                                </Border>
                                <telerik:RadDropDownButton x:Name="PART_DropDownButton" CloseOnEnter="True" Grid.Column="1" DropDownIndicatorVisibility="Collapsed" telerik:DateTimePickerExtensions.FocusContentOnOpen="True" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="-1 0 0 0" Padding="0" PopupPlacementTarget="{Binding ElementName=PART_DateTimeInput}" telerik:StyleManager.Theme="{StaticResource Theme}" TabIndex="1" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch">
                                    <telerik:RadDropDownButton.DropDownContent>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <telerik:RadCalendar x:Name="PART_Calendar" Culture="{TemplateBinding Culture}" Grid.Column="0" DisplayDateEnd="{Binding DisplayDateEnd, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DateSelectionMode="{TemplateBinding DateSelectionMode}" DisplayDateStart="{Binding DisplayDateStart, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DisplayDate="{Binding DisplayDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsReadOnly="{TemplateBinding IsReadOnly}" Style="{TemplateBinding CalendarStyle}" SelectableDateEnd="{Binding SelectableDateEnd, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" SelectionMode="Single" SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" SelectableDateStart="{Binding SelectableDateStart, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                            <telerik:DateTimePickerClock x:Name="PART_Clock" Culture="{TemplateBinding Culture}" Grid.Column="1" EndTime="{TemplateBinding EndTime}" IsReadOnly="{TemplateBinding IsReadOnly}" ItemsSource="{TemplateBinding ClockItemsSource}" Style="{TemplateBinding ClockStyle}" SelectedTime="{Binding SelectedTime, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" StartTime="{TemplateBinding StartTime}" TimeInterval="{Binding TimeInterval, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                        </Grid>
                                    </telerik:RadDropDownButton.DropDownContent>
                                    <telerik:RadDropDownButton.Template>
                                        <ControlTemplate TargetType="telerik:RadDropDownButton">
                                            <Grid>
                                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                <telerik:Popup x:Name="DropDownPopup">
                                                    <ContentPresenter x:Name="DropDownPopupContent" ContentTemplate="{TemplateBinding DropDownContentTemplate}" Content="{TemplateBinding DropDownContent}" DataContext="{Binding DataContext, RelativeSource={RelativeSource TemplatedParent}}"/>
                                                </telerik:Popup>
                                            </Grid>
                                        </ControlTemplate>
                                    </telerik:RadDropDownButton.Template>
                                    <Grid>
                                        <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="ButtonChrome" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}"/>
                                        <ContentControl x:Name="DropDownIcon" Background="{StaticResource ButtonIconBackground_Normal}" Foreground="{StaticResource ButtonIconForeground_Normal}" IsTabStop="False" Margin="4 0" Template="{StaticResource CalendarIcon}"/>
                                    </Grid>
                                </telerik:RadDropDownButton>
                                <Telerik_Windows_Controls_Chromes:ValidationTooltip x:Name="ValidationTooltip" Grid.ColumnSpan="2" TooltipPlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" TooltipContent="{Binding (Validation.Errors), RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed"/>
                                <telerik:Popup IsOpen="{Binding IsTooltipOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Owner="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Top" PlacementTarget="{Binding ElementName=PART_DateTimeInput}">
                                    <ContentPresenter ContentTemplate="{TemplateBinding TooltipTemplate}" Content="{TemplateBinding TooltipContent}"/>
                                </telerik:Popup>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </UserControl.Resources>
        <Grid x:Name="LayoutRoot"
              Background="White">
            <input:RadDatePicker HorizontalAlignment="Center"
                                 Width="210" Margin="0 30 0 0"
                                 VerticalAlignment="Top"
                                 Style="{StaticResource RadDatePickerStyle1}">

            </input:RadDatePicker>
        </Grid>
    </UserControl>

  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 20 Jul 2011 Link to this post

    Hi Debranjan,

    The element you wish to customize is actulaly the content of the DropDownButton:

    <telerik:RadDropDownButton x:Name="PART_DropDownButton" CloseOnEnter="True" Grid.Column="1" DropDownIndicatorVisibility="Collapsed" telerik:DateTimePickerExtensions.FocusContentOnOpen="True" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="-1 0 0 0" Padding="0" PopupPlacementTarget="{Binding ElementName=PART_DateTimeInput}" telerik:StyleManager.Theme="{StaticResource Theme}" TabIndex="1" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch">
                                  <telerik:RadDropDownButton.DropDownContent>
                                      <Grid>
                                          <Grid.ColumnDefinitions>
                                              <ColumnDefinition Width="*"/>
                                              <ColumnDefinition Width="*"/>
                                          </Grid.ColumnDefinitions>
                                          <telerik:RadCalendar x:Name="PART_Calendar" Culture="{TemplateBinding Culture}" Grid.Column="0" DisplayDateEnd="{Binding DisplayDateEnd, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DateSelectionMode="{TemplateBinding DateSelectionMode}" DisplayDateStart="{Binding DisplayDateStart, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DisplayDate="{Binding DisplayDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsReadOnly="{TemplateBinding IsReadOnly}" Style="{TemplateBinding CalendarStyle}" SelectableDateEnd="{Binding SelectableDateEnd, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" SelectionMode="Single" SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" SelectableDateStart="{Binding SelectableDateStart, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                          <telerik:DateTimePickerClock x:Name="PART_Clock" Culture="{TemplateBinding Culture}" Grid.Column="1" EndTime="{TemplateBinding EndTime}" IsReadOnly="{TemplateBinding IsReadOnly}" ItemsSource="{TemplateBinding ClockItemsSource}" Style="{TemplateBinding ClockStyle}" SelectedTime="{Binding SelectedTime, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" StartTime="{TemplateBinding StartTime}" TimeInterval="{Binding TimeInterval, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                      </Grid>
                                  </telerik:RadDropDownButton.DropDownContent>
                                  <telerik:RadDropDownButton.Template>
                                      <ControlTemplate TargetType="telerik:RadDropDownButton">
                                          <Grid>
                                              <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                              <telerik:Popup x:Name="DropDownPopup">
                                                  <ContentPresenter x:Name="DropDownPopupContent" ContentTemplate="{TemplateBinding DropDownContentTemplate}" Content="{TemplateBinding DropDownContent}" DataContext="{Binding DataContext, RelativeSource={RelativeSource TemplatedParent}}"/>
                                              </telerik:Popup>
                                          </Grid>
                                      </ControlTemplate>
                                  </telerik:RadDropDownButton.Template>
                                  <Grid>
                                      <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="ButtonChrome" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}"/>
                                      <ContentControl x:Name="DropDownIcon" Background="{StaticResource ButtonIconBackground_Normal}" Foreground="{StaticResource ButtonIconForeground_Normal}" IsTabStop="False" Margin="4 0" Template="{StaticResource CalendarIcon}"/>
                                  </Grid>
                              </telerik:RadDropDownButton>

    In particular, you need to modify the ButtonChrome, which is responsible for the visual states and brushes of the DropDownButton:

    <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="ButtonChrome" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}"/> 

    There are two possible approaches:

    - You can generate the Style for the ButtonChrome and change the brushes that correspond to the MouseOver state.

    - You can replace the ButtonChrome with a Border and display that Border only when the button has been moused over. For example:

    <Border x:Name="MouseOverBorder" Background="{StaticResource MouseOver_Background}" Visibility="Collapsed" />

    The latter can be done if you create and apply a Style for the PART_DropDownButton and include in it the visual states for MouseOver, Pressed, etc.

    I suggest that you follow the first approach and use a ButtonChromeStyle. This way you will keep the relationship between the MouseOver state of the entire RadDatePicker control and the MouseOver state of the DropDownButton. Having the ButtonChrome helps to be consistent across the look and feel of the control - your DropDownButton will know that its parent has been moused over and will render its own mouse over state.

    I hope this helps.

    Best wishes,
    Dani
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
  4. Kenya
    Kenya avatar
    3 posts
    Member since:
    Nov 2011

    Posted 29 Nov 2011 Link to this post

    Hello, I'm trying to do the same thing. I've edited the Button Chrome styles but it only changed the drop down button and not the hover styles. Any advice? Thank you.
  5. Dani
    Admin
    Dani avatar
    848 posts

    Posted 30 Nov 2011 Link to this post

    Hi Kenya,

    The attached sample contains a custom ButtonChromeStyle1 style, generated by Blend. It has a modified MouseOver brush. You can also check the attached screnshot to see exactly which brushes or GradientStops were changed. Please, use the Resources tab in Expression Blend to easily spot and modify brushes for the ButtonChrome.

    I hope this helps.

    Regards,
    Dani
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top