我有一个收藏
private ObservableCollection<ContentItemViewModel> _contentTree;
public ObservableCollection<ContentItemViewModel> ContentTree
{
get { return _contentTree; }
}
类 ContentItemViewModel 具有属性:
private string _published;
public string Published
{
get
{
return _published;
}
set
{
_published = value;
NotifyPropertyChanged("Published");
}
}
那是 - node.Published= Convert.ToDateTime(date.Value).ToString("dd MMM yyyy", new DateTimeFormatInfo());
我需要按日期对 ContentTree 集合进行排序吗?我怎样才能做到这一点?