void OnStrategySelectedViewModelChanged(object sender, PropertyValueChangedEventArgs <object> e)
 {
     SelectedViewModel = e.NewValue;
     SelectedViewModelChangedCommand.If(x => x.CanExecute(e)).Do(x => x.Execute(e));
     if (e.OldValue != null)
     {
         ActualViewInjectionManager.RaiseNavigatedAwayEvent(e.OldValue);
     }
     if (e.NewValue != null)
     {
         ActualViewInjectionManager.RaiseNavigatedEvent(e.NewValue);
     }
 }
Esempio n. 2
0
 void OnSelectedViewModelChanged(DependencyPropertyChangedEventArgs e)
 {
     SelectedViewModel = e.NewValue;
     SelectedViewModelChangedCommand.If(x => x.CanExecute(e)).Do(x => x.Execute(e));
     if (e.OldValue != null)
     {
         ActualViewInjectionManager.RaiseNavigatedAwayEvent(e.OldValue);
     }
     if (e.NewValue != null)
     {
         ActualViewInjectionManager.RaiseNavigatedEvent(e.NewValue);
     }
     if (IsAttached)
     {
         Strategy.Select(e.NewValue, true);
     }
 }