ImageUrl and App_Themes

5 posts, 0 answers
  1. Eric Schoenholzer
    Eric Schoenholzer avatar
    138 posts
    Member since:
    Mar 2004

    Posted 24 Jan 2008 Link to this post

    Is there a way to define the ImageUrl property of the menu depending on the selected theme?

    ..   ImageUrl

    ="Images/16x16/Activity.gif">  
    doesn't get the image from the theme folder and defining the path as "~/App_Themes/MSCRM12/Images/Activity.gif" isn't the best way.

    I would like to use them as 'global images' and not specific to a control (like themeing of a control).

    Thanks
    Eric

  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 25 Jan 2008 Link to this post

    Hello Eric Schoenholzer,

    I agree that it would be very useful indeed. We have done some research, but it is not very clear how it should be implemented. The standard ASP.NET menu control does not support it either. We will log it and do some additional research, but for the moment we cannot think of a solution.

    Best wishes,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. L Lodder
    L Lodder avatar
    1 posts
    Member since:
    Jul 2007

    Posted 11 Jun 2009 Link to this post

    Is there any progress on this issue?
  4. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 11 Jun 2009 Link to this post

    Hi L Lodder,

    I'm afraid we don't have any progress on the matter.

    Regards,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 10 Jul 2009 Link to this post

    There is a way to do this.  Simply set the relevant menu icon's imageurl from the codebehind in the pageload sub.

    In the example below my menu is the uxRadMenu and I'm setting the first entry in the menu to the AddNewRecord icon and the last entry in the menu to the Refresh icon.  I have a variable storing the current Theme name, imaginatively called Theme.

    Hope the example helps.

    Regards,

    Jon

    uxRadMenu.Items(0).ImageUrl = Page.ClientScript.GetWebResourceUrl(GetType(RadGrid), "Telerik.Web.UI.Skins." & Theme & ".Grid.AddRecord.gif")  
    uxRadMenu.Items(uxRadMenu.Items.Count - 1).ImageUrl = Page.ClientScript.GetWebResourceUrl(GetType(RadGrid), "Telerik.Web.UI.Skins." & Theme & ".Grid.Refresh.gif"

Back to Top