开发者

Filterable collection mvvm

Does it any good implementation of Filterable Collection for C#?

What i开发者_如何学运维s required:

var data = GetEmployees();

_filtered = new FilterableCollection<Employee>(data);
_filtered.SetFilterExpression(empl => empl.DepartmentId == SelectedDepartment.Id);

...

set
{
  SelectedDepartment = value;
  _filtered.UpdateRepresentation();
}

Paging, CustomFilterBuilder and Virtualization would be a plus but not required at the moment.


I'm not sure why you need this... WPF already does supports this, via the ICollectionView interface.

ICollectionView view = CollectionViewSource.GetDefaultView(data);
view.Filter = o => ((Employee)o).DepartmentId == SelectedDepartment.Id;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜