How to set the accent color for Windows8 theme

2 posts, 0 answers
  1. Ollie
    Ollie avatar
    19 posts
    Member since:
    Jun 2012

    Posted 08 May 2013 Link to this post

    I have the DatePicker styled to use the Windows8 theme with the following XAML, I want to know how I can set the AccentColor on the Windows8 theme from XAML, the documentation is not clear:

    <Style TargetType="telerik:RadDatePicker">
            <Setter Property="telerikControls:StyleManager.Theme"
                    Value="Windows8" />
            <Setter Property="MinHeight"
                    Value="20" />
            <Setter Property="Height"
                    Value="20" />
            <Setter Property="FontFamily"
                    Value="{StaticResource MyRegularFont}" />
            <Setter Property="FontSize"
                    Value="{StaticResource NormalFontSize}" />

    The documentation here show how to set the colors in code behind and how to access the colors in XAML but does not show how to set the colors in XAML



  2. Masha
    Masha avatar
    355 posts

    Posted 09 May 2013 Link to this post

    Hi Ollie,

    Thank you for contacting us.

    Unfortunately at the moment it is not possible to colorize the whole theme in Xaml. Setting the AccentBrush in code behind like this Windows8Palette.Palette.AccentColor = Colors.Orange
    will have effect to AccentBrush for all of the Telerik controls in the application. If you need to modify the AccentBrush for DateTimePicker only, then I suggest you to edit the style of the control. The best way to achieve this is using implicit styles. Here is a very descriptive article on the topic.

    If you need any further assistance, please do not hesitate to get back to us.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top