-1

I am trying to implement a searchbar which should search for the collectionviewsource as i type. it should give a dropdown like google with multiple columns.What will be better approach to achieve this . I am using MVVM pattern

Sam King
  • 75
  • 1
  • 12
  • There are too many ways to approach this problem. The answers would just turn into a straw-poll for which one people liked. The best thing is to do some research on the topic yourself, find two or three, _analyze_ them, determine if they work for you or not, and _try them out_. Come to us when you have a specific question about something you have attempted to do. – gunr2171 Oct 03 '17 at 18:44

1 Answers1

1

The answer would be little tricky.

First of all, you need a control which allows you to display a list whenever someome starts typing. To implement this, either you create a control yourself or use some from the links :

AutoComplete TextBox in WPF https://www.codeproject.com/Articles/293954/AutoSuggest-and-AutoComplete-control-in-WPF

Once you correctly add that control, you can follow this article to do the actual Filter of ICollectionView

http://www.abhisheksur.com/2010/08/woring-with-icollectionviewsource-in.html

You just need to pass the data to the Filter through MVVM to filter out the list.

abhishek
  • 2,975
  • 23
  • 38