【发布时间】:2018-03-15 20:10:38
【问题描述】:
我需要在整个应用程序中使用TabbedPage。在第一页选项卡的显示正常。当我从 Tab1 开始第二页时,它隐藏了所有选项卡。我怎样才能在整个应用程序中都有 Tab。
MainPage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TabbedApp.MainPage"
xmlns:local="clr-namespace:TabbedApp">
<local:DairyTabs></local:DairyTabs>
<ContentPage Title="Tab 2">
<StackLayout>
<Label Text="Tab 2"
HorizontalTextAlignment="Center"
HorizontalOptions="FillAndExpand"
Margin="5" />
</StackLayout>
</ContentPage>
</TabbedPage>
这是从第二页开始的代码
btnDemo.Clicked +=async delegate {
await Navigation.PushModalAsync(new Page2());
};
【问题讨论】:
标签: xaml xamarin xamarin.forms