18

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

Adrian Toman
  • 11,316
  • 5
  • 48
  • 62
Ruben
  • 1,033
  • 3
  • 12
  • 22
  • possible duplicate of [Editable ComboBox with binding to value not in list](http://stackoverflow.com/questions/3743269/editable-combobox-with-binding-to-value-not-in-list) – Merlyn Morgan-Graham Jul 12 '11 at 08:41
  • 7
    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 Jul 12 '11 at 08:42

3 Answers3

23

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/

Bathineni
  • 3,436
  • 18
  • 25
0

I got the same... http://msdn.microsoft.com/en-us/library/ms753382%28v=vs.85%29.aspx

RussWill
  • 201
  • 3
  • 3
-2

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

Adrian Toman
  • 11,316
  • 5
  • 48
  • 62
palaniappan
  • 173
  • 3