title: Zooming WPF canvas relative to the center rather than top left
body: <p>I am writing a label-making program. In this program, I have a canvas with a white rectangle positioned in the center, with multiple objects that the user can resize, drag, etc on top of it. I also have an option for the user to zoom the canvas, which I accomplish using <code>ScaleTransform</code> via <code>LayoutTransform</code>. I want to have it so that, when the user zooms in, the canvas zooms in on the center, rather than relative to the top right.</p>
  
  <p>Here's a demonstration:</p>
  
  <p>Currently, the canvas zooms like this:</p>
  
  <p><img src="https://i.stack.imgur.com/KDrWR.png" alt="enter image description here"></p>
  
  <p>I need it to zoom like this:</p>
  
  <p><img src="https://i.stack.imgur.com/6FVni.png" alt="enter image description here"></p>
  
  <p>How can I accomplish this task, without re-positioning the elements in the canvas when it is zoomed?</p>
  
  <p><strong>Note</strong>: I'm using LayoutTransform, since I must embed this in a <code>ScrollViewer</code>. <code>RenderTransform</code> accomplishes this, but won't let the user scroll when canvas elements exceed the visible canvas bounds.</p>