title: How to get an image from a resource file into an WPF menuitem.icon
body: <p>I have the following piece of code (XAML C#):</p>
  
  <pre><code>        &lt;Menu IsMainMenu="True" DockPanel.Dock="Top"&gt;
              &lt;MenuItem Name="fileMenu" Header="_File" /&gt;
              &lt;MenuItem Name="editMenu" Header="_Edit" /&gt;
              &lt;MenuItem Name="setupMenu" Header="_Setup"&gt;
                  &lt;MenuItem Header="_Language"&gt;
                      &lt;MenuItem.Icon&gt; 
                           //I want to insert image here
                      &lt;/MenuItem.Icon&gt;
                  &lt;/MenuItem&gt;
              &lt;/MenuItem&gt;
              &lt;MenuItem Name="helpMenu" Header="_Help" /&gt;
          &lt;/Menu&gt;
  </code></pre>
  
  <p>And a resource file named images.resx containing an image called lang.png.
  How can I insert the image as an icon for the Menu-Item?
  Is there a better way?</p>