Hi,
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 (http://stylebuilder.telerik.com/) 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: http://blogs.telerik.com/vladimirenchev/posts/08-07-11/change-skins-dynamically-for-all-telerik-radcontrols.aspx
I converted the C# code into VB and put on the page load of the master page. It looks like this
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
Example
App_Themes\ThemeUser1\SkinYellow
App_Themes\ThemeUser2\SkinGreen
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.
Eexample
App_Themes\GenericTheme\SkinYellow
App_Themes\GenericTheme\SkinGreen
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.
Regards
Joao
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 (http://stylebuilder.telerik.com/) 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: http://blogs.telerik.com/vladimirenchev/posts/08-07-11/change-skins-dynamically-for-all-telerik-radcontrols.aspx
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
Else
For
Each
child
As
Control
In
target.Controls
SetSkin(child, skinName)
Next
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
Example
App_Themes\ThemeUser1\SkinYellow
App_Themes\ThemeUser2\SkinGreen
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.
Eexample
App_Themes\GenericTheme\SkinYellow
App_Themes\GenericTheme\SkinGreen
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.
Regards
Joao