Может кто-нибудь сказать мне, что я здесь делаю неправильно - просто начинаю изучать WPF - код сортируется для начальной привязки, но после этого не работает?
private void SortSeriesList(string sortDirection) {
ListBoxSeries.Items.SortDescriptions.Clear();
switch (sortDirection) {
case "asc":
ListBoxSeries.Items.SortDescriptions.Add(new System.ComponentModel.SortDescription("SeriesName", System.ComponentModel.ListSortDirection.Ascending));
break;
case "desc":
ListBoxSeries.Items.SortDescriptions.Add(new System.ComponentModel.SortDescription("SeriesName", System.ComponentModel.ListSortDirection.Descending));
break;
}
}