RadNotification and Custom Skin

4 posts, 1 answers
  1. Brian Levin
    Brian  Levin avatar
    11 posts
    Member since:
    Nov 2009

    Posted 22 Aug 2011 Link to this post

    Hope this is an easy one :)

    Created a custom skin (using the default one and making a couple of minor CSS changes) following the directions on http://www.telerik.com/help/aspnet-ajax/radnotification-creating-custom-skin.html.  Everything worked as far as the CSS goes; however the ContentIcon and TitleIcon always appear as broken images when I set EnableEmbeddedSkins="false" no matter what I do.  How can I incorporate the icons (ok, delete, etc.) into my custom skin so that they show up?

    I realize that I can use my own icons, but in this case I would like to use the Telerik default, if possible.

    Thanks in advance!
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 25 Aug 2011 Link to this post

    Hello Brian,

      I am afraid that this is not possible. Our predefined icons are parts of the skins and thus if the embedded skins are disabled these icons are disabled as well, so the string you pass to the ContentIcon or TitleIcon properties will look for an image with this value. This is why you get the broken images icon, because there is no info or ok, or deny, etc image in the folder your page is in.

    I can suggest two ways to work around this
    1) create a notification that has the embedded skins enabled, show it, save the image you desire and use it as a file (you would need to edit it first, as both the content and title icons are in a single sprite)
    2) If you wish to make only minor modifications to the skin you can include a stylesheet that will override the desired selectors via the !important attribute and still use the embedded skins. If you need this modification application-wide you could include it in a master page if you use one.


    Kind regards,
    Marin
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian Levin
    Brian  Levin avatar
    11 posts
    Member since:
    Nov 2009

    Posted 25 Aug 2011 Link to this post

    Hi Marin,

    That's what I thought initially, but I guess what threw me was the documentation (http://www.telerik.com/help/aspnet-ajax/radnotification-creating-custom-skin.html), specifically step 7 which says to use this code in the markup:

    <telerik:RadNotification ID="RadNotification1" runat="server" Title="Title" EnableShadow="true"
        EnableRoundedCorners="true" EnableEmbeddedSkins="false" ShowTitleMenu="true"
        Width="400" OffsetX="-60" OffsetY="-230" ShowInterval="500" Text="Morbi sed turpis at tortor malesuada condimentum id laoreet felis."
        TitleIcon="ok" Animation="Fade" ContentIcon="ok" Skin="MyCustomSKin">
    </telerik:RadNotification>


    Notice the TitleIcon="ok" the ContentIcon="ok", the EnableEmbeddedSkins="false" and Skin="MyCustomSkin".  This led me to believe that I could reuse the same icons that the embedded skins could.

    Either way, just thought I'd let you know and appreciate the quick response.  I will follow your suggestions to get my desired result.

    Thanks!

    Brian
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 26 Aug 2011 Link to this post

    Hello Brian,

    I hope this will work out well for you and with as little effort as possible.

    Thank you for bringing this code snippet to our attention. It will be fixed with the next upload of our online documentation. As a token of gratitude I have updated your Telerik points.


    Best wishes,
    Marin
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top