ComboBox IsEditable Behavior question WPF
<ComboBox IsEditable="True" SelectedItem="{Binding}">
<ComboBoxItem>Angus/ComboBoxItem>
<ComboBoxItem>Angie/ComboBoxItem>
<ComboBoxItem>Jane</ComboBoxItem>
<ComboBoxItem>Steve</ComboBoxItem>
</ComboBox>
I would like to allow the user to find their select开发者_开发知识库ion by typing in a name, so I have set IsEditable equal to true.
Now my question regarding behavior is this: When I start typing Ang...I would expect to see BOTH Angus and Angie in the dropdown....however, I only see Angie first and I dont see Angus until I enter Angu ... . Can we replicate this behavior like in google search autocomplete box.?
Thanks!
IMO you can't do it with the regular ComboBox, but the good news are:
There's an excellent autoCompleteBox in the WPF toolkit. this is an example how to use it: http://www.c-sharpcorner.com/UploadFile/dpatra/537/
精彩评论