WPF - Pan & Zoom Image

Posted by Yuval Peled on Stack Overflow See other posts from Stack Overflow or by Yuval Peled
Published on 2009-04-12T15:48:14Z Indexed on 2010/04/02 18:23 UTC
Read the original article Hit count: 1542

Filed under:
|
|

I want to create a simple image viewer in WPF that will enable the user to:

  • Pan (by mouse dragging the image).
  • Zoom (with a slider).
  • Show overlays (rectangle selection for example).
  • Show original image (with scroll bars if needed).

Can you explain how to do it?

I didn't find a good sample on the web. Should I use ViewBox? Or ImageBrush? Do I need ScrollViewer?

Thanks!

© Stack Overflow or respective owner

Related posts about wpf

Related posts about c#