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

(HELP) RadMenuItem Icon in code behind

2 Answers 87 Views
Menu
This is a migrated thread and some comments may be shown as answers.
quan
Top achievements
Rank 1
quan asked on 13 Nov 2011, 07:29 PM
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 Answers, 1 is accepted

Sort by
0
quan
Top achievements
Rank 1
answered on 14 Nov 2011, 05:38 PM
help me, please
0
Konstantina
Telerik team
answered on 16 Nov 2011, 11:04 AM
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 >>
Tags
Menu
Asked by
quan
Top achievements
Rank 1
Answers by
quan
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or