17
votes

I am implementing in WPF. With the normal WPF ComboBox you can only click on an item to select it from the menu that rolls down. I need a control where if the preferred item isn't in the ComboBox you can type this new, not existing, item into the ComboBox?

How do I do this and with what control?

Thanks

3
From that question - 1) set the combobox IsEditable="true". Just tried this out, and it does exactly what you're asking for.Merlyn Morgan-Graham

3 Answers

23
votes

As morgan said, you can use IsEditable="true" for the combo box or else there is another control available in WPF tool kit "AutoCompleteBox".

Here are couple of links which helps you in implementing "AutoCompleteBox"

http://iserialized.com/using-the-autocompletebox-in-the-wpf-toolkit/

http://www.c-sharpcorner.com/UploadFile/dpatra/537/

-2
votes

Just go to property of that combo box control and make the "DropDownStyle" as "DropDown".