diff --git a/src/Uno.UI/UI/Xaml/Controls/CommandBar/AppBarElementContainer.Partial.cs b/src/Uno.UI/UI/Xaml/Controls/AppBar/AppBarElementContainer.Partial.cs similarity index 100% rename from src/Uno.UI/UI/Xaml/Controls/CommandBar/AppBarElementContainer.Partial.cs rename to src/Uno.UI/UI/Xaml/Controls/AppBar/AppBarElementContainer.Partial.cs diff --git a/src/Uno.UI/UI/Xaml/Controls/CommandBar/AppBarElementContainer.Properties.cs b/src/Uno.UI/UI/Xaml/Controls/AppBar/AppBarElementContainer.Properties.cs similarity index 100% rename from src/Uno.UI/UI/Xaml/Controls/CommandBar/AppBarElementContainer.Properties.cs rename to src/Uno.UI/UI/Xaml/Controls/AppBar/AppBarElementContainer.Properties.cs diff --git a/src/Uno.UI/UI/Xaml/Controls/CommandBar/CommandBar.Partial.cs b/src/Uno.UI/UI/Xaml/Controls/CommandBar/CommandBar.Partial.cs index b0191d0431d8..ee3b117dd04b 100644 --- a/src/Uno.UI/UI/Xaml/Controls/CommandBar/CommandBar.Partial.cs +++ b/src/Uno.UI/UI/Xaml/Controls/CommandBar/CommandBar.Partial.cs @@ -1594,8 +1594,7 @@ private void OnOverflowContentKeyDown(object sender, KeyRoutedEventArgs e) internal static void OnCommandExecutionStatic(ICommandBarElement element) { - CommandBar? parentCmdBar; - FindParentCommandBarForElement(element, out parentCmdBar); + var parentCmdBar = FindParentCommandBarForElement(element); if (parentCmdBar is { }) { @@ -1605,8 +1604,7 @@ internal static void OnCommandExecutionStatic(ICommandBarElement element) internal static void OnCommandBarElementVisibilityChanged(ICommandBarElement element) { - CommandBar? parentCmdBar; - FindParentCommandBarForElement(element, out parentCmdBar); + var parentCmdBar = FindParentCommandBarForElement(element); if (parentCmdBar is { }) { @@ -1889,11 +1887,11 @@ protected override void UpdateTemplateSettings() { if (element is AppBarButton elementAsAppBarButton) { - elementAsAppBarButton.UpdateTemplateSettings(maxAppBarKeyboardAcceleratorTextWidth); + AppBarButtonHelpers.UpdateTemplateSettings(elementAsAppBarButton, maxAppBarKeyboardAcceleratorTextWidth); } else if (element is AppBarToggleButton elementAsAppBarToggleButton) { - elementAsAppBarToggleButton.UpdateTemplateSettings(maxAppBarKeyboardAcceleratorTextWidth); + AppBarButtonHelpers.UpdateTemplateSettings(elementAsAppBarToggleButton, maxAppBarKeyboardAcceleratorTextWidth); } } } @@ -2611,7 +2609,7 @@ private void FireDynamicOverflowItemsChangingEvent(bool isForceToRestore) internal static bool IsCommandBarElementInOverflow(ICommandBarElement element) { - FindParentCommandBarForElement(element, out var parentCmdBar); + var parentCmdBar = FindParentCommandBarForElement(element); bool isInOverflow = false; if (parentCmdBar is { }) @@ -2646,7 +2644,7 @@ internal static int GetPositionInSetStatic(ICommandBarElement element) { int positionInSet = -1; - FindParentCommandBarForElement(element, out var parentCommandBar); + var parentCommandBar = FindParentCommandBarForElement(element); if (parentCommandBar is { }) { @@ -2746,7 +2744,7 @@ internal static int GetSizeOfSetStatic(ICommandBarElement element) { int sizeOfSet = -1; - FindParentCommandBarForElement(element, out var parentCommandBar); + var parentCommandBar = FindParentCommandBarForElement(element); if (parentCommandBar is { }) { diff --git a/src/Uno.UI/UI/Xaml/Controls/CommandBar/ICommandBarOverflowElement.cs b/src/Uno.UI/UI/Xaml/Controls/CommandBar/ICommandBarOverflowElement.cs index 19d85395ef14..953669a394e2 100644 --- a/src/Uno.UI/UI/Xaml/Controls/CommandBar/ICommandBarOverflowElement.cs +++ b/src/Uno.UI/UI/Xaml/Controls/CommandBar/ICommandBarOverflowElement.cs @@ -2,10 +2,9 @@ using System.Collections.Generic; using System.Text; -namespace Microsoft.UI.Xaml.Controlsů +namespace Microsoft.UI.Xaml.Controls; + +internal interface ICommandBarOverflowElement { - internal interface ICommandBarOverflowElement - { - bool UseOverflowStyle { get; set; } - } + bool UseOverflowStyle { get; set; } }