@@ -1594,8 +1594,7 @@ private void OnOverflowContentKeyDown(object sender, KeyRoutedEventArgs e)
1594
1594
1595
1595
internal static void OnCommandExecutionStatic ( ICommandBarElement element )
1596
1596
{
1597
- CommandBar ? parentCmdBar ;
1598
- FindParentCommandBarForElement ( element , out parentCmdBar ) ;
1597
+ var parentCmdBar = FindParentCommandBarForElement ( element ) ;
1599
1598
1600
1599
if ( parentCmdBar is { } )
1601
1600
{
@@ -1605,8 +1604,7 @@ internal static void OnCommandExecutionStatic(ICommandBarElement element)
1605
1604
1606
1605
internal static void OnCommandBarElementVisibilityChanged ( ICommandBarElement element )
1607
1606
{
1608
- CommandBar ? parentCmdBar ;
1609
- FindParentCommandBarForElement ( element , out parentCmdBar ) ;
1607
+ var parentCmdBar = FindParentCommandBarForElement ( element ) ;
1610
1608
1611
1609
if ( parentCmdBar is { } )
1612
1610
{
@@ -1889,11 +1887,11 @@ protected override void UpdateTemplateSettings()
1889
1887
{
1890
1888
if ( element is AppBarButton elementAsAppBarButton )
1891
1889
{
1892
- elementAsAppBarButton . UpdateTemplateSettings ( maxAppBarKeyboardAcceleratorTextWidth ) ;
1890
+ AppBarButtonHelpers < AppBarButton > . UpdateTemplateSettings < AppBarButtonTemplateSettings > ( elementAsAppBarButton , maxAppBarKeyboardAcceleratorTextWidth ) ;
1893
1891
}
1894
1892
else if ( element is AppBarToggleButton elementAsAppBarToggleButton )
1895
1893
{
1896
- elementAsAppBarToggleButton . UpdateTemplateSettings ( maxAppBarKeyboardAcceleratorTextWidth ) ;
1894
+ AppBarButtonHelpers < AppBarToggleButton > . UpdateTemplateSettings < AppBarToggleButtonTemplateSettings > ( elementAsAppBarToggleButton , maxAppBarKeyboardAcceleratorTextWidth ) ;
1897
1895
}
1898
1896
}
1899
1897
}
@@ -2611,7 +2609,7 @@ private void FireDynamicOverflowItemsChangingEvent(bool isForceToRestore)
2611
2609
2612
2610
internal static bool IsCommandBarElementInOverflow ( ICommandBarElement element )
2613
2611
{
2614
- FindParentCommandBarForElement ( element , out var parentCmdBar ) ;
2612
+ var parentCmdBar = FindParentCommandBarForElement ( element ) ;
2615
2613
bool isInOverflow = false ;
2616
2614
2617
2615
if ( parentCmdBar is { } )
@@ -2646,7 +2644,7 @@ internal static int GetPositionInSetStatic(ICommandBarElement element)
2646
2644
{
2647
2645
int positionInSet = - 1 ;
2648
2646
2649
- FindParentCommandBarForElement ( element , out var parentCommandBar ) ;
2647
+ var parentCommandBar = FindParentCommandBarForElement ( element ) ;
2650
2648
2651
2649
if ( parentCommandBar is { } )
2652
2650
{
@@ -2746,7 +2744,7 @@ internal static int GetSizeOfSetStatic(ICommandBarElement element)
2746
2744
{
2747
2745
int sizeOfSet = - 1 ;
2748
2746
2749
- FindParentCommandBarForElement ( element , out var parentCommandBar ) ;
2747
+ var parentCommandBar = FindParentCommandBarForElement ( element ) ;
2750
2748
2751
2749
if ( parentCommandBar is { } )
2752
2750
{
0 commit comments