Welcome to Xamarin Guy Show Blog

Keep updated for latest and Greatest Posts from Xamarin guy

Xamarin Forms horizontal scrolling of an Image wider than the display [Tutorial 36]

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 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

2 thoughts on “Xamarin Forms horizontal scrolling of an Image wider than the display [Tutorial 36]

  • alen
    at

    Can you please paste whole code for PanContainer class?

    • samirgc
      at

      Code is complete you just have to add the namespaces as your project might be different.

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.