Style for DatePicker

2 posts, 0 answers
  1. Dan M
    Dan M avatar
    4 posts
    Member since:
    Sep 2009

    Posted 07 Mar 2011 Link to this post

    I am trying to apply a Theme to the DatePicker control but I also want to hide the week numbers in the calendar pop-up. This is the code

    <Window x:Class="WPF_RadDateTimePicker.MainWindow"
            Title="MainWindow" Height="350" Width="525">
            <Style x:Key="calendarStyle" TargetType="telerik:RadCalendar">           
                <Setter Property="AreWeekNumbersVisible" Value="False" />
            <telerik:RadDateTimePicker Width="100" VerticalAlignment="Center"
                                       CalendarStyle="{StaticResource calendarStyle}"
    As soon as I reffer to the static calendarStyle the Expression_Dark theme is no longer correctly applied to the Calendar control
    otherwise works fine. How can I fix this?? ( I using 2010 Q3 version of the product)
  2. Dani
    Dani avatar
    848 posts

    Posted 11 Mar 2011 Link to this post

    Hello Dan,

    You will need to base your CalendarStyle on the Expression theme to prevent the style from overriding the theme. Use the ThemeResourceKey as follows:

    <Style x:Key="CalendarStyle" TargetType="telerik:RadCalendar" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Expression_DarkTheme, ElementType=telerik:RadCalendar}}">           
              <Setter Property="AreWeekNumbersVisible" Value="False" />

    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top