I can't seem to be able to change the ItemsSource in LongListSelector. After doing some research, it appears that LongListSelector ignores any changes in ItemsSource. Am I correct?g If yes, is there a workaround?
This what I'm trying to do. I have an option to sort the City list either by country or cities. Something like this:
var groupByCountry = from City in App.ViewModelCity.Items
group city by city.GroupByCountry into c
orderby c.Key
select new Group<Currency>(c.Key, c);
var groupByCity = from City in App.ViewModelCity.Items
group city by city.GroupByCity into c
orderby c.Key
select new Group<City>(c.Key, c);
SO basically both are the same, just the grouping is different. My idea was to simple change the ItemsSource to either groupByCountry or groupByCity, depending on the user choice. Unfortunately, changing the ItemsSource has no effect. It simply won't update. Only when the app is restarted (with the preferred source stored) the LongListSelector is updated.
So is there a way to force LongListSelector to update the ItemsSource? If not, what would be a good workaround?