title: XAML WPF How to add inline background image on FlowDocument?
body: <p>The following code is to add background image to a Flow Document</p>
  
  <pre><code>&lt;FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&gt;
    &lt;FlowDocument.Background&gt;
      &lt;ImageBrush ImageSource="C:\licorice.jpg" /&gt;
    &lt;/FlowDocument.Background&gt;
    &lt;Paragraph&gt;
      &lt;Run&gt;Hello World!&lt;/Run&gt;
    &lt;/Paragraph&gt;
  &lt;/FlowDocument&gt;
  </code></pre>
  
  <p>The question is, how to change the ImageSource so it stores the image data as string on the xaml file ? ImageBrush is sealed so I cannot derive from it. I am looking for something like this:</p>
  
  <pre><code>&lt;FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&gt;
    &lt;FlowDocument.Background&gt;
      &lt;InlineImageBrush base64Source="iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCA..." /&gt; &lt;!--does not work--&gt;
    &lt;/FlowDocument.Background&gt;
    &lt;Paragraph&gt;
      &lt;Run&gt;Hello World!&lt;/Run&gt;
    &lt;/Paragraph&gt;
  &lt;/FlowDocument&gt;
  </code></pre>