Custom Themes ^ ButtonChrome

6 posts, 0 answers
  1. Mark
    Mark avatar
    7 posts
    Member since:
    Aug 2012

    Posted 09 Aug 2012 Link to this post

    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?

  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 14 Aug 2012 Link to this post

    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.

  3. DevCraft banner
  4. Mark
    Mark avatar
    7 posts
    Member since:
    Aug 2012

    Posted 14 Aug 2012 Link to this post

    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

  5. Masha
    Admin
    Masha avatar
    355 posts

    Posted 15 Aug 2012 Link to this post

    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.

  6. Mark
    Mark avatar
    7 posts
    Member since:
    Aug 2012

    Posted 26 Sep 2012 Link to this post

    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
  7. Masha
    Admin
    Masha avatar
    355 posts

    Posted 27 Sep 2012 Link to this post

    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.

Back to Top
DevCraft banner