Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove ActionBar Top Heading in XamarinForms

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 enter image description here

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

like image 214
Aravind Shajan Avatar asked Oct 23 '25 04:10

Aravind Shajan


2 Answers

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.

like image 107
techie Avatar answered Oct 26 '25 07:10

techie


Use Shell.NavBarIsVisible="False" Inside Content Page Will Work Shell.Current.FlyoutIsPresented = true; in button click Will open Drawer. This answer was Found in

https://learn.microsoft.com/en-us/answers/questions/349760/how-to-hide-navigation-bar-on-xamarin-forms-when-u.html

like image 37
Adarsh s Avatar answered Oct 26 '25 07:10

Adarsh s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!