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

Dynamic Skins & Themes

1 Answer 116 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 10 Sep 2010, 05:47 PM
Hello,

I have a website project where I created a custom ASP.Net theme with the stylebuilder.  I have all the controls using this custom theme by setting the EnableEmbeddedSkins="false" and setting Skin="mySkin". 

I would like to be able to have a combobox to dynamically change the "theme" used.  If possible I would also like to be able to switch between the standard Telerik Skins and custom themes.

I have tried in code behind using the combobox selection changed event and in case of custom theme setting EnableEmbeddedSkins="false" and setting Skin="mySkin", and in cases of default skins setting EnableEmbeddedSkins="true" and setting Skin="WebBlue" for example.  

Ive looked all over the forums and documentation and havent been able to find a tutorial to do this.  Even if it can be done just using traditional asp.net themes and avoiding the compiled themes all together that would be fine.  I would just have to create each one I wanted from the stylebuilder without changes. 

Can you lead me in the right direction?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 13 Sep 2010, 08:17 AM
Hello Michael,

ASP.NET themes can be switched / set programmatically only in Page_PreInit. Other than that you should have no problems - when embedded skins are used, the RadControls will register all required CSS files themselves. Otherwise the non-embedded CSS files from the theme's folder will be registered by the ASP.NET framework.

Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or