【发布时间】:2019-11-08 16:51:13
【问题描述】:
我是 Xamarin 表单的新手,并且已从我的主页定向到导航页面,我希望标题与后退按钮出现在同一行,但它目前出现在下面的行中,如下所示 -
https://i.imgur.com/lpsJjle.png
我正在使用下面的代码来显示标题-
<NavigationPage.TitleView>
<StackLayout>
<Label
Text="About" TextColor="{StaticResource lightGreen}">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String"
Android="GothamRoundedMedium.ttf#GothamRoundedMedium"
iOS="GothamRoundedMedium">
</OnPlatform>
</Label.FontFamily>
</Label>
</StackLayout>
</NavigationPage.TitleView>
这个代码导航到关于页面 -
Navigation.PushAsync(new NavigationPage(new Survey2()));
任何帮助将不胜感激!
【问题讨论】:
-
您有一个 NavigationPage 嵌套在另一个 NavigationPage 中 - 不要那样做。只需执行 Navigation.PushAsync(new Survey2());
-
成功了,谢谢!
标签: xaml xamarin xamarin.forms