【发布时间】:2014-01-26 02:06:49
【问题描述】:
我模仿了 http://msdn.microsoft.com/en-us/magazine/dd419663.aspx 的 Josh Smith 的设计,想添加过滤功能。
在 AllCustomersViewModel 中,他创建了一个 CustomerViewModel 的 ObservableCollection,它通过属性 AllCustomers 链接到 xaml
public ObservableCollection<CustomerViewModel> AllCustomers { get; private set; }
在 xaml AllCustomers 中设置为 CollectionViewSource。
说到这里,我想就如何扩展此功能以包括过滤提出建议。我不担心 xaml 方面的事情,更多的是在 ViewModel 中实现它。
【问题讨论】: