Navigation bar does not hide on PushAsync in .NET MAUI 10

jael pineda quiroz 20 Reputation points
2026-07-10T00:20:26.03+00:00

Summary:
When navigating to a new page using Navigation.PushAsync(), the navigation bar remains visible, even though I set NavigationPage.SetHasNavigationBar(this, false).
Expected Behavior:
The navigation bar should be hidden on the new page, the same as it is on MainPage.
Actual Behavior:
The navigation bar is still shown when navigating to any page other than MainPage.
Steps to Reproduce:

  1. Create a new .NET MAUI project (MAUI 10).
  2. On any page other than MainPage, add the following code in the constructor: NavigationPage.SetHasNavigationBar(this, false);
    NavigationPage.SetBackButtonTitle(this, null);
  3. Navigate to this page using Navigation.PushAsync(new Page()); 4. Observe that the navigation bar is still shown.image User's image

User's image

User's image

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.


Answer accepted by question author
Pravallika KV 18,850 Reputation points Microsoft External Staff Moderator
2026-07-11T03:20:17.6+00:00

Hi @jael pineda quiroz ,

The behavior depends on your app's root container. If your app uses Shell (the default MAUI 10 template with AppShell), the NavigationPage.SetHasNavigationBar(...) attached property is ignored that's why it has no effect on your pushed pages. Use the Shell property instead:

  • XAML on each detail page: Shell.NavBarIsVisible="False"
  • or C# in the constructor: Shell.SetNavBarIsVisible(this, false);

If you're hosting in a NavigationPage (new Window(new NavigationPage(new MainPage()))), then NavigationPage.SetHasNavigationBar(this, false) does work in that case make sure you're not wrapping pages inside a Shell, and that the property is set on the pushed page instance.

Note: Shell.NavBarVisibilityAnimationEnabled (new in .NET 10) only animates the show/hide it doesn't hide the bar.

Hope this helps!


If the resolution was helpful, kindly take a moment to click on User's imageand click on Yes for was this answer helpful. And, if you have any further query do let us know.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Oldest
  1. Alex Burlachenko 25,285 Reputation points MVP Volunteer Moderator
    2026-07-10T07:54:19.0066667+00:00

    hi jael pineda quiroz & thx for sharing urs issue here at Q&A portal,

    .NET MAUI navigation bug or regression, not an Azure API Management issue. Your page-level call is correct

    NavigationPage.SetHasNavigationBar(this, false);
    

    Since it works on MainPage but not after PushAsync, try setting it again in OnAppearing():

    protected override void OnAppearing()

    {
        base.OnAppearing();
        NavigationPage.SetHasNavigationBar(this, false);
        NavigationPage.SetHasBackButton(this, false);
    }
    

    You can also set it directly in XAML:

    <ContentPage
        ...
        NavigationPage.HasNavigationBar="False">
    

    If the purple area is the Android status bar rather than the MAUI navigation bar, SetHasNavigationBar() won’t hide it. Your screenshots seem to show both: the white row with the back arrow is the navigation bar, while the purple strip at the top is the system status bar. If the white navigation bar remains after setting the attached property in XAML and OnAppearing(), create a minimal repro and report it to the .NET MAUI GitHub repo. Reinstalling packages won’t fix a handler regression.

    https://github.com/dotnet/maui/issues & https://learn.microsoft.com/dotnet/maui/user-interface/pages/navigationpage

    rgds,

    Alex

    &

    If my answer was helpful pls mark it and additional thx if u follow me at Q&A portal

    and at my blog https://ctrlaltdel.blog/

     

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.