5

The title is pretty much self-explaining, but to add to the facts, I'm using a large Canvas inside my ViewBox and my ViewBox is placed inside a ScrollViewer. I've set the event handlers for the MouseMove and MouseWheel, and I'm using myViewbox.Width and myViewbox.Height to change the zoom level (which I'm not sure is the proper way). Now I'm stuck on how to set the zoom origin to my mouse pointer location.

Thanks in advance.

iXed
  • 157
  • 2
  • 3
  • 9
  • http://stackoverflow.com/questions/10372560/zooming-to-mouse-point-with-scrollview-and-viewbox-in-wpf – Vinidu Dec 24 '13 at 09:14

1 Answers1

1

better way is to use the RenderTransform property (particularly ScaleTransform in your case). Have a read here

this could be useful: Pan & Zoom Image

Community
  • 1
  • 1
Bek Raupov
  • 3,782
  • 3
  • 24
  • 42
  • how is it done with a scrollview, a viewbox and a canvas nested in each other? which one must have its `RenderTransform` property set? – iXed Jul 13 '11 at 08:19