I have a ListBox
which have about 100 items. Now I want to to filter this ListBox
based on what user types in TextBox
. I want to search real time, so I handle TextBox_OnTextChanged
event.
My first solution was to set ListBox
's ItemsSource
whenever text changed. This is really slow.
Many ones suggest using CollectionViewSource
, but this doesnot make it faster.
How to filter ListBox
real time and fast ?
Check the filter methode of databinded source
Silverlight ListBox with ObservableCollection<T> and dynamic filter
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.