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

Custom Themes ^ ButtonChrome

5 Answers 113 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mark
Top achievements
Rank 1
Mark asked on 09 Aug 2012, 04:39 PM
I trying to create a custom theme that will allow me to customize the colors of all the Telerik controls used throughout our application. I followed Telerik's guidelines for this process and have a partially functional "Default" theme. This theme works just fine for changing the appearance of the RadWindow, RadMenu and RadButton but I'm having a hard time changing the RadComboBox.

I believe this issue is tied to the ButtonChrome used when the RadComboBox is closed. Despite adding the ButtonChrome.xaml to my Themes project, any changes to the ButtonChrome.xaml are ignored.

The main ones I was using for testing was changing the ControlBackground_Normal gradient brush and the ControlBackground_Normal_Stop0..ControlBackground_Normal_Stop3

Any ideas what I'm missing?

5 Answers, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 14 Aug 2012, 03:21 PM
Hello Mark,

I could not reproduce the problem.  Be sure you do not have set  x:Key on your Style:

<Style TargetType="Telerik_Windows_Controls_Chromes:ButtonChrome">

If this doesn't help, please tell us which version of RadControls you are using and also confirm that you have followed the following tutorial:
http://www.telerik.com/help/silverlight/common-styling-apperance-themes-custom-theme-project.html

Greetings,
Maria
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mark
Top achievements
Rank 1
answered on 14 Aug 2012, 03:55 PM
That didn't help anything. Instead in cause an exception in CreateResourceDictionaryForApplicationTheme. I not sure I understand why I'd want to remove x:Key.

Yes, I used that tutorial to get everything setup for a customized theme. It's worked just fine until I attempted to stylize the RadComboBox.

We are using version 2012_1_0215. Moving to a newer version is probably not an option at this time.

Thanks

0
Masha
Telerik team
answered on 15 Aug 2012, 10:53 AM
Hello Mark,

The ComboBox.xaml has defined  static resource
<telerik:Office_BlackTheme x:Key="Theme" /> itself,  which is called in ButtonChrome by telerik:StyleManager.Theme="{StaticResource Theme}". That is the reason your changes were not applied because they were overwritten by OfficeBlack Theme.

Change <telerik:Office_BlackTheme x:Key="Theme" /> with 
<defaultTheme:Default x:Key="Theme" /> and do not forget to include xmlns:defaultTheme="clr-namespace:YourProjectThemeName" in your ResourceDictionary.

Hope this helps.

Kind regards,
Maria
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mark
Top achievements
Rank 1
answered on 26 Sep 2012, 06:59 PM
Your latest suggestion doesn't even relate to build 2012_1_0215. Why? Because there is no ComboBox.xaml anymore.

At this point I could really use a sample project that does global theming for the RadComboBox using build 2012_1_0215. We have several pages with combo boxes and really want to change the colors in one place, not dozens of pages. The issue is not how to build a theme or how to use that theme. The problem is how to modify the colors for a RadComboBox
0
Masha
Telerik team
answered on 27 Sep 2012, 12:15 PM
Hello Mark,

We are sorry for the misunderstanding. What I meant  before is to modify ComboBox.xaml file in your CustomTheme folder. Inside it is set StaticResource  <telerik:Office_BlackTheme x:Key="Theme" />
which overwrites custom style coming from ButtonChrome.xaml and is exactly the reason why the made customizations are not applied. So replacing this resource will make it possible to customize the look of ButtonChrome without a problem.

I demonstrated the approach in the attached project.

Hope this helps.

Greetings,
Maria
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Masha
Telerik team
Mark
Top achievements
Rank 1
Share this question
or