Skip to content

how to Customize Titlebar in winui 3? #3951

Answered by DarranRowe
ghost1372 asked this question in Q&A
Discussion options

You must be logged in to vote

It shouldn't matter, since as the release notes state Microsoft.UI.Xaml.Window.ExtendsContentIntoTitleBar uses the same implementation as Microsoft.UI.Windowing.AppWindowTitleBar.ExtendsContentIntoTitleBar.

However, there is an issue where:

    MainWindow::MainWindow()
    {
        ExtendsContentIntoTitleBar(true);
        bool extended = AppWindow().TitleBar().ExtendsContentIntoTitleBar(); //extended will be set to true.
    }
    MainWindow::MainWindow()
    {
        AppWindow().TitleBar().ExtendsContentIntoTitleBar(true);
        bool extended = ExtendsContentIntoTitleBar(); //extended will be set to false!!!
    }

So it is currently better to use Microsoft.UI.Xaml.Window.ExtendsCo…

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@ghost1372
Comment options

Answer selected by ghost1372
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Wenveo
Comment options

@0x427279
Comment options

Comment options

You must be logged in to vote
1 reply
@ghost1372
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants