title: How to convert ImageBrush to image
body: <p>I Created a Painted canvas</p>
  
  <pre><code>&lt;Canvas Grid.Row="1" Name="PaintCanvas" MouseDown="PaintCanvas_MouseDown" MouseUp="PaintCanvas_MouseUp" MouseMove="PaintCanvas_MouseMove"&gt;
          &lt;Canvas.Background&gt;
              &lt;ImageBrush ImageSource="/MyNoteBook;component/Images/LinnedPage.png"/&gt;
          &lt;/Canvas.Background&gt;
  </code></pre>
  
  <p>now after I finish to paint on it I want to save it to File + Want to convert it to pictureBox or Image or bitmap in c# code</p>
  
  <p>How I do that?</p>
  
  <p>Already tried</p>
  
  <pre><code>ImageBrush picture = (ImageBrush)PaintCanvas.Background;
  Image a = (Image)picture;
  System.Drawing.Bitmap btmap = (System.Drawing.Bitmap)picture;
  </code></pre>
  
  <p>All things i found on StackOverFlow and in google
  Is convert from Image to imageBrush</p>
  
  <p>Thank you in advance</p>