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

RadNotification and Custom Skin

3 Answers 170 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Brian Levin
Top achievements
Rank 2
Brian Levin asked on 22 Aug 2011, 10:06 PM
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!

3 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 25 Aug 2011, 08:35 AM
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 >>

0
Brian Levin
Top achievements
Rank 2
answered on 25 Aug 2011, 06:20 PM
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
0
Marin Bratanov
Telerik team
answered on 26 Aug 2011, 12:52 PM
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 >>

Tags
Notification
Asked by
Brian Levin
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Brian Levin
Top achievements
Rank 2
Share this question
or