我有一个Xamarin Forms应用程序,我想知道是否有可能只允许在电话(或小屏幕)上使用SwipeGestureRecognizer。
我正在使用具有2个内容视图的视图。在台式机上,我想同时在屏幕上看到它们,但是在电话上,我想分别地看到它们(滑动手势)。
<ContentView.GestureRecognizers>
<SwipeGestureRecognizer Command="{Binding SwipedViewCommand}" Direction="Right" />
</ContentView.GestureRecognizers>
该命令将布尔值取反,并且每个内容视图都绑定到该布尔值(一个检查为true,另一个检查为false)
https://docs.microsoft.com/es-es/xamarin/xamarin-forms/app-fundamentals/gestures/swipe