title: Binding Relative Path for BitmapImage UriSource
body: <p>I have the following:</p>
  
  <pre><code>&lt;BitmapImage UriSource="{Binding resource}" /&gt;
  </code></pre>
  
  <p>Where resource is a string in a class that holds a location to an image. This works when resource is an absolute path, but doesn't when the path is relative.</p>
  
  <p>I understand I have to use <a href="https://stackoverflow.com/questions/6111470/xaml-bitmap-urisource-absolute-path-works-relative-path-does-not-why">pack URI</a>. But how do I implement it in this case?</p>