From 5e9cf9f05a46fac7a2865907f94e857e6d5681d7 Mon Sep 17 00:00:00 2001 From: Andres Pineda Date: Wed, 20 Jan 2021 12:10:04 -0500 Subject: [PATCH] fix(iOS): CommandBar back button title --- src/Uno.UI/Controls/CommandBarHelper.iOS.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI/Controls/CommandBarHelper.iOS.cs b/src/Uno.UI/Controls/CommandBarHelper.iOS.cs index 79c06236a439..97c588027128 100644 --- a/src/Uno.UI/Controls/CommandBarHelper.iOS.cs +++ b/src/Uno.UI/Controls/CommandBarHelper.iOS.cs @@ -33,7 +33,11 @@ public static void PageCreated(UIViewController pageController) // For example the Uno.UI.Toolkit.CommandBarExtensions.BackButtonTitle attached property is often set globally to "" through // a default CommandBar style in order to remove the back button text throughout an entire application. // In order to leverage this information, we create a new CommandBar instance that only exists to "render" the NavigationItem. - topCommandBar = new CommandBar(); + // Since Uno 3.0 objects which are not part of the Visualtree does not get the Global Styles applied. Hence the fact we are manually applying it here. + topCommandBar = new CommandBar + { + Style = Application.Current.Resources[typeof(CommandBar)] as Style + }; } // Hook CommandBar to NavigationItem