I need to sort ObservableCollection without assigning new one to source. Right now I have this:
private void SortingObservableCollection(ObservableCollection<MyObject> toSort)
{
Items = new ObservableCollection<MyObject>(toSort.OrderBy(x => x.Top).ThenBy(x => x.Left));
}
It almost works perfectly, but I need to do it without assignign new one.
Desired effect is exactly what I could do on a list:
toSort = toSort.OrderBy(x => x.Top).ThenBy(x => x.Left).ToList();