I want to create a functionality to tap and add a pin image over another background image and the background image should be able to zoom and pan this is the XAML code for this, here the pinch zoom is not working but tap event is working fine
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:POC"
xmlns:ui="clr-namespace:Vapolia.Lib.Ui;assembly=XamarinFormsGesture"
x:Class="POC.MainPage"
Title="Main Page">
<ScrollView AbsoluteLayout.LayoutFlags="All">
<local:PinchAndPanContainer>
<local:PinchAndPanContainer.Content >
<AbsoluteLayout x:Name="AbsoluteLayoutForImage">
<Image x:Name="FloorPlanImage"
Source="Capture2.png"
HeightRequest="400"
IsEnabled="True"
InputTransparent="True"
ui:Gesture.TapCommand2="{Binding TapCommand2}"/>//This Property
</AbsoluteLayout>
</local:PinchAndPanContainer.Content>
</local:PinchAndPanContainer>
</ScrollView>
in the cs file, this tap command is adding a pin image inside the absolute layout using the coordinates in Point.
public Command<Point> TapCommand2 => new Command<Point>(point =>
{
AddPin(point);
});
Now if we just remove ui:Gesture.TapCommand2="{Binding TapCommand2}"
this property from the above code pinch and pan works fine.
For Tap event I used Vapolia.XamarinFormsGesture NuGet package and for pinch and pan used xamarin forms Gesture Recognizer Can anyone help