title: XAML ImageBrush using a BitmapImage without a URI
body: <p>I have the following XAML that displays a cover image for a book using a URI:</p>
  
  <pre><code>&lt;Rectangle.Fill&gt;
      &lt;ImageBrush ImageSource="{Binding CoverUrl}" /&gt;
  &lt;/Rectangle.Fill&gt;
  </code></pre>
  
  <p>However, the image I would like to use is not on disk anywhere or accessible via a URI; it comes from inside a binary file that I parse out into a <code>BitmapImage</code> object.</p>
  
  <p>When I create a <code>BitmapImage</code> object via code, the resulting object's <code>BaseUri</code> and <code>UriSource</code> properties are null.  How can I get the <code>ImageBrush</code> to use a <code>BitmapImage</code> that resides in memory instead of reading it in from a URI?</p>