xamarin.forms - 在 xmlns="http://xamarin.com/schemas/2014/forms" 中找不到类型 SwipeGestureReconizer
问题描述
我正在尝试设置一个侧面菜单来导航到不同的页面。但我的 SwipeReonizer 似乎不起作用
我从文档中复制了代码(https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/gestures/swipe)。
XAML:
<AbsoluteLayout.GestureRecognizers>
<SwipeGestureRecognizer Direction="Right" Swiped="SwipeGestureRecognizer_Swiped"/>
</AbsoluteLayout.GestureRecognizers>
<Label x:Name="Username"
AbsoluteLayout.LayoutBounds="180, 20, 200, 100"
Text="Sint Gordon" TextColor="White" FontSize="Large"
FontFamily="Proxima Nova bold">
</Label>
C# :
SwipeGestureRecognizer swipeRecon = new SwipeGestureRecognizer();
private void SwipeGestureRecognizer_Swiped(object sender, SwipedEventArgs e)
{
Username.Text = "You swiped right";
}
解决方案
推荐阅读
- cadence-workflow - 如何有效使用Worker、WorkflowClient
- javascript - Jasmine tohaveBeenCalledWith() 对象对比
- xamarin - Xamarin CollectionView Observable Collection 未使用搜索栏更新
- python - XML 创建格式不正确
- python - SQLALCHEMY_DATABASE_URI 和 SQLALCHEMY_BINDS 均未设置
- mysql - 错误代码:1241。操作数应包含 1 列不知道如何解决此问题
- python - 如何在 Python 中按列值拆分大型数据集的数据框?
- excel - 需要 VBA 对更改电子表格中的数据进行排序以进行计算。当前代码给出错误
- nginx - 无法为 Ingress-Nginx Helm Chart 分配全局 LB IP
- javascript - 如何获取标题的动态值