title: How to get a Uri of the image stored in the resources
body: <p>I have two <code>.png</code> files added to my resources which I need to access their Uri when doing binding.</p>
  
  <p>My <code>xaml</code> code is as followed:</p>
  
  <pre><code>&lt;Grid&gt;
    &lt;Image&gt;
      &lt;Image.Source&gt;
         &lt;BitmapImage DecodePixelWidth="10" UriSource="{Binding Path=ImagePath}"/&gt;
      &lt;/Image.Source&gt;
    &lt;/Image&gt; 
  &lt;/Grid&gt;
  </code></pre>
  
  <p>and the <code>binding</code> code using <strong><em>ImagePath</em></strong> is:</p>
  
  <pre><code>ImagePath = resultInBinary.StartsWith("1") ? Properties.Resources.LedGreen : Properties.Resources.ledRed;
  </code></pre>
  
  <p>However</p>
  
  <pre><code>Properties.Resources.LedGreen
  </code></pre>
  
  <p>returns a <code>Bitmap</code> instead of <code>String</code> containing the Uri of that particular image.
  I just want to know how to extract that value without a need to address a path of the image in the directory that it's stored. (Which honestly I am not sure is a right thing to do as I couldn't find any similar situation on the net).</p>
  
  <p>Please let me know if there is even a preferred method to the one I am trying to use if available.</p>