December 23rd, 2013, 06:59 PM
Trouble With Menu Image
I spent the day learning how to get an icon to show on my window, lol. Quite a task, but now I'm having trouble getting images to show on menu items.
I've added the png image to a resource file called Icons.resx The file now contains an icon file and the png I'm trying to show called NewFile.png. I also have the png I'm trying to show in my Resource folder. The icons there two. The reason I mention both is because the xmal method I used to show the icon doesn't seem to have anything to do with the resource file... Not sure if I'm doing this right, so thought maybe someone could mention something on that lol.
The weird thing is the image shows up in the preview window...but when I run the app with the play button and drop down my file menu there's no image..
Just wondering if someone could explain this to me.
Anyway back to the png that I'm trying to show on the menu. Here's the Xmal code.
Thanks in advanced.
<MenuItem Header="_New File">
<Image Source="Pack://application,,,Water SV1;component/Resources/NewFile.png"></Image>
Click Here to Expand Forum to Full Width