title: Drawing a subregion of a BitmapSource
body: <p>I'm creating a level editor in WPF for a 2D tile-based game. I'm trying to figure out the best way to load the tileset <code>Image</code> file and render each tile in the appropriate location to reconstruct the map.</p>
  
  <p>Currently, I'm loading the <code>Image</code> as a <code>BitmapSource</code>, and I'm deriving from the <code>Canvas</code> class for the control that displays the map. I'm overriding the <code>OnRender</code> method so I can get a <code>DrawingContext</code>. However, <code>DrawingContext.DrawImage</code> doesn't appear to have an appropriate overload that draws only a subrect of an image; it looks like I have to draw the entire image.</p>
  
  <p>What should I use if I want to draw subrects of an <code>Image</code> onto a <code>Canvas</code>? Or should I be using something other than a <code>Canvas</code>?</p>