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

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

1 Answer 386 Views
Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Alain
Top achievements
Rank 1
Alain asked on 06 Dec 2011, 08:45 AM
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

1 Answer, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 08 Dec 2011, 08:42 AM
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
Tags
Visual Style Builder
Asked by
Alain
Top achievements
Rank 1
Answers by
Lini
Telerik team
Share this question
or