Can't get RadStylesheetManager working with custom skin

4 posts, 1 answers
  1. Softec
    Softec avatar
    45 posts
    Member since:
    Sep 2007

    Posted 04 Jun 2009 Link to this post

    Hi

    To get the functionality of RadStylesheetManager I included all files from my custom skin (derived from Telerik Default skin) in an assembly. I checked this with Reflector, all the files are correctly included and all urls are replaced with the correct WebResource link. I can access the images etc.
    Additionaly I've included the StyleSheetReference in the StyleSheetManager with the name seen with Reflector and the assembly name and disabled embedded skins in all controls. 

    But it isn't working, is there something more to do? I tried disabling EnableStyleSHeetCombine and OutputCompression with no luck.

    When I check my source I still have href links to telerik_stylesheet for RadWindow, RadMenu, RadSplitter, RadTreeView, RadPanelBar despite having EnableEmbeddedSkins set to false... And the Telerik.Web.UI.WebResource.axd returns: 
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
    <HTML><HEAD
    <META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD
    <BODY></BODY></HTML> 
     

    Thanks for help,
    SJ
  2. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 04 Jun 2009 Link to this post

    Hi Studach Joerg,

    The controls you are referring to rely on two CSS files - base CSS and skin CSS. When the EnableEmbeddedSkins property is set to false the base CSS is still output. If you don't need to modify the base css I recommend you leave it that way.
    To the embedded base CSS files you should set the EnableBaseStyleSheet property to false as well. Then you need to embed and register all base css files as well. You can find them in the Skins folder of your RadControls installation - TreeView.css, Splitter.css etc.

    If the problem persists please open a support ticket and send us a sample page with your setup.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Softec
    Softec avatar
    45 posts
    Member since:
    Sep 2007

    Posted 04 Jun 2009 Link to this post

    That was the problem, Thanks!
  5. Jan Mucha
    Jan Mucha avatar
    25 posts
    Member since:
    Aug 2012

    Posted 24 Feb 2010 Link to this post

    Hi  i resolve this problem call custom function in PageInit.
    public static void AplyCustomSkin(ControlCollection controls, String Skiname) 
            { 
                try 
                { 
                    foreach (Control control in controls) 
                    { 
                        if (control.GetType().ToString().Contains("Rad")) 
                        { 
                            if (control is ISkinnableControl) 
                            { 
                                (control as ISkinnableControl).EnableEmbeddedSkins = false
                                (control as ISkinnableControl).Skin = Skiname; 
                            } 
                        } 
                        if(control.Controls.Count>0) 
                        { 
                            AplyCustomSkin(control.Controls, "GopasRed"); 
                        } 
                    } 
                } 
                catch 
                { 
                } 
            } 

Back to Top