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

Expression Dark Theme on non-Telerik controls

2 Answers 179 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 27 Sep 2011, 08:56 PM
I set the theme in my application to the Telerik Expression_DarkTheme, but non-Telerik controls (Buttons, TextBoxes, etc.) don't have the Expression Dark style. It looks like they should by looking at the theme code and seeing that it has style info for these controls. Am I missing something?

I did the following in the App.xaml.cs constructor:

StyleManager.ApplicationTheme = new Expression_DarkTheme();


Thanks,
Ron

2 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 28 Sep 2011, 09:41 AM
Hi Ron,

 

This behavior is the expected one - when you set an application theme only our RadControls/Silverlight will pick their style for the corresponding theme. The native Silverlight controls will remain with the default one.
You will have theme support for native Silverlight controls only when you set the theme on a control level:

<telerik:RadGridView  telerik:StyleManager.Theme="Metro" .../>

As a kind of workaround you may set the app theme for native Silverlight controls, when using Application theme, as shown below:

App.xaml.cs:

StyleManager.SetBasedOn(((Style)Current.Resources[typeof(CheckBox)]), StyleManager.ApplicationTheme);
  
StyleManager.SetBasedOn(((Style)Current.Resources[typeof(RadioButton)]), StyleManager.ApplicationTheme);
//...the rest controls in your app

App.xaml:

<Style TargetType="CheckBox"/>
<Style TargetType="RadioButton"/>


Best wishes,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ron
Top achievements
Rank 1
answered on 28 Sep 2011, 03:26 PM
Thanks Vanya.

Is there any way to have the styles for the native Silverlight controls in a separate assembly so they are compiled? If so, would you happen to have a sample solution that demonstrates how to do it?

Ron
Tags
General Discussions
Asked by
Ron
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Ron
Top achievements
Rank 1
Share this question
or