Using Custom and Built In Skins

2 posts, 0 answers
  1. Monica
    Monica avatar
    1 posts
    Member since:
    Jul 2013

    Posted 11 Sep 2013 Link to this post

    Hi,

    I'm wondering if there is a way to build custom skins but also give the user a way to pick built in skins.  For example, I may want to set up a new skin called CustomSkin1 and then give the user a preference screen to select the look they want.  I would allow them to select CustomSkin1 but also Metro, Vista etc...

    Once selected can I globally change my EnableEmbeddedSkins property on the telerik controls via a master page or something like that or does this setting have to be set on ever control?  I found ways to do this via web.config but that will not work since I basically need to do it per user.

    Thanks
  2. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    539 posts

    Posted 16 Sep 2013 Link to this post

    Hello, Monica.

    The RadSkinManager performs exactly that: sets the skin globally for all controls on the page that have no specified skin. To use it, simply add it to your page like that:

    <telerik:RadSkinManager runat="server" Skin="Default" />

    Of course if you need to modify the skin on the fly, you need to add an ID to be able to access the SkinManager from code behind.

    As for switching the between embedded and external skins, you will need to set the EnableEmbeddedSkins property for all controls to false when using external skins and to true when using embedded. That may prove to be tricky, since you will need to listen for the OnSkinChanged event.

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