【发布时间】:2016-06-14 03:01:11
【问题描述】:
嘿,我正在使用 Xamarin Forms,我正在处理 android 双击的问题。
我的问题是我使用标签作为按钮 - 当我快速单击它时,应用程序将崩溃。我想通过在单击后禁用点击来防止这种情况。
我的标签在 XAML 中定义如下:
<Label x:Name="LabelName" Text="LabelText"/>
我的代码隐藏是这样的:
LabelName.GestureRecognizers.Add((new TapGestureRecognizer
{
Command = new Command(async o =>
{
await Navigation.PopToRootAsync();
})
}));
【问题讨论】:
-
使用“NumberOfTapRequired”属性
标签: c# android xaml xamarin.forms gesture-recognition