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

Themes and Custom Skins

1 Answer 144 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Joao asked on 18 Oct 2012, 01:48 PM

I've been searching about this for several days but I can't get my head around it.

Just as a note: all of our custom skins were designed using the visual style builder ( but none of them has a .skin file. I couldn't understand yet what is this file for.

I have an application that each user will have a different CUSTOM skin name saved on the database. There will be the same number of users as skins, so if there's 50 users, there will be 50 different skins, one to each user. Everytime the user logs in, the application loads the skin name from the database and applies it to all controls by using a technic described on this blogpost:

I converted the C# code into VB and put on the page load of the master page. It looks like this

     Public Sub SetSkin(ByVal target As Control, ByVal skinName As String)
        If TypeOf target Is ISkinnableControl Then
            Dim skinnableTarget As ISkinnableControl = Nothing
            skinnableTarget = DirectCast(target, ISkinnableControl)
            skinnableTarget.Skin = skinName
            For Each child As Control In target.Controls
                SetSkin(child, skinName)
        End If
    End Sub

This works great and as intended when the users are 2 or 3, but when it grows to 20 or 30 users and skins I can see in the source code that all CSS files of all skins are loaded into the page and this creates problems with the IE limitation on number of css includes which I think is 32. I read somewhere that telerik will include all css files inside the theme folder. For example, each Skin have 11 different css files (ajax, button, calendar, grid, etc). If I have 20 different skins I'll have 220 css files included in the page when I need onlye 11.

I also don't know if I should have 1 theme with 1 skin per user
and then programmatically assigned a different theme after each user. This would solve the problem of  to many css files included in the page, but i couldn't find out to assign theme's to the page/controls

or if I should have 1 theme with several skins but find a way to include only the css files of the skin that is gonna be used by the logged user.

Hope this makes sense, please let me know what I should do to solve this problem. Oh, and sorry for such a long post, that's the way I found best to explain the issue.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 23 Oct 2012, 04:04 PM
Hi Joao,

To avoid the 31 stylesheet limitation in IE browser and to improve your performance I can recommend you to build a custom Skin assembly and use the RadStyleSheetManager. Please refer to this pages for more info:

Additionally, you can use the following tool, which is provided from our customer

Also, It seems you have opened a support ticket concerning the same issue. In order to avoid duplicate posts, I suggest that we continue the communication in the support ticket.

All the best,
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question