title: Localize ContextMenu item header in WPF
body: <p>I have a UserControl that uses localized strings from resources. It works fine for all elements apart from ContextMenu items:</p>
  
  <pre><code>xmlns:Properties="clr-namespace:MyNamespace.Properties"
  </code></pre>
  
  <p>This works fine:</p>
  
  <pre><code>&lt;Button Content="{x:Static Properties:Resources.BtnOpen}" ...
  </code></pre>
  
  <p>But this doesn't:</p>
  
  <pre><code>&lt;TextBlock.ContextMenu&gt;
      &lt;ContextMenu&gt;
          &lt;MenuItem Header="{x:Static Properties:Resources.CmdClose}"
  </code></pre>
  
  <p>I'm getting: The member "CmdClose" is not recognized or is not accessible.</p>