Open BaY1251 opened 1 year ago
Hello! After testing locally a bit I've got a work-around for you. You'll just need to make sure the window is loaded first before setting it to be fullscreen. It seems to be caused by the NavigationView style in WinUI setting the top-margin to 32 when the titlebar is hidden (???)
In your example, add the following to CreateMauiApp
in MauiProgram.cs
before builder.Build()
:
#if WINDOWS
builder.ConfigureLifecycleEvents(events =>
{
events.AddWindows(windows =>
windows.OnWindowCreated(window =>
{
var presenter = window?.AppWindow.Presenter;
switch (presenter)
{
case Microsoft.UI.Windowing.OverlappedPresenter overlappedPresenter:
overlappedPresenter.SetBorderAndTitleBar(false, false);
overlappedPresenter.Maximize();
break;
}
}));
});
#endif
Then, just remove the Microsoft.Maui.Handlers.WindowHandler.Mapper.AppendToMapping
code in Windows/App.xaml.cs
.
@Foda TitleBar is indeed hidden, but the Shell flyout menu is also missing 😨. Then how to Open flyout?
Shell.flyout.menu can show in Shell.TitleView? style may like Android
I can't repro this issue on the latest 17.10 Preview1.
Have you confirmed "Shell flyout menu missing, when full screen"?
Unable to open the flyout when full screen
Have you confirmed "Shell flyout menu missing, when full screen"?
Unable to open the flyout when full screen
@BaY1251 Sorry for the mistake. I can repro it now.
Description
I cannot hide the title bar under any circumstances, it was possible before MAUI8.0. There are no elements except for the Shell flyout menu
I tried
appWindow.SetPresenter(AppWindowPresenterKind.FullScreen);
AND #17041
AND #15142
ALL CAN NOT completely hide the TitleBar
Steps to Reproduce
Download https://github.com/BaY1251/MauiDebug.git Open /ANR/ANR.sln to compile and generate a project Run
Link to public reproduction project repository
https://github.com/BaY1251/MauiDebug.git
Version with bug
8.0.0-rc.2.9530
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows10-22H2 net8.0-windows10.0.19041.0
Did you find any workaround?
No response
Relevant log output
No response