title: C# wpf - MenuItem Header that loads from xml file (with accelerator [alt clicking] shortcut)
body: <p>I am trying to create a Multi-Language WPF program that will load it's languages from an xml path, though i'm having problem loading a MenuItem translation and give it it's accelerator.</p>
  
  <p>Here's the main code:</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;XmlDataProvider x:Key="Lang" Source="/lang/english.xml" XPath="Language/MainWindow"/&gt;
  &lt;/Window.Resources&gt;
  &lt;MenuItem Header="{Binding Source={StaticResource Lang}, XPath=MenuItems/MenuItemFile/@Header}"/&gt;
  </code></pre>
  
  <p>Here's how my language file looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;Language&gt;
      &lt;MainWindow&gt;
      &lt;MenuItems&gt;
          &lt;MenuItemFile Header="File" /&gt;
      &lt;/MenuItems&gt;
      &lt;/MainWindow&gt;
  &lt;/Language&gt;
  </code></pre>
  
  <p><strong>My problem is:</strong>
  in this state of the language file it's all ok, but when i am trying to change the Header of MenuItemFile to "_File" (to give it an accelerator option), the program starts and gives the File menu the Header "_File" and not "File" (and an accelerator).</p>
  
  <p>Thanks in advanced,
  Din.</p>