如何在xamarin.forms上使用xaml在母版详细信息页面中显示页面标题?

如何在xamarin.forms上使用xaml在母版详细信息页面中显示页面标题?,xaml,xamarin.forms,Xaml,Xamarin.forms,我想使用xaml在母版详细信息页面中显示页面标题。我尝试在MasterDetailPage,MasterDetailPage.Master,MasterDetailPage.Details标签中添加x:Name和x:Title属性。但这些都不起作用。以下是xaml: <?xml version="1.0" encoding="utf-8" ?> <MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"

我想使用xaml在母版详细信息页面中显示页面标题。我尝试在MasterDetailPageMasterDetailPage.MasterMasterDetailPage.Details标签中添加x:Namex:Title属性。但这些都不起作用。以下是xaml:

<?xml version="1.0" encoding="utf-8" ?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:local="clr-namespace:MSCommunity_Xamarin"
         xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
         prism:ViewModelLocator.AutowireViewModel="True"
         x:Class="PrismUnityApp3.Views.MainPage"
         x:Name="Page title">

<MasterDetailPage.Master>
</MasterDetailPage.Master>

<MasterDetailPage.Detail>
</MasterDetailPage.Detail>


页面标题仅显示嵌入
导航页面中的页面,并且正在查找的属性是
标题(不是x:title,不是x:Name)


在NP中嵌入MDP没有多大意义。通常的模式是在
NavigationPage
中设置一组
ContentPage
s(设置
Title
),作为
MasterDetailPage
Detail
。MDP是您的
应用程序。主页

尝试设置内容页title=“菜单”的标题