Hello Adrian Bennett,
Generally there are two approaches for managing themes in your application, however in both cases you have to load the theme (files)
only once and then apply different themes to the controls in your app by managing the ThemeName property of the corresponding controls or ThemeResolutionService.ApplicationThemeName - if you what to apply the same theme to all controls in the application. Because of possible performance issues ThemeResolutionService loads the same theme file only once, no matter how many times you call RegisterTheme(...) methods. Actually, there is a way to workaround this behavior, however, I would not recommend you should use it. Let me know if you choose this approach though and I'll prepare a sample application for you.
Here are some tips that can help you with application theming without the need to load theme files each time you need different theme.
The following article describes the approach using ApplicationThemeName:
http://www.telerik.com/help/winforms/themes_using_a_default_theme_for_the_entire_application.html
This of course requires that all controls in the application have consistent style corresponding to the ThemeName selected. The article also describes how you can
override the default ApplicationThemeName behavior for specific control instances that you can apply in the case with the panels that should have different looks in you app. However I would recommend you use this as little as possible and try to handle specific cases by manipulating contorls' ThemeClassName property that you are already familiar with.
The other way to
batch change the ThemeName of controls in your applicaiton is to use the method:
ThemeResolutionService.ApplyThemeToControlTree(container, "ThemeName"),
where the container could be a Form for example. This will change the theme name of all controls in the specified container (Control).
There is a pretty simple solution to the problem with your
RadPanel-inherited control. You should override the ThemeClassName property in the following way:
Please, take a look at the following KB article for details:
http://www.telerik.com/support/kb/winforms/general/inherit-themes-from-radcontrols.aspx
Please let me know if you need further assistance with any of the above.
Best wishes,
Mike
the Telerik team