diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShouldHideHeaderWhenTitleEmpty.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShouldHideHeaderWhenTitleEmpty.png index 1388b4281fd5..87ca549b7989 100644 Binary files a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShouldHideHeaderWhenTitleEmpty.png and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShouldHideHeaderWhenTitleEmpty.png differ diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShouldShowHeaderWhenTitleNotEmpty.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShouldShowHeaderWhenTitleNotEmpty.png deleted file mode 100644 index 1129ad67f6bf..000000000000 Binary files a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ShouldShowHeaderWhenTitleNotEmpty.png and /dev/null differ diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ModalPageBackgroundShouldBeTransparent.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ModalPageBackgroundShouldBeTransparent.png index 9005f93ceea4..c6abfec6960e 100644 Binary files a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ModalPageBackgroundShouldBeTransparent.png and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ModalPageBackgroundShouldBeTransparent.png differ diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShouldHideHeaderWhenTitleEmpty.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShouldHideHeaderWhenTitleEmpty.png index 2f8068d77c23..322dfcff2aa9 100644 Binary files a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShouldHideHeaderWhenTitleEmpty.png and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShouldHideHeaderWhenTitleEmpty.png differ diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShouldShowHeaderWhenTitleNotEmpty.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShouldShowHeaderWhenTitleNotEmpty.png deleted file mode 100644 index bafc9376b6ce..000000000000 Binary files a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ShouldShowHeaderWhenTitleNotEmpty.png and /dev/null differ diff --git a/src/Core/src/Platform/Windows/RootNavigationView.cs b/src/Core/src/Platform/Windows/RootNavigationView.cs index 2fd6397b0f3b..c43ccac44a68 100644 --- a/src/Core/src/Platform/Windows/RootNavigationView.cs +++ b/src/Core/src/Platform/Windows/RootNavigationView.cs @@ -68,17 +68,6 @@ 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();