title: Images bound to images added to resx files using XAML
body: <p>My WPF application includes a resource file MyResources.resx, containing several strings and images. Because the application will need to be localized, all my references to globalized resources must be made via named properties of the auto-generated MyResources class. The following code works well for string resources:</p>
  
  <pre><code>&lt;Button Content="{x:Static local:Properties.MyResources.ButtonText}" /&gt;
  </code></pre>
  
  <p>However the same does not work for images. Assuming I have an image eflag.bmp added to the resources as a resource named Flag, I would like to be able to do something like this:</p>
  
  <pre><code>&lt;Image Source="{x:Static local:Properties.MyResources.Flag}" /&gt;
  </code></pre>
  
  <p>Please note that the following alternative approach:</p>
  
  <pre><code>&lt;Image Source="/MyNamespace;component/Resources/eflag.bmp" /&gt;
  </code></pre>
  
  <p>cannot be used in this case because it will not be able to handle localization. The problem can be solved using code behind but I am looking for a XAML based solution.</p>