Windows TitleBar is now permanently transparent showing things underneath (.NET8), did not have this issue before (.NET7) #20976
Labels
area-controls-window
Window
platform/windows 🪟
potential-regression
This issue described a possible regression on a currently supported version., verification pending
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Description
Previously in .NET 7 the TitleBar was broken as described here: #17679
In particular, there was no accurate reading on its height from
App.Window.TitleBar.Height
.That appears to be fixed now in .NET8 which is great. But now the TitleBar has become transparent, allowing things to pass through under it no matter what the setting is. For example like this:
Here we should be seeing a green TitleBar all the way across the screen and under the title of the bar, but instead the image underneath is showing through.
Secondarily, the same bug remains where if you do
appWindow.Move(new PointInt32(0, 0));
onlifeCycleBuilder.OnWindowCreated
, it is offset from the left side of the screen by a certain margin. I am not sure why that persists.ie. In the screencap above, the window should be at position (0,0) of the screen which it certainly isn't.
Steps to Reproduce
All repro code is in App.xaml.cs and MauiProgram.cs
App.xaml.cs:
MauiProgram.cs
Link to public reproduction project repository
https://github.com/jonmdev/WindowsTitleBarBug
Version with bug
8.0.1 GA
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
7.0.101
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: