问题描述
是否有一种简单的方法可以将 Xamarion.Forms 上的 hamburger menu 与 navigation page 结合起来?
像这样:
我怎么能这样做?
解决方法
您可以使用 Xamarin.Forms 的 Title View
来创建导航栏的自定义设计。
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TitleViewSample"
x:Class="TitleViewSample.MainPage">
<NavigationPage.TitleView>
...your Layout..
</NavigationPage.TitleView>
</ContentPage>
参考链接:https://www.andrewhoefling.com/Blog/Post/xamarin-forms-title-view-a-powerful-navigation-view