小编kyl*_*ver的帖子

Xamarin表单:TabbedPage中的ContentPages

我试图将一些自定义内容页面放入选项卡页面.遗憾的是,我不确定,如何使用XAML语法执行此操作.我的虚拟项目如下所示:

第1页

<?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>
Run Code Online (Sandbox Code Playgroud)

第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>
Run Code Online (Sandbox Code Playgroud)

页面不会出现?我该怎么做呢?

c# mobile xaml xamarin xamarin.forms

6
推荐指数
1
解决办法
7811
查看次数

标签 统计

c# ×1

mobile ×1

xamarin ×1

xamarin.forms ×1

xaml ×1