Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigationPage TitleBar Persists if child pages have a title #13807

Closed
jknaudt21 opened this issue Mar 9, 2023 · 3 comments
Closed

NavigationPage TitleBar Persists if child pages have a title #13807

jknaudt21 opened this issue Mar 9, 2023 · 3 comments
Labels
area-navigation NavigationPage platform/android 🤖 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@jknaudt21
Copy link
Contributor

Description

Creating a NavigationPage with HasNavigationBar="False" will still display a Navigation Bar if one of the child pages has a title.

image

Steps to Reproduce

  1. Create a new maui app
  2. Delete the App Shell
  3. Create a new xaml TabbedPage
  4. Make the app load the TabbedPage
  5. Inside the Tabbed Page paste this code:
    <NavigationPage Title="My Page"
                    HasNavigationBar="False">
        <x:Arguments>
            <local:MainPage/>
        </x:Arguments>
    </NavigationPage>
  1. Give MainPage.xaml a "Title" property
  2. Run the project. Obersve how the NavigationPage will still have a NavigationBar even though the property is set to false. You can even add the BarBackgroundColorProperty and it will be shown

Link to public reproduction project repository

see repro steps

Version with bug

7.0 (current)

Last version that worked well

7.0 (current)

Affected platforms

Android, Windows

Affected platform versions

Windows 11, Android, haven't tested iOS

Did you find any workaround?

Delete the "Title" property for all child pages of a NavigationPage

Relevant log output

No response

@jknaudt21 jknaudt21 added t/bug Something isn't working area-navigation NavigationPage labels Mar 9, 2023
@SF-Simon
Copy link

    <ContentPage.Title>
        <OnPlatform x:TypeArguments="x:String">
            <On Platform="Default" Value="xxxxxx" />
            <On Platform="WinUI" Value="{x:Null}" />
        </OnPlatform>
    </ContentPage.Title>

This can be solved, but it needs to be present on every page.

It should be controlled more flexibly for different platforms, especially on Windows 11.

@jinxinjuan jinxinjuan added s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage labels Aug 15, 2023
@jinxinjuan
Copy link

Verified this issue with Visual Studio Enterprise 17.8.0 Preview 1.0(.NET8). Can repro on windows and Android platforms with provided code on sample project (TabbedPage). maui-samples/7.0/Navigation/TabbedPage at main · dotnet/maui-samples (github.com)

@PureWeen
Copy link
Member

PureWeen commented Oct 9, 2024

Duplicate of #16816

@PureWeen PureWeen marked this as a duplicate of #16816 Oct 9, 2024
@PureWeen PureWeen closed this as completed Oct 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-navigation NavigationPage platform/android 🤖 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants