1

I’m working with an Image control and I’m trying to implement pinch-zoom and panning.

None of the ready-to-go samples on the web, which handles the zoom and pan, worked as smoothly as the native Photos app on Windows Phone or like when viewing an image in Internet Explorer.

This led me to implement my own way of handling them which included me trying the following ways: (Scaling works as of now and I’m trying to get the panning to work too)

  1. Putting the Image inside a ViewportControl; resulted in incredibly jerky scaling, but panning works smoothly. Setting UseOptimizedManipulationRouting="False" on the image didn't make a difference.

  2. Putting the Image inside a ScrollViewer; scaling doesn't even work and panning is glitchy (jerky sometimes).

  3. Using only the Image control and making use of animations to handle the smooth panning.

I haven't implemented step 3 yet, because I can't shake the feeling I've missed something. How can something so widely used be this hard to implement? :|

So my question is

  1. What do I need to do to implement pinch-zoom and panning as smooth as in the Photos app?
  2. If animations are the way to go can they be used to smooth scaling and translations to match that of the native experience?
Aswin Koliyot
  • 588
  • 1
  • 7
  • 11

0 Answers0