1

I need a Image gallery look like in Windows Phone where when we swipe from the left , the other half of the image is seen and if the image is drag more than 220 width of the image , it should roolback to its original position. I am currently using listbox to get the images dynamically and when using Gestures Drag for swiping. I would like to do some animation so that it exactly behaves as it is seen in Windows Phone 7 Picture Gallery Here is the piece of code for the same private void gestur_DragCompleted(object sender, DragCompletedGestureEventArgs e) { double len = 0.0; double sc = 0.0; if (e.Direction == System.Windows.Controls.Orientation.Horizontal) { sw = (ScrollViewer)((VisualTreeHelper.GetChild(OfferImage, 0) as FrameworkElement).FindName("ScrollViewer")); sw.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;

            len = sw.HorizontalOffset;
            var abs = PANEL_DRAG_HORIZONTAL;
            if (abs < 0)
            {

                if (abs < 0 && CurrentItem < IamgeList.Count)
                {
                    //flick right

                    sc = 455.0 * CurrentItem;
                    CurrentItem++;
                    sw.ScrollToHorizontalOffset(sc);

                }
  • Did you got your answer. If yes I am really trying to do that but I am only able to swipe images but not like photo gallery of windows phone. If you can post your answer it will be a help. – Sanghati Mukherjee Apr 22 '13 at 12:49

0 Answers0