From efc0ac562a18c530fb9415d124b493e803afd53f Mon Sep 17 00:00:00 2001 From: SyedAbdulAzeem Date: Thu, 11 Jun 2026 15:54:21 +0530 Subject: [PATCH 1/4] Fix Shell TitleView not resizing on rotation in iOS 26+ --- .../Shell/iOS/ShellPageRendererTracker.cs | 22 ++++++ .../Shell/iOS/ShellSectionRenderer.cs | 20 +++++ .../Shell/iOS/ShellSectionRootRenderer.cs | 11 +++ .../PublicAPI/net-ios/PublicAPI.Unshipped.txt | 1 + .../net-maccatalyst/PublicAPI.Unshipped.txt | 1 + .../TestCases.HostApp/Issues/Issue35844.cs | 74 +++++++++++++++++++ .../Tests/Issues/Issue35844.cs | 46 ++++++++++++ 7 files changed, 175 insertions(+) create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue35844.cs create mode 100644 src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35844.cs diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs index 74948b0f6f09..8827cd5a12f9 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs @@ -371,6 +371,28 @@ TitleViewContainer CreateTitleViewContainer(View titleView) return new TitleViewContainer(titleView); } + /// + /// Re-applies the navigation bar frame to the current TitleView container. + /// On iOS 26+ the TitleView container uses autoresizing masks with an explicitly set frame + /// (see ), so the frame is not automatically recomputed + /// when the navigation bar resizes during rotation or window size changes. This explicitly + /// resizes the container to match the navigation bar's new dimensions. + /// + internal void UpdateTitleViewFrameForOrientation() + { + if (NavigationItem?.TitleView is not TitleViewContainer titleViewContainer) + { + return; + } + + var navigationBarFrame = ViewController?.NavigationController?.NavigationBar.Frame; + if (navigationBarFrame.HasValue) + { + titleViewContainer.Frame = new CGRect(0, 0, navigationBarFrame.Value.Width, navigationBarFrame.Value.Height); + titleViewContainer.LayoutIfNeeded(); + } + } + void OnTitleViewParentSet(object? sender, EventArgs e) { if (sender is Element element) diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs index d0344d343a41..4064ea5192c1 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Threading.Tasks; using System.Windows.Input; +using CoreGraphics; using Foundation; using Microsoft.Maui.Controls.Handlers.Compatibility; using Microsoft.Maui.Controls.Internals; @@ -300,6 +301,25 @@ public override void DidMoveToParentViewController(UIViewController parent) base.DidMoveToParentViewController(parent); } + public override void ViewWillTransitionToSize(CGSize toSize, IUIViewControllerTransitionCoordinator coordinator) + { + base.ViewWillTransitionToSize(toSize, coordinator); + + // On iOS 26+ the TitleView container uses autoresizing masks with an explicitly set frame, + // so it does not automatically resize when the navigation bar changes width during rotation. + // Re-apply the frame for the pushed pages' TitleViews alongside the transition. + if (OperatingSystem.IsIOSVersionAtLeast(26) || OperatingSystem.IsMacCatalystVersionAtLeast(26)) + { + coordinator.AnimateAlongsideTransition(_ => + { + foreach (var tracker in _trackers.Values) + { + (tracker as ShellPageRendererTracker)?.UpdateTitleViewFrameForOrientation(); + } + }, null); + } + } + public override void ViewDidLoad() { if (_disposed) diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs index e331f75a96aa..131a01cb6c35 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs @@ -76,6 +76,17 @@ public override void ViewWillTransitionToSize(CGSize toSize, IUIViewControllerTr { base.ViewWillTransitionToSize(toSize, coordinator); _isRotating = true; + + // On iOS 26+ the TitleView container uses autoresizing masks with an explicitly set frame, + // so it does not automatically resize when the navigation bar changes width during rotation. + // Re-apply the frame alongside the transition so the TitleView fills the navigation bar. + if (OperatingSystem.IsIOSVersionAtLeast(26) || OperatingSystem.IsMacCatalystVersionAtLeast(26)) + { + coordinator.AnimateAlongsideTransition(_ => + { + (_tracker as ShellPageRendererTracker)?.UpdateTitleViewFrameForOrientation(); + }, null); + } } public override void ViewDidLoad() diff --git a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 5099477ef08b..075a1138e7ff 100644 --- a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -10,6 +10,7 @@ override Microsoft.Maui.Controls.GraphicsView.OnBindingContextChanged() -> void ~override Microsoft.Maui.Controls.Handlers.Items2.StructuredItemsViewController2.NumberOfSections(UIKit.UICollectionView collectionView) -> nint override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRenderer.ViewDidAppear(bool animated) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.DidMoveToParentViewController(UIKit.UIViewController parent) -> void +~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void ~override Microsoft.Maui.Controls.RadioButton.OnPropertyChanged(string propertyName = null) -> void override Microsoft.Maui.Controls.TitleBar.OnBindingContextChanged() -> void override Microsoft.Maui.Controls.Handlers.Items2.StructuredItemsViewController2.UpdateFlowDirection() -> void diff --git a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 5099477ef08b..075a1138e7ff 100644 --- a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -10,6 +10,7 @@ override Microsoft.Maui.Controls.GraphicsView.OnBindingContextChanged() -> void ~override Microsoft.Maui.Controls.Handlers.Items2.StructuredItemsViewController2.NumberOfSections(UIKit.UICollectionView collectionView) -> nint override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRenderer.ViewDidAppear(bool animated) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.DidMoveToParentViewController(UIKit.UIViewController parent) -> void +~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void ~override Microsoft.Maui.Controls.RadioButton.OnPropertyChanged(string propertyName = null) -> void override Microsoft.Maui.Controls.TitleBar.OnBindingContextChanged() -> void override Microsoft.Maui.Controls.Handlers.Items2.StructuredItemsViewController2.UpdateFlowDirection() -> void diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue35844.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue35844.cs new file mode 100644 index 000000000000..cd2b31a82af0 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue35844.cs @@ -0,0 +1,74 @@ +namespace Maui.Controls.Sample.Issues; + +[Issue(IssueTracker.Github, 35844, "Shell TitleView does not resize after rotation on iOS 26+", PlatformAffected.iOS)] +public class Issue35844Shell : Shell +{ + public Issue35844Shell() + { + Issue35844 contentPage = new Issue35844(); + + ShellContent shellContent = new ShellContent + { + Content = contentPage, + Route = "Issue35844" + }; + + Items.Add(shellContent); + } +} + +public class Issue35844 : ContentPage +{ + public Issue35844() + { + Shell.SetTitleView(this, new Grid + { + BackgroundColor = Colors.LightBlue, + AutomationId = "TitleViewGrid", + HorizontalOptions = LayoutOptions.Fill, + Children = + { + new Label + { + Text = "Shell TitleView", + AutomationId = "TitleLabel", + TextColor = Colors.White, + FontSize = 18, + FontAttributes = FontAttributes.Bold, + VerticalOptions = LayoutOptions.Center, + HorizontalOptions = LayoutOptions.Center + } + } + }); + + Content = new VerticalStackLayout + { + Padding = new Thickness(20), + Spacing = 10, + Children = + { + new Label + { + Text = "Issue 35844", + FontSize = 20, + FontAttributes = FontAttributes.Bold, + AutomationId = "HeaderLabel", + HorizontalOptions = LayoutOptions.Center + }, + new Label + { + Text = "Shell TitleView should fill the navigation bar width after rotation on iOS 26+.", + FontSize = 14, + AutomationId = "DescriptionLabel" + }, + new Label + { + Text = "Rotate device to test", + AutomationId = "StatusLabel", + FontSize = 16, + TextColor = Colors.Gray + } + } + }; + } +} diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35844.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35844.cs new file mode 100644 index 000000000000..5f64c9acae6e --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35844.cs @@ -0,0 +1,46 @@ +#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST // SetOrientationLandscape/Portrait is only supported on iOS and Android. + +using NUnit.Framework; +using UITest.Appium; +using UITest.Core; + +namespace Microsoft.Maui.TestCases.Tests.Issues +{ + public class Issue35844 : _IssuesUITest + { + public override string Issue => "Shell TitleView does not resize after rotation on iOS 26+"; + + public Issue35844(TestDevice device) : base(device) { } + + [Test] + [Category(UITestCategories.Shell)] + public void ShellTitleViewResizesOnRotation() + { + App.WaitForElement("TitleViewGrid"); + App.WaitForElement("StatusLabel"); + + // Capture portrait width + var portraitRect = App.WaitForElement("TitleViewGrid").GetRect(); + var portraitWidth = portraitRect.Width; + + App.SetOrientationLandscape(); + + // After rotation, TitleView width must change to fill the wider nav bar + var landscapeRect = App.WaitForElement("TitleViewGrid").GetRect(); + var landscapeWidth = landscapeRect.Width; + + Assert.That(landscapeWidth, Is.Not.EqualTo(portraitWidth).Within(100), + "Shell TitleView width should expand after rotating to landscape on iOS 26+"); + Assert.That(landscapeWidth, Is.GreaterThan(portraitWidth), + "Shell TitleView should be wider in landscape than portrait"); + + // Rotate back and verify TitleView returns to original width + App.SetOrientationPortrait(); + + var finalRect = App.WaitForElement("TitleViewGrid").GetRect(); + Assert.That(finalRect.Width, Is.EqualTo(portraitWidth).Within(5), + "Shell TitleView should return to original portrait width after rotating back"); + } + } +} +#endif From 940071271994b676ba02154402935e5dbcd8fcb7 Mon Sep 17 00:00:00 2001 From: SyedAbdulAzeem Date: Mon, 15 Jun 2026 15:27:42 +0530 Subject: [PATCH 2/4] add TraitCollectionDidChange, stabilize test --- .../Handlers/Shell/iOS/ShellSectionRenderer.cs | 16 ++++++++++++++++ .../Shell/iOS/ShellSectionRootRenderer.cs | 13 +++++++++++++ .../Tests/Issues/Issue35844.cs | 4 +++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs index 4064ea5192c1..971c6daf71a9 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs @@ -320,6 +320,22 @@ public override void ViewWillTransitionToSize(CGSize toSize, IUIViewControllerTr } } + public override void TraitCollectionDidChange(UITraitCollection previousTraitCollection) + { + base.TraitCollectionDidChange(previousTraitCollection); + if (previousTraitCollection?.VerticalSizeClass != TraitCollection.VerticalSizeClass || + previousTraitCollection?.HorizontalSizeClass != TraitCollection.HorizontalSizeClass) + { + if (OperatingSystem.IsIOSVersionAtLeast(26) || OperatingSystem.IsMacCatalystVersionAtLeast(26)) + { + foreach (var tracker in _trackers.Values) + { + (tracker as ShellPageRendererTracker)?.UpdateTitleViewFrameForOrientation(); + } + } + } + } + public override void ViewDidLoad() { if (_disposed) diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs index 131a01cb6c35..67beb8053288 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs @@ -89,6 +89,19 @@ public override void ViewWillTransitionToSize(CGSize toSize, IUIViewControllerTr } } + public override void TraitCollectionDidChange(UITraitCollection previousTraitCollection) + { + base.TraitCollectionDidChange(previousTraitCollection); + if (previousTraitCollection?.VerticalSizeClass != TraitCollection.VerticalSizeClass || + previousTraitCollection?.HorizontalSizeClass != TraitCollection.HorizontalSizeClass) + { + if (OperatingSystem.IsIOSVersionAtLeast(26) || OperatingSystem.IsMacCatalystVersionAtLeast(26)) + { + (_tracker as ShellPageRendererTracker)?.UpdateTitleViewFrameForOrientation(); + } + } + } + public override void ViewDidLoad() { if (_isDisposed) diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35844.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35844.cs index 5f64c9acae6e..6ee9b0d9f4ef 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35844.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35844.cs @@ -24,18 +24,20 @@ public void ShellTitleViewResizesOnRotation() var portraitWidth = portraitRect.Width; App.SetOrientationLandscape(); + App.WaitForElement("TitleViewGrid"); // re-wait to ensure layout has settled after rotation // After rotation, TitleView width must change to fill the wider nav bar var landscapeRect = App.WaitForElement("TitleViewGrid").GetRect(); var landscapeWidth = landscapeRect.Width; - Assert.That(landscapeWidth, Is.Not.EqualTo(portraitWidth).Within(100), + Assert.That(landscapeWidth, Is.Not.EqualTo(portraitWidth).Within(50), "Shell TitleView width should expand after rotating to landscape on iOS 26+"); Assert.That(landscapeWidth, Is.GreaterThan(portraitWidth), "Shell TitleView should be wider in landscape than portrait"); // Rotate back and verify TitleView returns to original width App.SetOrientationPortrait(); + App.WaitForElement("TitleViewGrid"); // re-wait to ensure layout has settled after rotation var finalRect = App.WaitForElement("TitleViewGrid").GetRect(); Assert.That(finalRect.Width, Is.EqualTo(portraitWidth).Within(5), From 8e342fbf7653b1074487cf2ff9079917e7160cc2 Mon Sep 17 00:00:00 2001 From: SyedAbdulAzeem Date: Tue, 16 Jun 2026 11:54:30 +0530 Subject: [PATCH 3/4] Add missing PublicAPI.Unshipped.txt entry --- src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt | 2 +- .../src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 075a1138e7ff..d4b0becc2016 100644 --- a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -4,12 +4,12 @@ override Microsoft.Maui.Controls.Shapes.Shape.OnPropertyChanged(string? property override Microsoft.Maui.Controls.Handlers.Items2.CarouselViewController2.Dispose(bool disposing) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellTableViewController.LoadView() -> void -*REMOVED*~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.TraitCollectionDidChange(UIKit.UITraitCollection previousTraitCollection) -> void override Microsoft.Maui.Controls.GraphicsView.OnBindingContextChanged() -> void ~override Microsoft.Maui.Controls.Handlers.Items2.CollectionViewHandler2.DisconnectHandler(UIKit.UIView platformView) -> void ~override Microsoft.Maui.Controls.Handlers.Items2.StructuredItemsViewController2.NumberOfSections(UIKit.UICollectionView collectionView) -> nint override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRenderer.ViewDidAppear(bool animated) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.DidMoveToParentViewController(UIKit.UIViewController parent) -> void +~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.TraitCollectionDidChange(UIKit.UITraitCollection previousTraitCollection) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void ~override Microsoft.Maui.Controls.RadioButton.OnPropertyChanged(string propertyName = null) -> void override Microsoft.Maui.Controls.TitleBar.OnBindingContextChanged() -> void diff --git a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 075a1138e7ff..d4b0becc2016 100644 --- a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -4,12 +4,12 @@ override Microsoft.Maui.Controls.Shapes.Shape.OnPropertyChanged(string? property override Microsoft.Maui.Controls.Handlers.Items2.CarouselViewController2.Dispose(bool disposing) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellTableViewController.LoadView() -> void -*REMOVED*~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.TraitCollectionDidChange(UIKit.UITraitCollection previousTraitCollection) -> void override Microsoft.Maui.Controls.GraphicsView.OnBindingContextChanged() -> void ~override Microsoft.Maui.Controls.Handlers.Items2.CollectionViewHandler2.DisconnectHandler(UIKit.UIView platformView) -> void ~override Microsoft.Maui.Controls.Handlers.Items2.StructuredItemsViewController2.NumberOfSections(UIKit.UICollectionView collectionView) -> nint override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRenderer.ViewDidAppear(bool animated) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.DidMoveToParentViewController(UIKit.UIViewController parent) -> void +~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.TraitCollectionDidChange(UIKit.UITraitCollection previousTraitCollection) -> void ~override Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void ~override Microsoft.Maui.Controls.RadioButton.OnPropertyChanged(string propertyName = null) -> void override Microsoft.Maui.Controls.TitleBar.OnBindingContextChanged() -> void From 6e765f53d6134ffd1ceb57f3a2093ccd316aa9e9 Mon Sep 17 00:00:00 2001 From: SyedAbdulAzeem Date: Tue, 16 Jun 2026 14:04:06 +0530 Subject: [PATCH 4/4] Sync Height with Frame in UpdateTitleViewFrameForOrientation --- .../Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs index 8827cd5a12f9..028432fa8183 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs @@ -389,6 +389,7 @@ internal void UpdateTitleViewFrameForOrientation() if (navigationBarFrame.HasValue) { titleViewContainer.Frame = new CGRect(0, 0, navigationBarFrame.Value.Width, navigationBarFrame.Value.Height); + titleViewContainer.Height = navigationBarFrame.Value.Height; titleViewContainer.LayoutIfNeeded(); } }