【发布时间】:2018-12-10 19:15:40
【问题描述】:
有没有办法在 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());
}
}
}
当前的行为是您只需滑动即可在页面之间切换。但我想禁用它... 我找到了this link,但我似乎无法在我的代码中实现它。任何帮助表示赞赏
【问题讨论】:
-
您是否尝试过使用自定义渲染器?
标签: android xamarin xamarin.forms tabbedpage