private void AnalogousUC_WorkingAreaTabChanged(object sender, int e) { if (e == 1) { ReactionView.ScrollIntoView(ReactionView.SelectedItem); } }
private void ListView_Selected(object sender, SelectionChangedEventArgs e) { ReactionView.ScrollIntoView(ReactionView.SelectedItem); var mainVM = (App.Current.MainWindow as MainWindow).DataContext as MainVM; if (mainVM != null && mainVM.TanVM != null && ReactionView.SelectedItem != null) { mainVM.TanVM.SelectedReaction = mainVM.TanVM.Reactions.Where(r => r.Id == (ReactionView.SelectedItem as ReactionViewVM).ReactionId).FirstOrDefault(); } }