A core feature of this app is the pan gesture. A pan gesture is when a user presses on the control and moves it around the screen. We will also add a random rotation to the Swiper control to make it look like there are photos in a stack when we add multiple images.
We start by adding some fields to the SwiperControl:
- Open the SwiperControl.xaml.cs file.
- Add the following fields in the code to the class:
private readonly double _initialRotation;private static readonly Random _random = new Random();
The first field, _initialRotation, stores the initial rotation of the image. We will set this in the constructor. The second field is a static field containing a Random object. As you might remember, it's better to create ...