Using a TextBox and CollectionViewSource to Filter a ListView in WPF

I was recently asked to provide our users with a field they could type in, in order to filter a ListView that could potentially hold a couple hundred names. Now, on the old WinForms platform, filtering used to be easier. A few settings on a ComboBox control, set the data source, and off you go. DropDownStyle = Simple AutoCompleteMode = SuggestAppend AutoCompleteSource = ListItems As with many things though, the slightly harder WPF way (not very hard, as you’ll see) provides for more flexibility (including grouping and sorting, but I’m only going to cover filtering). Just Teh Codez Here’s how »