@@ -22,8 +22,7 @@ public NavigationViewItemButtonStyleItem SelectedNavigationViewItem
22
22
set
23
23
{
24
24
if ( SetProperty ( ref _SelectedNavigationViewItem , value ) &&
25
- ! _selectionChangedAutomatically &&
26
- _previousPageName != value . ItemType . ToString ( ) )
25
+ ! _selectionChangedAutomatically )
27
26
{
28
27
var parameter = new PropertiesPageNavigationParameter ( )
29
28
{
@@ -90,8 +89,6 @@ public NavigationViewItemButtonStyleItem SelectedNavigationViewItem
90
89
91
90
private bool _selectionChangedAutomatically { get ; set ; }
92
91
93
- private string _previousPageName { get ; set ; }
94
-
95
92
public IRelayCommand DoBackwardNavigationCommand { get ; }
96
93
public IAsyncRelayCommand SaveChangedPropertiesCommand { get ; }
97
94
public IRelayCommand CancelChangedPropertiesCommand { get ; }
@@ -127,12 +124,12 @@ private void ExecuteDoBackwardNavigationCommand()
127
124
var pageTag = ( ( Page ) _mainFrame . Content ) . Tag . ToString ( ) ;
128
125
129
126
_selectionChangedAutomatically = true ;
130
- _previousPageName = pageTag ;
131
127
132
128
// Move selection indicator
133
- SelectedNavigationViewItem =
129
+ _SelectedNavigationViewItem =
134
130
NavigationViewItems . First ( x => string . Equals ( x . ItemType . ToString ( ) , pageTag , StringComparison . CurrentCultureIgnoreCase ) )
135
131
?? NavigationViewItems . First ( ) ;
132
+ OnPropertyChanged ( nameof ( SelectedNavigationViewItem ) ) ;
136
133
}
137
134
138
135
private async Task ExecuteSaveChangedPropertiesCommand ( )
0 commit comments