Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to type text into a combobox?

Tags:

combobox

wpf

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

like image 547
Ruben Avatar asked Jul 12 '11 08:07

Ruben


People also ask

How do I add items to a combo box?

To add items to a ComboBox, select the ComboBox control and go to the properties window for the properties of this control. Click the ellipses (...) button next to the Items property. This opens the String Collection Editor dialog box, where you can enter the values one at a line.


1 Answers

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/

like image 143
Bathineni Avatar answered Oct 06 '22 04:10

Bathineni