How to register a common skin for all RadControls?

8 posts, 0 answers
  1. akohlbeck
    akohlbeck avatar
    8 posts
    Member since:
    Jan 2007

    Posted 27 May 2008 Link to this post

    Hi

    We are having trouble registering our custom skin for all controls in DotNetNuke.  We created a custom skin but are unsure as to where we need to put the files in our solution.  We currently have them in the root (Skin name "MySkin") and in the web.confing we have an appsetting that is: 

    <add key="Telerik.Skin" value="MySkin" />

    This does not work - our skin is not appearing on the control.  Are we putting the files in the correct spot, and are we registering the skin correctly for use?  If not please advise.

    Thanks!

  2. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 27 May 2008 Link to this post

    Hi akohlbeck,

    You would need to just add <link> tags to the Default.aspx page, referencing the css files in your custom skin folder. FYI, you can move the custom skin to the App_Themes folder and set the page Theme property to the name of that skin. This way you will get the <link> tags registered automatically by the .NET framework.

    I hope this helps.

    Kind regards,
    Erjan Gavalji
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 29 May 2008 Link to this post

    Hello Akohlbeck,

    You can look in the help under :

    "RadControls for ASP.NET AJAX Fundamentals > Controlling Visual Appearance > Skin registration"

    Global skin setting for the entire web site/web application project:

    If you need to register a common skin for all RadControls in your web site/web application project or you want to assign a particular skin for each instance of RadControl, you can do that very easily modifying the web.config file as follows:
    <appSettings> 
     <add key="Telerik.Skin" value="[SkinName]" />   <!-- Sets the skin for all RadControls --> 
     <add key="Telerik.[ShortProductName].Skin value="[SkinName]" /> 
       <!-- Sets the skin for a specific control --> 
    </appSettings> 

    Setting the value to an empty string disables the skin for the control(s).

    Hope this can help
    Waleed
  5. John Corrigan
    John Corrigan avatar
    3 posts
    Member since:
    Sep 2007

    Posted 05 Jun 2008 Link to this post

    If I'm understanding 'akohlbeck' correctly, I'm trying to do the same thing: register a custom skin by using the Global settings (as suggested by Waleed).

    However, it looks like setting a skin Globally as described will only work for Embedded skins (which may be why Erjan repeated the instructions for manually registering the skin on a page-by-page basis using the <link> tag).

    SO, the basic question remains: Is there a way to register a *custom* skin *gloablly* using the web.config?
  6. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 06 Jun 2008 Link to this post

    Hello John,

    You can register a custom skin globally by using the following two keys in web.config:

    <appSettings>
        <add key="Telerik.Skin" value="MySkin" />
        <add key="Telerik.EnableEmbeddedSkins" value="false" />
    </appSettings>

    These keys are discussed in the following help articles:

    http://www.telerik.com/help/aspnet-ajax/skinregistration.html
    http://www.telerik.com/help/aspnet-ajax/disabling_embedded_resources.html


    All the best,
    Dimo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. John Corrigan
    John Corrigan avatar
    3 posts
    Member since:
    Sep 2007

    Posted 06 Jun 2008 Link to this post

    Dimo,

    Thanks for the quick response. The code sample and the links helped me track down more of the information I needed.

    Setting the theme globally (for all rad controls or specific rad controls) using the web.config was pretty straightforward. Adding the key to turn enableembeddedskins to 'false' (again, for either all rad controls or a specific control) was key to assigning a custom skin.

    However,  it is still necessary to add the <link> to load the appropriate CSS files for the page. Just thought I would point this out to anyone following this thread.

    Another note to anyone planning on setting up global custom skin: some controls may require more manual settings changes at the control level, since the css files may not be set up to control every image or setting. For example, if you set a custom skin for the Calendar (DatePicker) control, you must manually set the path information for the <DatePopupButton> images, the Navigation images of the <Calendar>, etc.
  8. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 08 Jun 2008 Link to this post

    Hello John ,

    I am using a custom control to apply dynamic themes to my web application, I don't have this problem with .Css cause I put for each theme under each folder the .css file, which is loaded automatically.

    If you are interested I can share this approach with you.

    Best regards,
    Waleed
  9. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 09 Jun 2008 Link to this post

    Hello John,

    You are right - CSS files for custom skins must be registered manually, unless you are using ASP.NET themes, as Waleed pointed out. The opportunity to register custom skins manually exists so that developers who want to optimize their CSS, can combine all skins into a single stylesheet.

    With regard to the images, RadGrid and RadCalendar offer the ImagesPath property, which specifies a single location of all images the respective control needs, so that you don't have to declare a path for each image separately. The only thing to keep in mind is that in this case the control will search for images with specific names, listed here:

    RadGrid Skins

    RadCalendar - Creating Custom Skins


    Sincerely yours,
    Dimo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017