How I can make an Autocomplete Text Field in WPF? How I can include multiple value in text field. Actually I'm trying to make an search bar in which Products are fetched from database and include in text field then.When i type a keyword it should be display an suggestion.
Asked
Active
Viewed 132 times
-1
-
2Possible duplicate of [AutoComplete TextBox in WPF](http://stackoverflow.com/questions/950770/autocomplete-textbox-in-wpf) – Sinatr Feb 06 '17 at 11:22
-
@Sinatr It is working in combo Box but the problem is how i can do within Text field? – Shahbaz Feb 06 '17 at 11:25
-
ComboBox = TextBox (edit) + Popup (suggestion list). What is Text Field? – Sinatr Feb 06 '17 at 11:26
1 Answers
0
- Re-template ComboBox to make it looks like TextBox.
- Extend ComboBoxItem so that we can hightlight the already entered part in the dropdown list.
- Get reference to the TextBox part of the ComboBox, and hook up TextBox.TextChanged event.
- In the TextBox.TextChanged event handler, we filter the underlying datasource and create new list source with our customized ComboBox Items.
Hope this will be helpful.
Thank you

Oscar Itaba
- 24
- 2