【发布时间】:2018-06-01 09:56:28
【问题描述】:
我有一个绑定到ListBoxEdit 的ObservableCollection(Of PdfMarkupAnnotationDataWrapper)。此外,我还有一个textbox,它应该可以用作过滤器。
现在,当用户在 textbox 中键入内容时,我的 Viewmodel 中的 ObservableCollection 应该被 textbox 的输入过滤。
这是我的收藏
Private Property _annotationList As ObservableCollection(Of PdfMarkupAnnotationDataWrapper)
Public Property AnnotationList As ObservableCollection(Of
PdfMarkupAnnotationDataWrapper)
Get
Return _annotationList
End Get
Set(value As ObservableCollection(Of PdfMarkupAnnotationDataWrapper))
_annotationList = value
OnPropertyChanged()
End Set
End Property
有没有办法完成这个任务?
我正在考虑复制集合,但必须有更好的解决方案。
【问题讨论】:
标签: wpf vb.net mvvm filter observable