title: Saving a WPF canvas as an image
body: <p>I was following <a href="http://www.ageektrapped.com/blog/how-to-save-xaml-as-an-image/" rel="noreferrer">this</a> article and I got my canvas to be saved, however, I want to extend the code's functionality and save a particular part of my canvas as an image, rather than my entire canvas.</p>
  
  <p>I tried setting the <code>rect.Offset</code> and <code>rect.Location</code> properties but the image is always saved from the upper left corner of my canvas.</p>
  
  <p>Does anyone know how can I achieve my wanted functionality in a similar way?</p>
  
  <p>Thanks!</p>