Hey guys in this tutorial we are going to implement pan gesture for the image. The pan gesture is used for detecting dragging and which is helped with the PanGestureRecognizer class.
his is accomplished by moving the image within the view.
The following code example shows how the
Step1:HomePage.xaml
Handling the pan gesture to perform a drag operation requires some math to transform the user interface.So we are going to maintain a container.
Step2:PanContainer.cs
The following code example shows how the
PanContainer
wraps an Image
element in a Homepage.xaml page:Step1:HomePage.xaml
Handling the pan gesture to perform a drag operation requires some math to transform the user interface.So we are going to maintain a container.
Step2:PanContainer.cs
alen
Can you please paste whole code for PanContainer class?
samirgc
Code is complete you just have to add the namespaces as your project might be different.