<menuitem.header> <Image Source="/Assembly;component/Resources/Images/Img.png" Margin="-3,-1,0,0" Stretch="None" /> </menuitem.header>
var headerMenuIcon = new FrameworkElementFactory(typeof(Image)); headerMenuIcon.SetValue(Image.SourceProperty, new BitmapImage(new Uri("Resources/Images/Img.png", UriKind.Relative))); var headerMenuItem = new FrameworkElementFactory(typeof(MenuItem)); headerMenuItem.SetValue(MenuItem.HeaderProperty, headerMenuIcon);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)