【发布时间】:2010-06-12 17:11:23
【问题描述】:
我的 wpf 应用程序中有一个 ListView 和 ObservableCollection。 我想将 linq 表达式绑定到 ListView:
lv_Results.DataContext = store.Where(x => x.PR > 5).ToList();
tempStore = new M1Store()
{
SiteName = siteName,
Date = date,
url = IndexedPage,
TCY = YandexTCY.GetYandexTCY(IndexedPage),
PR = Pagerank.GetPR(IndexedPage)
};
store.Add(tempStore);
但是当我添加新元素来存储集合时,lv_Results 不会更新。 如何更新 ListView?
【问题讨论】:
标签: c# wpf linq data-binding