The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
list of pinch/zoom images like photo app RRS feed

  • Question

  • Hey everyone,

    Does anyone know how to recreate the native photo app on windows phone 8? I know that's a kind of broad question but the pieces that I was interested in were 1.) while horizontally scrolling, snapping the photo to the viewport  2.) pinch/zooming the image from the scrolling list. I currently have pinch/zoom working for a single image thanks to http://code.msdn.microsoft.com/wpapps/Image-Recipes-0c0b8fee but I can not seem to figure out how to get that same kind of behavior with a list of images. Any help or insight would be greatly appreciated.

    Jrschifa

    Wednesday, December 4, 2013 12:26 AM

Answers

All replies

  • It's pretty difficult (at least for me) to get something working just like the original photo viewer app. If you want similar functionality, I would look into:

    1. ViewportControl (under System.Windows.Control.Primitives) for the bounce-back type of motion when trying to move the zoomed image past the edge of the screen.

    2.  Telerik's RadSlideView for a fairly nice way to swipe to a new image. 

    What's hard is finding a way to use both of those controls and do zooming.  Other than the commercial Telerik control, you can always try a Panorama control with the title and headers both gone.  It's doable but you'll have to do some major data virtualization because the panorama can only hold a few panoramaItems.

    Have fun and let me know if you have a good implementation :)  I need one, too.


    Lee McPherson

    Wednesday, December 4, 2013 1:43 AM
  • Hey Lee, 

    Thanks for the reply. Yeah, I've been messing around with the ViewportControl and canvas inside the DataTemplate for a list item but with no luck yet. I didn't really wanna use a Panorama control cause of the virtualization issues and the fact that you can't scroll it fluidly like a listbox. It seems to be a tricky implementation that no one has conquered yet.

    Thursday, December 5, 2013 4:55 PM
  • Take a look at the media viewer here;

    http://code.msdn.microsoft.com/wpapps/Basic-Lens-sample-359fda1b/view/SourceCode#content


    http://pauliom.wordpress.com

    • Proposed as answer by Lee McPherson Friday, December 6, 2013 3:49 AM
    • Marked as answer by jrschifa Tuesday, December 10, 2013 11:42 PM
    Thursday, December 5, 2013 5:38 PM
  • Wow, that Media Viewer is excellent! Thanks for the link.

    Lee McPherson

    Friday, December 6, 2013 3:49 AM
  • Ah Sweet, that is definitely that type of "snapping" I was looking for. I just built the sample on the emulator really quick just to see. I'll need to load it on my test phone and see if there are some other pieces I can harvest from that sample. Thanks a lot for the lens sample link.
    Friday, December 6, 2013 4:14 PM