-
Notifications
You must be signed in to change notification settings - Fork 803
Closed
Labels
area-TitleBarIssues related to custom window title bars.Issues related to custom window title bars.
Description
Describe the bug
The TabStripFooter does not properly serve as a titlebar, at some points of resizing the window, it just stops working and breaks.
Steps to reproduce the bug
- Create a new WinUI3 Project
- Add a TabView with at least enough tabs to make it scrollable:
- Add a drag region which serves as the titlebar
<TabView
x:Name="tabControl"
Loaded="tabControl_Loaded">
<TabView.TabStripFooter>
<Grid x:Name="customDragRegion" HorizontalAlignment="Stretch" Background="Green" VerticalAlignment="Stretch" MinWidth="188" Margin="0,-2,0,0"/>
</TabView.TabStripFooter>
</TabView>- Set the titlebar in the code behind:
this.ExtendsContentIntoTitleBar = true;
private void tabControl_Loaded(object sender, RoutedEventArgs e)
{
this.SetTitleBar(customDragRegion);
for (int i = 0; i < 20; i++)
tabControl.TabItems.Add(new TabViewItem { Header = "Tab Header!" });
}- You should see a green grid in the window.
- Start moving your window by clicking on the green grid. Should work. Now put your window into maximized mode. Moving the window does not work anymore. Putting the window back to normal size, should also not allow moving it. But resizing just a tiny bit fixes everything and moving works again.
Expected behavior
I would expect the window to always be able to get moved around
Screenshots
20250227-0656-34.6436089.mp4
NuGet package version
Windows App SDK 1.6.3: 1.6.250108002
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 24H2 (22621, October 2024 Update)
IDE
Visual Studio 2022
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-TitleBarIssues related to custom window title bars.Issues related to custom window title bars.