首页 > 解决方案 > 为什么无法识别此标签页子项?

问题描述

我有这个带有 3 个孩子的标签页,第一个孩子正在被识别,但子页面“Conversas”不是。Visual Studio 说没有找到并要求我检查程序集引用。

<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:BatePapo;assembly=BatePapo"
             x:Class="BatePapo.MainPage" BarBackgroundColor="#FF4383" BarTextColor="WhiteSmoke">

    <TabbedPage.Children>
        <local:Listar Title="Online" />
        <local:Home Title="Definições" />
        <local:Conversas Title="Conversas" />
    </TabbedPage.Children>
</TabbedPage>

我检查了文件背后的代码,它们都具有正确的命名空间,xaml 文件如下所示:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:BatePapo;assembly=BatePapo"
             x:Class="BatePapo.Conversas">

所有的子页面几乎相等,唯一的区别只是它的名字。谁能看到我在这里做错了什么?

标签: xamlxamarintabbed

解决方案


推荐阅读