question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Title bar still not behaving correctly...

See original GitHub issue

Description

I just updated my Visual Studio installation to Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.3.0 Preview 1.0 hoping that the <Entry IsPassword="True" /> issue would be fixed (the cursor always skips to position 1 and screws the input completely up) - which it is not (I saw where it was fixed but it did not make it into this release but would come out in the GA release… I really hope someone rethinks that decision and can release it during the next RC release…

But, that’s not what I am reporting here. When I fired up my app and I have the OnWindowCreated lifecycle event ExtendsContentIntoTitleBar = true I am expecting the window’s chrome title bar background to go transparent. I don’t want to see the dark strip across the top of the window:

image

Steps to Reproduce

  1. Create a new MAUI app
  2. Configure the lifecycle events as follows:
.ConfigureLifecycleEvents (lifecycle => {
#if WINDOWS
    lifecycle
        .AddWindows (windows => {
            _ = windows.OnWindowCreated ((window) => window.ExtendsContentIntoTitleBar = true);

            Config.ExtendsContentIntoTitleBar = true;
        });
#endif
})
  1. Run the app…

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

net6.0-windows10.0.1904

Did you find any workaround?

I tried to find the content control in the window control tree and can’t find it. Even if I could, there should be a better way to style the color than hacking the visual tree.

Relevant log output

No response

VS bug #1786422

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
PureWeencommented, May 13, 2022

@mobycorp I need to research this scenario a bit more

In the meantime you can try removing it via custom templates inside the WinUI XAML

https://github.com/dotnet/maui/pull/5811

<maui:MauiWinUIApplication.Resources>
        <DataTemplate x:Key="MauiAppTitleBarContainerTemplate">
            <Grid HorizontalAlignment="Stretch">
                <ContentControl
                    Grid.Column="4"
                    IsTabStop="False"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    x:Name="AppTitleBarContentControl">
                </ContentControl>
            </Grid>
        </DataTemplate>
    </maui:MauiWinUIApplication.Resources>

And then do something like this in your window created code to clear out where we set that titlebar image

Toggle that and you can see how the hamburger menu gets all munged up… When you close the toggle, you can see the hamburger menu is over (under) layed by the Flyout Header title…

What’s your overall expectation here? Would it basically be for the hamburger to hide when the flyout is open and then show back up when it’s closed?

0reactions
PureWeencommented, Apr 16, 2023

@mobycorp Once we merge this the experience should be better. Once that’s pushed out with NET8 previews if you can test and let me know!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix title bars not changing to dark mode setting?
I am running on windows 10 build 17763. The picture below shows the dark mode is working on file explorer, but not on...
Read more >
Show accent color on title bar not working
I have set the "Show accent color on title bars and windows borders" to "On". ... and pop-up panels behave correctly with green...
Read more >
Getting The Upper Bar (Title Bar ?) To Show Again After A ...
Yes the red box that you show on the top is what I would like to get it to show again. I do...
Read more >
No Title Bar Issue and Windows 10
Keeping in mind that it has a custom title bar, using the normal route to remove the title bar in the custom form...
Read more >
Fix: Title bar and part of Windows is missing in Windows 10 ...
1. If you are witnessing this problem for the first time on your computer, restart your computer. · 2. Press Shift+Ctrl+Windows key+B to...
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