Navigation bar overlaps title bar when replacing MainPage for a MAUI 6.0 Windows App

See original GitHub issue

Description

This is in relation to https://github.com/dotnet/maui/issues/10710 being closed as fixed. However, the bug is still present in MAUI 6.0, i.e. the LTS product.

Just to confirm that @PureWeen’s fix for 7.0 is good, this only affects 6.0.

.Net 6 with splash page image

.Net 7 with splash page image

Steps to Reproduce

  1. Create a new Default MAUI App using .Net 6.0
  2. Add a new content page call SplashPage.xaml
  3. In App.xaml.cs change the MainPage initialisation to MainPage = new SplashPage();
  4. Add a Loaded event handler in SplashPage.xaml.cs
  5. In the event handler reset the MainPage to be the default AppShell - App.Current.MainPage = new AppShell();

Link to public reproduction project repository

https://dev.azure.com/JohnHunter0895/MauiBugs/_git/MauiBugs/branches?_a=all

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows SDK 10.0.22000.194

Did you find any workaround?

Tried the same workaround used in https://github.com/dotnet/maui/issues/10710 but this results in spurious padding at the top of the flyout items

Microsoft.Maui.Handlers.WindowHandler.Mapper.AppendToMapping(nameof(IWindow), (h, v) => { (v.Handler.PlatformView as MauiWinUIWindow).ExtendsContentIntoTitleBar = false; });

Padding

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JohnHunterACScommented, Dec 29, 2022

@PureWeen I’ve bumped all the projects in the solution up to .Net 7 but the Windows project wasn’t happy about that and I ended up having to recreate the project from scratch and manually copy over all the changes from a backup. At least I’m unblocked now. Thanks.

0reactions
msftbot[bot]commented, Dec 28, 2022

Hi @JohnHunterACS. We have added the “s/needs-info” label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Menu/ToolBar overlap window titlebar and buttons · Issue ...
Symptomes: MenuBar and ToolBar extend upwards over title bar and window buttons (minimize, maximize, close buttons) when the MainPage is ...
Read more >
MAUI on Windows: Hide or cover the grey fake title bar
I covered the default title bar by setting the appwindow in the maui project. You can put the following code in the MainPage.cs:...
Read more >
NavigationPage - .NET MAUI
TitleIconImageSource , of type ImageSource, defines the icon that represents the title on the navigation bar. This is an attached property.
Read more >
.NET MAUI: Is there a way to hide the Navigation Bar/Title ...
I would like to hide the Navigation Bar on specific pages of a Shell application using .NET MAUI. On Android, it is automatically...
Read more >
Title bar customization - Windows apps
Customize the title bar of a desktop app to match the personality of the app.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found