I have implemented a dashboard with Navigation Drawer in Xamarin Forms. I want to Remove the Blue part in the below image and move the toggle button to my design. Please help
I have implemented navigation Drawer/Flyout as follows using Shell Flyout
NavigationPage.SetHasNavigationBar(this, false);
I tried using the above line of code from another stack overflow question but it didn't work
CodePudding user response:
I think for Shell
is a bug to hide this ActionBar. I have a project in Shell and I tried everything to hide it, but nothing worked. So I just deal with it:
<ContentPage.ToolbarItems>
<ToolbarItem Text="MyTitle" Order="Primary"/>
<ToolbarItem IconImageSource="img1.png" Order="Primary"/>
<ToolbarItem IconImageSource="img2.png" Order="Primary"/>
<ToolbarItem IconImageSource="img3.png" Order="Primary"/>
</ContentPage.ToolbarItems>
If you want, you can remove your actionBar and use this ActionBar of Shell editing it.
CodePudding user response:
According to the screenshot, you have two flyout page.
If you use the Shell template, it has a flyout page by default when you set the
FlyoutDisplayOptions
toAsMultipleItems
.Please note, if you use the
NavigationPage
in your App.xaml.cs, it would show the bar like below. So do not use it when you use the Flyoutpage.MainPage = new NavigationPage(new Flyoutpage());
FlyoutPage: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/navigation/flyoutpage