title: Image doesn't stay inside border/canvas on drag/zoom
body: <p>I have a WPF application with Canvas,border and Image.</p>
  
  <pre><code>&lt;Canvas Height="300" Width="400" Background="Gray" Margin="10,210,15,150" Grid.Row="1"&gt;
      &lt;Border BorderBrush="Black" BorderThickness="2" Width="400" Height="250" Name="bord" /&gt;
      &lt;Image Name="x" Stretch="Fill" MouseWheel="x_MouseWheel" Width="359" Height="230"  Grid.Row="1" Opacity="1" MouseLeftButtonDown="x_MouseLeftButtonDown" MouseMove="x_MouseMove" RenderTransformOrigin="0.5,0.5" MouseLeftButtonUp="x_MouseLeftButtonUp"&gt;
          &lt;Image.Source&gt;
              &lt;BitmapImage UriSource="/ProjectOwn;component/Images/First.png"/&gt;
          &lt;/Image.Source&gt;
      &lt;/Image&gt;
  &lt;/Canvas&gt;
  </code></pre>
  
  <p>The problem is the following: I can drag the image and zoom in or out, but it doesn't stay inside my border/canvas, so i can move it over the whole interface while mouse clicked on it which is not good (the picture over sized also if i zoom out and it takes the whole wpf window). How can I solve it?</p>