Themed controls not working at runtime

2 posts, 0 answers
  1. Czeshirecat
    Czeshirecat avatar
    66 posts
    Member since:
    Jun 2016

    Posted 16 May 2018 Link to this post

    I needed to change the radtogglebutton Breeze theme so that on toggled state it shows a green background.

    I've added the theme to my winforms app project resource using theme manager, and I see the theme at design time, but when I run my application then the controls revert to the theme that's set when the application starts up.

    I've put a debug message into the toggle event which returns the name of the theme for the button, this returns the correct value.

    Am I missing something please?

     

  2. Dimitar
    Admin
    Dimitar avatar
    2818 posts

    Posted 17 May 2018 Link to this post

    Hi Claire,

    If you are using the ApplicationThemeName property for the entire application you need to set the EnableApplicationThemeName for the button that uses another theme. Here is an example:
    ThemeResolutionService.ApplicationThemeName = "Breeze";
    radToggleButton2.ThemeName = "Fluent";
    radToggleButton2.ElementTree.EnableApplicationThemeName = false;

    Detailed information is available here: Using a Default Theme for the Entire Application | Themes.

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top