当我们长按ListView
时,它会触发ItemTapped
和LongPress
事件如何在使用ItemTapped
时停止LongPress
事件?我正在为LongPress
事件使用mr.gestures。
<StackLayout Padding="8,0,8,0" >
<mr:ListView x:Name="AllListStack" IsPullToRefreshEnabled="True" RowHeight="55" LongPressed="Cell_LongPressed"
Swiped="Cell_Swiped" ItemTapped="ListView_ItemTapped">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout Orientation="Horizontal">
<controls:ExtendedLabel IsStrikeThrough="{Binding Isstrickout}" x:Name="Tasktitle" FontSize="20" Text="{Binding TaskTitle}" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" />
<!--<Button x:Name="Tasktitle" Text="{Binding TaskTitle}" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"></Button>-->
<Label x:Name="TaskTime" IsVisible="{Binding Isvisable}" FontSize="13" Text="{Binding TaskTime}" HorizontalOptions="FillAndExpand" VerticalOptions="CenterAndExpand" />
<Image x:Name="imgalram" IsVisible="{Binding Isvisable}" Source="Alarm.png" HorizontalOptions="FillAndExpand" HeightRequest="28" />
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</mr:ListView>
</StackLayout>