Including custom StyleSheets as WebResources to RadStyleSheetManager

Thread is closed for posting
16 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 23 May 2008 Link to this post

    Requirements

    RadControls version

    Telerik.Web.UI (Q1 2008 +)

    .NET version

    3.5

    Visual Studio version

    2008

    programming language

    C#

    browser support

    all browsers supported by RadControls


     
  2. PROJECT DESCRIPTION

    This is the accompanying project of the help topic on
    Including custom StyleSheets as WebResources to RadStyleSheetManager.

    It shows how RadStyleSheetManager can be used to read css resource information from assemblies and output a single <link> tag to the page HTML. As a specific example, I add the Telerik skin for RadCombobox as a WebResource assembly to the project. For a step-by-step guide, please refer to the help topic.
  • 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 05 Aug 2009 Link to this post

    A WinForms tool for creating embedded custom skins to be used with RadStyleSheetManager is now available at:

    Tool for Embedding Custom Skins into an Assembly
  • 81F23FA4-BBD8-46FC-99BD-060B96572B8D
    81F23FA4-BBD8-46FC-99BD-060B96572B8D avatar
    20 posts
    Member since:
    Dec 2010

    Posted 25 Jan 2011 Link to this post

    1 line method doesn't work anymore (Telerik.Web.UI.dll 2010.3.1215.40)
    Only seems to work if you explicitly specify the controls
  • FA9EEAA8-F49E-465B-9E32-1F857EDDC09E
    FA9EEAA8-F49E-465B-9E32-1F857EDDC09E avatar
    2281 posts
    Member since:
    Jan 2017

    Posted 31 Jan 2011 Link to this post

    Hello Johan,

    I just tested the method and it still works with v2010.3.1215.

    Can you please be a bit more specific? What do you mean by explicitly specifying the controls? 

    All the best,
    Simon
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  • 81F23FA4-BBD8-46FC-99BD-060B96572B8D
    81F23FA4-BBD8-46FC-99BD-060B96572B8D avatar
    20 posts
    Member since:
    Dec 2010

    Posted 31 Jan 2011 Link to this post

    Hi Simon,
    see
    Home / Community / Forums / ASP.NET AJAX > SkinManager > Does RadSkinManager work with custom (non-embedded) skins?

    Currently I cannot build the project in
    anymore. It is vs2008 and I get build errors (Telerik not found).
    When I try to build a new rad web project I get

    ---------------------------

    Microsoft Visual Studio

    ---------------------------

    Error executing custom action Telerik.Web.UI.VSX.Actions.UnfoldFilesAction:

    Could not find file 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Telerik\Telerik WebUI VSExtensions\2010.3.1214.0\ControlScenarios\General\TelerikEnabledWebForm\Default.aspx.t4'.

    ---------------------------

    OK

    ---------------------------

    After re-installing telerik components I will try to create a new project and test it and get back to you.

    regards,
    Johan

     

     

  • 81F23FA4-BBD8-46FC-99BD-060B96572B8D
    81F23FA4-BBD8-46FC-99BD-060B96572B8D avatar
    20 posts
    Member since:
    Dec 2010

    Posted 31 Jan 2011 Link to this post

    Okay, I'm back. I installed 2010.3.1317.40 and created a RadControls Web Application in VS2010. I created a skin TestSkin001 with the visual style builder at stylebuilder.telerik.com and created an assembly TestSkin001Assembly.dll file with WebResourceAutoBuilder and put it in the bin folder of my project. Now I have a page with a radcalendar and a radcombobox in them. Both have

    Skin

     

     

    ="TestSkin001" EnableEmbeddedSkins="False"

     

    If I register them like this:

     

     

    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

     

     

     

    <StyleSheets>

     

     

     

    <telerik:StyleSheetReference Name="TestSkin001Assembly.TestSkin001.Calendar.TestSkin001.css" Assembly="TestSkin001Assembly" />

     

     

     

    <telerik:StyleSheetReference Name="TestSkin001Assembly.TestSkin001.ComboBox.TestSkin001.css" Assembly="TestSkin001Assembly" />

     

     

     

    </StyleSheets>

     

     

     

    </telerik:RadStyleSheetManager>

     

    this works fine,

    but if I register with a single line, like this:

     

     

    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

     

     

     

    <StyleSheets>

     

     

     

    <telerik:StyleSheetReference Name="TestSkin001Assembly.TestSkin001.css" Assembly="TestSkin001Assembly" />

     

     

     

    </StyleSheets>

     

     

     

    </telerik:RadStyleSheetManager>

     


    this does not work. What is wrong?

    If you want I can send you the project but need an email address or upload fascility.

    regards,
    Johan

  • FA9EEAA8-F49E-465B-9E32-1F857EDDC09E
    FA9EEAA8-F49E-465B-9E32-1F857EDDC09E avatar
    2281 posts
    Member since:
    Jan 2017

    Posted 13 Feb 2011 Link to this post

    Hello Johan,

    Perhaps the generic .css file does not exist in the assembly. Can you verify with FireBug or Fiddler whether the Telerik.Web.UI.WebResource.axd response is OK?

    In any case, a sample project showing this issue will help me find the cause of the issue easier. Please send a project via a support ticket (and also mention this Code Library project).

    Regards,
    Simon
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  • E845A870-CEEB-4018-A925-57BF7D48A913
    E845A870-CEEB-4018-A925-57BF7D48A913 avatar
    2 posts
    Member since:
    Apr 2009

    Posted 22 Mar 2011 Link to this post

    Great tool! Easily converted Bryan's project to VS2010.
    I actually downloaded several zip files from VisualStyleBuilder, modified them and zipped them all back up together.
    Only problem I had was I noticed some WebResource 404 errors and images were not coming up.

    Turns out the Menu skin generated from VisualStyleBuilder contained css with WebResources in it which caused an error when I used Bryan's project.

    So if you are getting 404 errors or missing styelsheets/images then make sure to search your downloaded css files for content like:

    .RadMenu_CustomSkin .rmRootGroup,
    .RadMenu_CustomSkin .rmFirst,
    .RadMenu_CustomSkin a.rmLink,
    .RadMenu_CustomSkin .rmText,
    .RadMenu_CustomSkin .rmLeftArrow,
    .RadMenu_CustomSkin .rmRightArrow,
    .RadMenu_CustomSkin .rmTopArrow,
    .RadMenu_CustomSkin .rmBottomArrow
    {
        background-image: url(<%= WebResource("CustomSkin.CustomSkin.Menu.rmSprite.png") %>);
    }

    and replace with something like:

    .RadMenu_CustomSkin .rmRootGroup,
    .RadMenu_CustomSkin .rmFirst,
    .RadMenu_CustomSkin a.rmLink,
    .RadMenu_CustomSkin .rmText,
    .RadMenu_CustomSkin .rmLeftArrow,
    .RadMenu_CustomSkin .rmRightArrow,
    .RadMenu_CustomSkin .rmTopArrow,
    .RadMenu_CustomSkin .rmBottomArrow
    {
        background-image: url('Menu/rmSprite.png');
    }

    Then zip it all back up and use Bryan's tool to embed your files into a dll.

    Eric
  • 6042F124-852D-4D72-BFB6-699CCAF14B33
    6042F124-852D-4D72-BFB6-699CCAF14B33 avatar
    7 posts
    Member since:
    Jun 2011

    Posted 21 Jun 2011 Link to this post

    Downloaded the .zip, unzipped and built the project (I have both VS2008 and VS2010 on my laptop). I cannot find the Telerik.Charting.dll and Telerik.Charting.xml files. When I run the project I figured I would get a complaint about the Charting dll and not:

     

    Server Error in '/' Application.

    Could not load file or assembly 'Telerik.Web.UI, Version=2008.1.515.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)



    OK. So what am I doing wrong?

    Thanks,
    Doug
  • FA9EEAA8-F49E-465B-9E32-1F857EDDC09E
    FA9EEAA8-F49E-465B-9E32-1F857EDDC09E avatar
    2281 posts
    Member since:
    Jan 2017

    Posted 23 Jun 2011 Link to this post

    Hi Douglas,

    Thank you for letting us know about the issue.

    There is a hard-coded version of the Telerik.Web.UI assembly in the web.config of the project. This triggers the error when you deploy another version.

    I modified the project so that this specific reference is more general. Please download it again to get the updated version.

    Best wishes,
    Simon
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  • E4974DC7-8CB8-4F95-82A1-1045F9BD2502
    E4974DC7-8CB8-4F95-82A1-1045F9BD2502 avatar
    3 posts
    Member since:
    Dec 2009

    Posted 26 Jul 2011 Link to this post

    nevermind
  • B3FD0541-F380-43D8-AE5A-37DA912E6719
    B3FD0541-F380-43D8-AE5A-37DA912E6719 avatar
    12 posts
    Member since:
    Mar 2012

    Posted 20 Mar 2012 Link to this post

    Hello Simon,

                            I have created the Separate Class library and added the css/Images. When I have built this class library and added the .dll with my project file. My project is loaded I am not able to apply the css which is availablbe in the class library.


    From the master page I have created a child page, for that child page I am not able to apply the .css and the images are also not loaded in the specific child page.


    Here is the code in Master page:-


    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

            <StyleSheets>

    <telerik:StyleSheetReference Name="NispCSSAssembly.Button.Default.css"

                    Assembly="NispCSSAssembly"></telerik:StyleSheetReference>

    </StyleSheets>

    </telerik:RadStyleSheetManager>

     

     

    The code of .css image reference:-

     

    background-image:url('<%=WebResource("NispCSSAssembly.Button.ButtonSprites.gif")%>');

     

    Please help me out in this issue.

    Regards,

    Subbu

  • FA9EEAA8-F49E-465B-9E32-1F857EDDC09E
    FA9EEAA8-F49E-465B-9E32-1F857EDDC09E avatar
    2281 posts
    Member since:
    Jan 2017

    Posted 21 Mar 2012 Link to this post

    Hi Sarulatha,

    Please submit your query via the support ticketing system because we will need a sample project to help you resolve the problem you are facing. This thread discusses the Code Library Project itself - the solution and code.

    Regards,
    Simon
    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.
  • 214F8984-5584-4E7A-8E4A-D1D7AEA16BD8
    214F8984-5584-4E7A-8E4A-D1D7AEA16BD8 avatar
    289 posts
    Member since:
    Oct 2012

    Posted 13 Nov 2012 Link to this post

    Is there a version of the demo ready to run in VS2012?
  • FC035E79-9A38-4B5B-8A86-E75D81EE34B3
    FC035E79-9A38-4B5B-8A86-E75D81EE34B3 avatar
    1898 posts
    Member since:
    Sep 2012

    Posted 16 Nov 2012 Link to this post

    Hello Boris,

    With our latest official version of the Telerik controls - 2012.3.1016.40 - you can run the live demos in VS 2012.  

    Regards,
    Kate
    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.
  • B2FC2A64-23B1-4D0D-9F88-B86579023EB1
    B2FC2A64-23B1-4D0D-9F88-B86579023EB1 avatar
    7 posts
    Member since:
    Feb 2018

    Posted 11 Mar 2018 Link to this post

    New to this. I cannot get this to work. Where is the readme file? But the project will not work in current VS.

    So to put things simple

    I created a theme. Let's say I pick all controller. I then created the .zip file and call it theme123. I then run the project. Point to the .zip file, give it a location to place the .dll. I place in the bin folder. and call this theme123.

    So far so good. What I need is a simple ASPX file with say a RadButton and maybe a Date\Time controller to see if the CSS is coming over. This will help me and sure others.

    Do I need to remove edit any other files, eg web.config file.

     

    Thank you in advanced, Wayne

  • Back to Top

    This Code Library is part of the product documentation and subject to the respective product license agreement.