How to show icons in menu entries

I'm new to WPF (and every time I try to do something in WPF that's dead simple in Winforms it's an utter failure and I just go back to Winforms...so I'm trying again) and all I want to do is build a menubar using this control with icons but I cannot get them to show up.  I'm trying to do this in XAML following their tutorial but I cannot for the life of me show a png icon next to an entry.

All of the icons are in a directory called Assets/Icons/ and I've tried multiple ways to reference this directory to get to the icons but nothing I've tried works.

Here's the extremely simple XAML built from their tutoral (imageEditor is what VS2022 gave the thing as a name):

<imageEditor:MenuAdv Height="25" VerticalAlignment="Top">
<imageEditor:MenuItemAdv Header="File">
<imageEditor:MenuItemAdv Header="New...">
<imageEditor:MenuItemAdv.Icon>
<Image Source="Assets/Icons/document.png" Width="16" Height="16"/>
</imageEditor:MenuItemAdv.Icon>
</imageEditor:MenuItemAdv>
<imageEditor:MenuItemAdv Header="Open...">
<imageEditor:MenuItemAdv.Icon>
<Image Source="Assets/Icons/anchor.png" Width="16" Height="16"/>
</imageEditor:MenuItemAdv.Icon>
</imageEditor:MenuItemAdv>
</imageEditor:MenuItemAdv>
<imageEditor:MenuItemAdv Header="Edit"/>
<imageEditor:MenuItemAdv Header="Format"/>
<imageEditor:MenuItemAdv Header="View"/>
<imageEditor:MenuItemAdv Header="Help"/>
</imageEditor:MenuAdv>

1 Reply

EM Elakkiya Muthukumarasamy Syncfusion Team November 30, 2021 03:05 PM UTC

Hi Tate, 
 
Greetings from Syncfusion. 
 
We have checked your query and we can understand that you want to set icon for MenuItems. We have prepared the sample for the same to set the Icon for MenuItems. 
 
 
 
 
Output: 
 
 
Please try it with the above solution and let us know if you need any further assistance on this. 
 
Regards, 
Elakkiya 


Loader.
Up arrow icon