@@ -724,7 +724,6 @@ public override void OnApplyTemplate()
724
724
UpdatePaneTabFocusNavigation ( ) ;
725
725
UpdateBackAndCloseButtonsVisibility ( ) ;
726
726
UpdateSingleSelectionFollowsFocusTemplateSetting ( ) ;
727
- UpdateNavigationViewUseSystemVisual ( ) ;
728
727
UpdatePaneVisibility ( ) ;
729
728
UpdateVisualState ( ) ;
730
729
UpdatePaneTitleMargins ( ) ;
@@ -1266,11 +1265,6 @@ int init()
1266
1265
}
1267
1266
nvi . PropagateDepthToChildren ( childDepth ) ;
1268
1267
1269
- if ( ir != m_topNavRepeaterOverflowView )
1270
- {
1271
- nvibImpl . UseSystemFocusVisuals = ShouldShowFocusVisual ( ) ;
1272
- }
1273
-
1274
1268
// Register for item events
1275
1269
InputHelper . AddTappedHandler ( nvi , OnNavigationViewItemTapped ) ;
1276
1270
nvi . KeyDown += OnNavigationViewItemKeyDown ;
@@ -3372,45 +3366,6 @@ void UpdateLeftNavigationOnlyVisualState(bool useTransitions)
3372
3366
VisualStateManager . GoToState ( this , isToggleButtonVisible ? "TogglePaneButtonVisible" : "TogglePaneButtonCollapsed" , false /*useTransitions*/ ) ;
3373
3367
}
3374
3368
3375
- void UpdateNavigationViewUseSystemVisual ( )
3376
- {
3377
- if ( SharedHelpers . IsRS1OrHigher ( ) && ! ShouldPreserveNavigationViewRS4Behavior ( ) && m_appliedTemplate )
3378
- {
3379
- PropagateShowFocusVisualToAllNavigationViewItemsInRepeater ( m_leftNavRepeater , ShouldShowFocusVisual ( ) ) ;
3380
- PropagateShowFocusVisualToAllNavigationViewItemsInRepeater ( m_leftNavFooterMenuRepeater , ShouldShowFocusVisual ( ) ) ;
3381
- PropagateShowFocusVisualToAllNavigationViewItemsInRepeater ( m_topNavRepeater , ShouldShowFocusVisual ( ) ) ;
3382
- PropagateShowFocusVisualToAllNavigationViewItemsInRepeater ( m_topNavFooterMenuRepeater , ShouldShowFocusVisual ( ) ) ;
3383
- }
3384
- }
3385
-
3386
- bool ShouldShowFocusVisual ( )
3387
- {
3388
- return SelectionFollowsFocus == NavigationViewSelectionFollowsFocus . Disabled ;
3389
- }
3390
-
3391
- void PropagateShowFocusVisualToAllNavigationViewItemsInRepeater ( ItemsRepeater ir , bool showFocusVisual )
3392
- {
3393
- if ( ir != null )
3394
- {
3395
- if ( ir . ItemsSourceView is { } itemsSourceView )
3396
- {
3397
- var numberOfItems = itemsSourceView . Count ;
3398
- for ( int i = 0 ; i < numberOfItems ; i ++ )
3399
- {
3400
- if ( ir . TryGetElement ( i ) is { } nvib )
3401
- {
3402
- if ( nvib is NavigationViewItem nvi )
3403
- {
3404
- var nviImpl = nvi ;
3405
- nviImpl . UseSystemFocusVisuals = showFocusVisual ;
3406
- }
3407
- }
3408
-
3409
- }
3410
- }
3411
- }
3412
- }
3413
-
3414
3369
void InvalidateTopNavPrimaryLayout ( )
3415
3370
{
3416
3371
if ( m_appliedTemplate && IsTopNavigationView ( ) )
@@ -4007,7 +3962,6 @@ void PropertyChanged(DependencyPropertyChangedEventArgs args)
4007
3962
else if ( property == SelectionFollowsFocusProperty )
4008
3963
{
4009
3964
UpdateSingleSelectionFollowsFocusTemplateSetting ( ) ;
4010
- UpdateNavigationViewUseSystemVisual ( ) ;
4011
3965
}
4012
3966
else if ( property == IsPaneToggleButtonVisibleProperty )
4013
3967
{
0 commit comments