@@ -22,8 +22,7 @@ public NavigationViewItemButtonStyleItem SelectedNavigationViewItem
2222 set
2323 {
2424 if ( SetProperty ( ref _SelectedNavigationViewItem , value ) &&
25- ! _selectionChangedAutomatically &&
26- _previousPageName != value . ItemType . ToString ( ) )
25+ ! _selectionChangedAutomatically )
2726 {
2827 var parameter = new PropertiesPageNavigationParameter ( )
2928 {
@@ -90,8 +89,6 @@ public NavigationViewItemButtonStyleItem SelectedNavigationViewItem
9089
9190 private bool _selectionChangedAutomatically { get ; set ; }
9291
93- private string _previousPageName { get ; set ; }
94-
9592 public IRelayCommand DoBackwardNavigationCommand { get ; }
9693 public IAsyncRelayCommand SaveChangedPropertiesCommand { get ; }
9794 public IRelayCommand CancelChangedPropertiesCommand { get ; }
@@ -127,12 +124,12 @@ private void ExecuteDoBackwardNavigationCommand()
127124 var pageTag = ( ( Page ) _mainFrame . Content ) . Tag . ToString ( ) ;
128125
129126 _selectionChangedAutomatically = true ;
130- _previousPageName = pageTag ;
131127
132128 // Move selection indicator
133- SelectedNavigationViewItem =
129+ _SelectedNavigationViewItem =
134130 NavigationViewItems . First ( x => string . Equals ( x . ItemType . ToString ( ) , pageTag , StringComparison . CurrentCultureIgnoreCase ) )
135131 ?? NavigationViewItems . First ( ) ;
132+ OnPropertyChanged ( nameof ( SelectedNavigationViewItem ) ) ;
136133 }
137134
138135 private async Task ExecuteSaveChangedPropertiesCommand ( )
0 commit comments