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>
页面不会显示出来吗?我怎样才能正确地做到这一点?