private void OnViewModelChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == nameof(ViewModel.SortDescriptor)) { if (ViewModel.SortDescriptor != null) { userPreferences.TrySave("Summary.SortDescriptor", ViewModel.SortDescriptor); } } else if (e.PropertyName == nameof(ViewModel.ViewType)) { userPreferences.TrySave("Summary.ViewTypeDescriptor", new SummaryViewTypeDescriptor(ViewModel.ViewType)); } }
private void ApplySortDescriptor(bool isSaveRequired) { ViewModel.Sort(SortDescriptor); if (isSaveRequired) { userPreferences.TrySave("Overview.SortDescriptor", SortDescriptor); } }