Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/Core/src/Platform/Windows/RootNavigationView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ internal Size FlyoutPaneSize

void PaneDisplayModeChanged(DependencyObject sender, DependencyProperty dp)
{
// AlwaysShowHeader must be false only in LeftMinimal mode (Shell flyout) so that
// CollapseEmptyHeader() can remove the header space when title/items are empty.
// All other modes (e.g. Left / FlyoutBehavior.Locked) keep AlwaysShowHeader=true
// so the header area remains visible regardless of content — restoring the
// original NavigationView behaviour and preventing the Issue2740 regression.
// Note: Top mode (TabbedPage) is safe with AlwaysShowHeader=true because
// UpdateToolbarPlacement() sets Header=null there, and WinUI's HeaderContent
// (a ContentControl) auto-collapses to zero height when its content is null.
// Additionally, UpdateHeaderPropertyBinding() binds HeaderContent.Visibility
// directly to Toolbar.Visibility, bypassing AlwaysShowHeader entirely.
AlwaysShowHeader = PaneDisplayMode != NavigationViewPaneDisplayMode.LeftMinimal;
UpdateToolbarPlacement();
UpdatePaneContentGridMargin();
UpdateHeaderVisibility();
Expand Down
Loading