[Preview 4] ExtendsContentIntoTitleBar puts control box on wrong side of window
See original GitHub issueDescribe the bug
They say a picture is worth a thousand words.
Steps to reproduce the bug
- File > New > Project, WinUI 3 blank desktop application
- Add
this.ExtendsContentIntoTitleBar = true;
to themyButton_Click
method - Run app and click the button
- Observe control box in wrong location
Version Info
NuGet package version: Microsoft.WinUI 3.0.0-preview4.210210.4 Windows app type:
UWP | Win32 |
---|---|
Yes |
Windows 10 version | Saw the problem? |
---|---|
Insider Build (21301) | Yes |
October 2020 Update (19042) | |
May 2020 Update (19041) | |
November 2019 Update (18363) | |
May 2019 Update (18362) | |
October 2018 Update (17763) | |
April 2018 Update (17134) | |
Fall Creators Update (16299) | |
Creators Update (15063) |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Xbox | |
Surface Hub | |
IoT |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:12 (10 by maintainers)
Top Results From Across the Web
Window.ExtendsContentIntoTitleBar Property
Gets or sets a value that specifies whether the default title bar of the window should be hidden to create space for app...
Read more >Title bar customization - Windows apps
Customize the title bar of a desktop app to match the personality of the app.
Read more >Newest 'titlebar' Questions
I have custom title bar for all windows of my application. I want to create a template that I can use many times...
Read more >Weird coloring when content extends into title bar
I want to write an app in WinUI 3 + C# 10 with a Navigationview extending into the title bar which works out...
Read more >Windows Community Toolkit | XAML Brewer, by Diederik Krols
In this article we showcase the latest and greatest version of the Radial Gauge control in a WinUI 3 Desktop Application.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to elaborate on @vitorgrs’s suggestion which works. Add the following XAML to app.xaml’s resources section:
You can move
ClientAreaPresenter
aboveTitleBarMinMaxCloseContainer
to get the content under the buttonsAs @dotMorten highlights, using the SetTitleBar(UIElement) is a requirement for this Preview 4. ExtendsContentIntoTitleBar removes the system Title Bar, so there is no draggable area anymore. SetTitleBar does this work, it allows to set a draggable area.
But I still do see here a bug, the window caption buttons should be on the right or left depending on the orientation of the Window (although, like @riverar pointed, the Window object doesn’t have a RTL property), regardless the SetTitleBar was set.