Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions WinUIGallery/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<MicaBackdrop />
</Window.SystemBackdrop>
<Grid x:Name="RootGrid" Loaded="RootGrid_Loaded">
<Grid.Resources>
<x:Double x:Key="TitleBarExpandedHeight">46</x:Double>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was 46 chosen as the value for TitleBarExpandedHeight?
Is this value derived via observation? If yes, then a hardcoded workaround might break under different conditions (e.g., DPI scaling, theme changes, or different Windows versions, resolution settings)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Saharsh979! Thanks for pointing that out. I should’ve mentioned that I tested the fix under different DPI, resolutions, and while switching between them on Win 11.
That said, the current title bar already relies on some hardcoded width/height values, so I followed the same approach here. I couldn’t find a more flexible way to address the gap, but I’m definitely open to better alternatives if you have suggestions.

</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
Expand Down