开发者

How to type text into a combobox?

I am implementin开发者_如何学运维g 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


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/


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜