2
我正在嘗試將一些自定義內容頁面放入選項卡式頁面。可悲的是我不確定,如何用XAML語法來做到這一點。我的虛擬項目如下所示:Xamarin表單:TabbedPage中的內容頁
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyApp.Pages.Page1">
<Label Text="Page 1" VerticalOptions="Center" HorizontalOptions="Center" />
</ContentPage>
頁2完全相同。選項卡式頁面:
<?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="MyApp.Pages.Navigation">
<ContentPage x:Class="MyApp.Pages.Page1" Title="Home">
</ContentPage>
<ContentPage x:Class="MyApp.Pages.Page2" Title="Browse">
</ContentPage>
</TabbedPage>
頁面不會顯示出來嗎?我怎樣才能正確地做到這一點?