Example #1
0
 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));
     }
 }
Example #2
0
        private void ApplySortDescriptor(bool isSaveRequired)
        {
            ViewModel.Sort(SortDescriptor);

            if (isSaveRequired)
            {
                userPreferences.TrySave("Overview.SortDescriptor", SortDescriptor);
            }
        }