How to load skins from external assemblies

46 posts, 0 answers
  1. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 15 Oct 2012 Link to this post

    HI Tsvetoslav,

    Yes, I  had tried to set it in web config but  unfortunately it didn't work for me. As  I mentioned in earlier post,  I want to use custom skin for selected controls and Telerik WebBlue skin for  others. 

    <appSettings>
      <add key="Telerik.EnableEmbeddedSkins" value="false"/>
         <add key="Skin" value="WebBlue"/>
        <add key="Telerik.Button.Skin" value="M4"/>
        <add key="Telerik.Calendar.Skin" value="M4"/>
        <add key="Telerik.ColorPicker.Skin" value="M4"/>
        <add key="Telerik.ComboBox.Skin" value="M4"/>
        <add key="Telerik.DatePicker.Skin" value="M4"/>
        <add key="Telerik.Dock.Skin" value="M4"/>
        <add key="Telerik.FormDecorator.Skin" value="M4"/>
        <add key="Telerik.Grid.Skin" value="M4"/>
         <add key="Telerik.Scheduler.Skin" value="M4"/>
        <add key="Telerik.Splitter.Skin" value="WebBlue"/>
        <add key="Telerik.TabStrip.Skin" value="Outlook"/>
            
        
      </appSettings>

    Regards,
    Prava
  2. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 15 Oct 2012 Link to this post

    Hi,

    I followed the links provided and tried everything possible but nothing seems to work when I try to combine regular telerik skins and my custom M4 Skin  and set it at application level. I have modified the sample provided in one of the posts and have uploaded it  hoping to illustrative my objective.

    Issue:
    When skins are set at application level for each control type, this sample does not load customM4skin at all.

    Default.aspx:
    I have a button with  "Forest" skin, grid, calendar and a ComboBox with custom skin M4 skin.

    WebConfig Settings  for application level  implementation:
     <appSettings>
            <!--Add this key to enable the skins from external assembly-->
            <!--<add key="Telerik.Web.SkinsAssembly" value="Hew.Web.UI.Skins" />-->
            <add key="Hew.Web.UI.Skins.Grid.Skin" value="Blue" />
            <add key="Hew.Web.UI.Skins.Calendar.Skin" value="Blue" />
            <add key="Hew.Web.UI.Skins.ComboBox.Skin" value="Blue"/>
            
            <add key="Telerik.Button.Skin" value="Forest"  />
      </appSettings>
        
        

    This sample was built with VS2008 but I would like to implement it in .Net Framework4.0.
    Thanks,
    Prava
  3. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 17 Oct 2012 Link to this post

    Hello Prava,

    Thanks for sending you files.

    In order to set a global skin for your controls, you need to have their EnableEmbeddedSkin property set to true, if you skin is in an external assembly, be it Telerik.Web.UI.Skins or your custom one. Then you need the following app settings in the web.config:

    <appSettings>
      <!--Add this key to enable the skins from external assembly-->
      <!--<add key="Telerik.Web.SkinsAssembly" value="Hew.Web.UI.Skins" />-->
      <add key="Telerik.Grid.Skin" value="Blue"/>
      <add key="Telerik.Calendar.Skin" value="Blue"/>
      <add key="Telerik.ComboBox.Skin" value="Blue"/>
      <add key="Telerik.Button.Skin" value="Forest"/>
    </appSettings>

    Hope this information helps.


    Greetings, Tsvetoslav
    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.
  4. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 17 Oct 2012 Link to this post

    Hi Tsvetoslav,

    I modified  webconfig file  with your suggestions, unfortunately it did not work. Can you provide a working sample/modify the submitted code?

    Thanks,
    Prava
  5. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 17 Oct 2012 Link to this post

    Hi Prava,

    Here you go - I have just changed the skin of RadComboBox1 to an existing one since in your Hew assembly you do not have a skin defiend for the RadComboBox control.


    Greetings,
    Tsvetoslav
    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.
  6. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 17 Oct 2012 Link to this post

    Hi Tsvetoslav ,

    Thank you for your prompt response,  I am getting  an error "The project file or web cannot be found"  
    while opening the project  file.

    Thanks,
    Prava
  7. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 18 Oct 2012 Link to this post

    Hi Prava,

    Excuse me for that - the project file is VS 2010. I am attaching just the aspx and web.config, please, change yours accordingly. From the web.config take only the AppSettings.

    All the best, Tsvetoslav
    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.
  8. iomega 55
    iomega 55 avatar
    64 posts
    Member since:
    Dec 2004

    Posted 22 Oct 2012 Link to this post

    This is a request for loading a skin from an assembly.

    I have read this thread but It doesnt work for me, may be it can be more readeable if it has the next:

    a) Is there any form for having at the same time 2 or more DLL with skins embedded  (Telerik.Web.UI.Skins, MySkins, YourSkins)

    b)  When it is used Telerik.Web.SkinsAssembly , why always is sent the messege that we need to apply EnableEmbeddedSkins="false" even if we dont use it in the web.config.

    c) in The sample provided here, in codebehind exists this code:
    protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
     
            RadSkinManager1.GetSkinChooser().Skin = "Default";
        }

    How can we avoid it?  So, just with using Telerik.Web.SkinsAssembly in appsettings Telerik must solve the rest.

    I have downloaded the skin assembly generator from acdevsoftware, generate a MetroGreen.zip from the stylebuilder, generate a MySkin.DLL, but it doesnt work, apply all the recommendations in appsetings, in RadStyleSheetManager.

    Can you share a working simple sample of loading a sking from an external assembly.

    My goal is to have a MetroStylesSkins.DLL

    Thanks in advance.
  9. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 23 Oct 2012 Link to this post

    Hi,

    Just download the RadCustomSkinDemo.zip file from my last but one post. It contains such an example.


    All the best, Tsvetoslav
    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.
  10. iomega 55
    iomega 55 avatar
    64 posts
    Member since:
    Dec 2004

    Posted 23 Oct 2012 Link to this post

    Thanks for your reply, but your sample has a codebehind code in the oninit, and I need a sample with no codebehind,

  11. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 24 Oct 2012 Link to this post

    Hi,

    just remove it - it makes no big difference.

    All the best, Tsvetoslav
    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.
  12. Anzar
    Anzar avatar
    62 posts
    Member since:
    Sep 2012

    Posted 02 Jul 2013 Link to this post

  13. Anzar
    Anzar avatar
    62 posts
    Member since:
    Sep 2012

    Posted 02 Jul 2013 Link to this post

    Hi,
    I have multiple custom skins and switch the skins at run time. How to achieve this by following this method?. 
  14. Anzar
    Anzar avatar
    62 posts
    Member since:
    Sep 2012

    Posted 02 Jul 2013 Link to this post

    Hi,
    Problem resolved.
  15. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 02 Jul 2013 Link to this post

    Hello Anzar,

    your ticket body is empty.
     
    Regards,
    Tsvetoslav
    Telerik
    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 the blog feed now.
  16. Anzar
    Anzar avatar
    62 posts
    Member since:
    Sep 2012

    Posted 02 Jul 2013 Link to this post

    Hi,
    Problem resolved.
Back to Top