(HELP) RadMenuItem Icon in code behind

3 posts, 0 answers
  1. quan
    quan avatar
    6 posts
    Member since:
    Jan 2011

    Posted 13 Nov 2011 Link to this post

    I want to creat a radmenuitem with code behind but I can't show the icon for it
    RadMenuItem menu = CreateMenu("abc");
    menu.Header = "abc";
    Image img = new Image();
    img.Source = new BitmapImage(new Uri(@"D:\desktop\c.jpg", UriKind.Relative));
    img.Width = 14; img.Height=14;
    menu.Icon = img;
    But it doesn't work, I can't see the icon. Help me, Please.
  2. quan
    quan avatar
    6 posts
    Member since:
    Jan 2011

    Posted 14 Nov 2011 Link to this post

    help me, please
  3. DevCraft banner
  4. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 16 Nov 2011 Link to this post

    Hi Quan,

    Could you please check again the path of the UriSource. I tested your code and it seems to work as expected.
    If you still experience the issue please send us your project, so that we can run it here locally and look for the source of the problem.

    Best wishes,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top