Welcome to Xamarin Guy Show Blog

Keep updated for latest and Greatest Posts from Xamarin guy

Xamarin Forms Image Zoom[Tutorial 37]

In this tutorial we are going to implement Xamarin Forms Image Zoom[Tutorial 37].
Handling the pinch gesture to perform a zoom operation requires some math to transform the user interface. This section contains a generalized helper class to perform the math, which can be used to interactively zoom any user interface element.
Enough is enough show me the code.
Step1:DoubleExtensions.cs
The following code example shows the PinchToZoomContainer class:
When the Image element receives a pinch gesture, the displayed image will be zoomed-in or out. The zoom is performed by the PinchZoomContainer.OnPinchUpdated method, which is shown in the following code example:
Step2:Create a Container.cs

Step3:Homepagexaml It will Contain the image which will be calling <local:PinchToZoomContainer> inorder to perform the pinch to zoom.

 4,454 total views,  7 views today

Leave a Reply