【发布时间】:2023-01-17 00:09:47
【问题描述】:
我注意到 Shell Navigation title 中的一个问题。设置 ContentPage 的 Title 属性时,它也会显示带有后退按钮的相同文本。使用 NavigationPage.BackButtonTitle 属性以及 xaml 仍然无法正常工作。
例如:
主页.xaml
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Switch_Bug.HomePage"
NavigationPage.BackButtonTitle="Back"
Title="Home Page">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>
结果:
预期结果:
在 iOS 中,后退按钮文本应为“后退”,否则只显示后退按钮。但它显示页面的标题文本。
【问题讨论】:
标签: xamarin xamarin.forms xamarin.ios maui