Use of web.config settings "Telerik.Web.SkinsAssembly" and custom skin

2 posts, 0 answers
  1. Alain
    Alain avatar
    33 posts
    Member since:
    Feb 2009

    Posted 06 Dec 2011 Link to this post

    Hello,

    Telerik ASP.NET Ajax: 2011.3.1115.40
    Language. VB.NET

    We try to know how to use the web.config settings "Telerik.Web.SkinsAssembly" with a custom skin created by Telerik Style Builder.

    For this, we did the following steps:
      1. We created a custom skin by Telerik Style Builder named "MySkin" with all controls skinned.
      2. We transformed the skin "MySkin" into an assembly "MySkinAssembly" with namespace "MySkinNamespace" by the tool of Bryan Boudreau, Telerik-webresourcebuilder:
      3. We add in <appSettings> the lines:
    <add key="Telerik.Web.SkinsAssembly" value="MySkinAssembly" />
    <add key="Telerik.Skin" value="MySkin" />
    <add key="Telerik.EnableEmbeddedSkins" value="false" />
      4. In a web page, we added a <telerik:RadButton id runat ... /> but without the tag Skin, because Telerik adds it with "MySkin" taken from "Telerik.Skin" setting.

    The result was that the RadButton was not skinned.

    But if we add "RadStylesheetManager" with an entry for the RadButton in the page, like:
    <RadStylesheetManager ...>
      <
    StyleSheets>
       
    <StyleSheetReference Name="MySkinAssembly.MySkinNamespace.Button.MySkin.css" Assembly="MySkinAssembly" />
      </StyleSheets>
    </RadStylesheetManager>

    it works!

    How can we use the web.config settings "Telerik.Web.SkinsAssembly" without "RadStylesheetManager"?

    Thank you
    Alain
  2. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 08 Dec 2011 Link to this post

    Hi Alain,

    You should remove the line

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

    from your Web.config file. Since the MySkin skin is coming from an assembly, it is still considered an embedded skin for the RadControls. With this setting, you disable embedded skins so the skin specific CSS will not be loaded from your custom skin assembly.

    When you use the EnableEmbeddedSkins = false, you must register the skin specific CSS manually on the page. If you want the skin to load automatically, EnableEmbeddedSkins should be set to the default value (true).

    Greetings,
    Lini
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top