我对Xamarin.Forms(v2.3)有问题
我遵循了此指南:https : //developer.xamarin.com/guides/xamarin-forms/platform-features/android/appcompat/
到目前为止,我已经能够将Material设计成功集成到Forms应用程序中。
我不希望的实际上是MasterDetail,它是我从LoginPage用以下行调用的:
await Navigation.PushModalAsync(new HomePage());
在以下屏幕截图中可以看到什么不起作用:
会显示MasterDetail,但带有标题和汉堡徽标的标题栏不会显示。这是描述我的MasterDetail的代码:
<MasterDetailPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyClassPath"
Title="Care Page">
<MasterDetailPage.Master>
<ContentPage Title="Title">
<Label/>
</ContentPage>
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<ContentPage Title="Title">
<Label/>
</ContentPage>
</MasterDetailPage.Detail>
</MasterDetailPage>
您需要具有一个NavigationPage来显示标题和图标,以便您可以将详细信息设置为NavigationPage。
例如 :
Detail = new NavigationPage(new ContentPage { Title = "Title" });
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句