, , App.xaml.cs:
public App()
{
InitializeComponent();
var tabs = new TabbedPage();
tabs.Children.Add(new NavTestPage() { Title = "Tab title" });
MainPage = tabs;
}
:
public App()
{
InitializeComponent();
var tabs = new TabbedPage();
var page = new NavTestPage() { Title = "Page title" };
tabs.Children.Add(new NavigationPage(page) { Title = "Tab title" });
MainPage = tabs;
}
NavigationPage, . A TabbedPage - 1 . :
TabbedPage
NavigationPage
ContentPage
NavigationPage
ContentPage
NavigationPage
ContentPage
Update:
, ContentPage TabbedPage XAML. , TabbedPage. , , TabbedPage.
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/navigation/tabbed-page/
, , XAML :
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:NavTest"
x:Class="NavTest.MyTabbedPage">
<NavigationPage Title="NavTest">
<x:Arguments>
<local:NavTestPage />
</x:Arguments>
</NavigationPage>
</TabbedPage>
MainPage App.xaml.cs:
public App()
{
InitializeComponent();
MainPage = new MyTabbedPage();
}