Hi! I've been using a nuget package called MultiGestureView to get the long tap event on a viewcell but the event give me a Android.Views.View on the sender and dont know how to get the data from that. The binding context of the listview is a List of MyClass (for example)
XAML:
<ListView>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<gesture:MultiGestureView LongPressed="Gesturev_LongPressed">
<Grid BackgroundColor="{Binding colorPrior}" TranslationX="{Binding PosX}">
<!-- some data with bindings-->
</Grid>
</gesture:MultiGestureView>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
CS:
private void Gesturev_LongPressed(object sender, EventArgs e)
{
MyClass myClass = sender as MyClass;
//I tried everything here
if (!longTap)
{
longTap = true;
Task tempo = TempLongTap(360);
DisplayAlert("Long Pressed", myClass.name, "Ok");
}
}