This is a migrated thread and some comments may be shown as answers.

How to set the accent color for Windows8 theme

1 Answer 249 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Ollie
Top achievements
Rank 1
Ollie asked on 08 May 2013, 08:18 AM
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}" />
    </Style>

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

http://www.telerik.com/help/wpf/common-styles-appearance-colorizing-metro-theme.html



ta


Ollie

1 Answer, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 09 May 2013, 08:29 AM
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.

Regards,
Masha
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DatePicker
Asked by
Ollie
Top achievements
Rank 1
Answers by
Masha
Telerik team
Share this question
or