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

Change skins for all controls dynamically in web application

3 Answers 221 Views
SkinManager
This is a migrated thread and some comments may be shown as answers.
Rajender
Top achievements
Rank 1
Rajender asked on 24 Jul 2014, 03:05 PM
we need to change skin dynamically for all controls in web application. i have not found appropriate solution for web application. Kindly provide a solution which would be helpful for me.
Thanks,
Rajender..

3 Answers, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 29 Jul 2014, 12:55 PM
Hi Rajender,

In order to set he Skin globally there are two options

<appSettings>
  <add key="Telerik.Skin" value="Metro"/>
</appSettings>

The other option is to use the RadSkinManager.

I hope this helps.

Regards,
Galin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
David
Top achievements
Rank 1
answered on 02 Mar 2015, 07:53 PM
I created this method in my Site.Master.cs code behind. In the Page_Load I check to make sure the Session["ID"] is not null before
calling the SetPageTheme. This way I only have to set it in one place. Then whenever I call a web page the theme will get set in the master before running the page I am calling.

private void SetPageTheme()
       {
 
           int UserID = Convert.ToInt32(Session["ID"].ToString());
 
           // Use LINQ query to get User Record with Preferred Theme
           GATEEntities dbContext = new GATEEntities();
 
           var query = from srw in dbContext.Security_User
                       where srw.ID == UserID
                       select srw;
           var result = query.ToList();
           RadSkinManager1.Skin = result[0].Preferred_Theme;
           string skiname = RadSkinManager1.Skins[0].ToString();
       }
0
David
Top achievements
Rank 1
answered on 02 Mar 2015, 07:56 PM
Ignore the last line of code in that method. 
where it says:
string skiname = RadSkinManager1.Skins[0].ToString();
Tags
SkinManager
Asked by
Rajender
Top achievements
Rank 1
Answers by
Galin
Telerik team
David
Top achievements
Rank 1
Share this question
or