Xamarin Forms - Hide navigation bar in MasterDetailPage

前端 未结 2 1872
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-20 13:32

I need hide navigation bar in xamarin forms 3.0.

I try this, but dont work: Hide Navigation Bar on MasterDetailPage

I want hide navigation b

2条回答
  •  悲&欢浪女
    2021-01-20 14:22

    On the detail page you have to remove the navigation bar with NavigationPage.SetHasNavigationBar(this, false); in the constructor right after InitializeComponent()

    public partial class MyPage : NavigationPage
    {
        public MyPage()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, false);
        }
    }
    

提交回复
热议问题