Задайте вопросЗадайте вопрос
 

ОтвеченоSorting an ObservableCollection<T>

  • 8 января 2007 г. 22:11dmetz Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     
    I was recently using a List<T> to keep track of my data, but we had to move to an ObservableCollection<T> because it will eventually be used in binding to a UI.  I was using the List<T>.Sort(IComparer<T>) to sort the list, but it appears that ObservableCollection<T> does not implement this.  Is there a way to sort it or do I have to do that manually? 

    It seems odd to have to redo this work that clearly is already implemented in .Net but I can't seem to find a way to do it. I figured it was worth asking about.  Thanks for the help.

Ответы

Все ответы