Ive got a complex MDI application which Im trying to theme. Ive tried a few different ways to create multiple themes that the user can chose between and the only way I can get it to work is if I create a ControlDefault theme for most controls, and any controls that need to be different, like panels that need to show different colours I create a separate theme file and set the ThemeName property on the panels to match up the the correct theme. Then to swap between themes I have a different set of files with the same ThemeNames.
This works great, but I cant figure out how to unload a theme, also if I have 2 themes, light and dark and the form loads with the light theme, then I set it to dark, if I try to set it back to light it wont apply. How can I unload the theme, or properly switch between themes?
To load the themes Im using ThemeResolutionService.RegisterThemeFromStorage(...);
Ive built a control which inherits from RadPanel, and when I try and theme it, the theme will not apply. I had a look at the resulting xml from the Visual Style Builder, and it was setting the ControlType attribute in the RadStylesheetRelation node to RadPanel instead of my class. I manually set this to my class and it worked fine. While this works, it is a pain, and if the client wants to create new themes later they will need to manually change the xml.
Any help would be appreciated