I am trying to build different options for sorting on listview. So for example, default is by name and I give user option to change sorting using another field like "rating".
If I sort observablecollection in the viewmodel and raise property changed like below. SfListView is not updated with new Items. What is the best way to achieve this?
Items = new ObservableCollection<Item>(SelectedSorting.id==0? filteredList.OrderBy(s=>s.name): filteredList.OrderByDescending(s => s.Rating));
RaisePropertyChanged("Items");