Zooming graphics without scrolling
问题 I have a user control and I'm using ScaleTransform() to implement zoom. However, in order to keep the center content in the center after the zoom, it is also necessary to scroll. For example, if I zoom in (make things bigger), the X and Y origin should increase so that most of the content does not move down and to the right. (That is, as I zoom in, some of the content should disappear to the left and top.) Has anyone worked out the calculations of how much to scroll in the X and Y direction