有没有办法在 Xamarin Forms 中禁用 Android 上的 TabbedPage 之间的滑动?
XAML:
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="App.MainTabbedPage">
</TabbedPage>
C#:
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace App
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MainTabbedPage : TabbedPage
{
public MainTabbedPage ()
{
InitializeComponent();
Children.Add(new PageOne());
Children.Add(new PageTwo());
Children.Add(new PageThree());
}
}
}
当前的行为是您可以简单地滑动以在页面之间切换。但我想禁用它......我找到了这个链接,但我似乎无法在我的代码中实现它。任何帮助表示赞赏