title: How to overlay a rectangle on an image in WPF
body: <p>I want to place a static rectangle on top of an image.</p>
  
  <p>The rectangle should be a percentage of the image size (like 80%) regardless of the image size.</p>
  
  <p>I have tried to put the image in a Canvas and as a Canvas background but then I can't get the image to fill the surrounding area.</p>
  
  <pre><code>&lt;Canvas Grid.Row="1" Grid.Column="0"&gt;
      &lt;Canvas.Background&gt;
          &lt;ImageBrush ImageSource="{Binding Path=Image1}"/&gt;
      &lt;/Canvas.Background&gt;
   &lt;/Canvas&gt;
  </code></pre>