views:

91

answers:

2

I am eager to find some solid (free, Open Source, or tutorial/example) code to make a WPF Combobox do autocomlete/autofilter as the user types. But everything I've tried so far has had some sort of problem...

Other things I've considered:

  • I know that Windows Forms' Combobox control has AutoCompleteMode and I could embed it in WPF, but I can't imagine it would play very well with my WPF data bindings.

  • Perhaps it is too complex and I need to simplify, maybe by building one-dimensional (single-property) ObservableCollections for the ComboBoxen... However, the challenge of applying multiple filters (one set by another control's value, and one from what the user is typing) to multiple controls using different views of the same DataSet would require a ridiculous amount of processing power to destroy and rebuild the list every time the user types a character!

So... I'm at wit's end. Any suggestions?

+1  A: 

Try this one: http://blogs.windowsclient.net/dragonz/archive/2010/02/23/autocomplete-textbox-control-for-wpf.aspx

Yogesh
Trying it out now... So far, I'm impressed with the author's attention to detail.
ewall
I didn't end up using this on the current project, but I will keep in on hand for future ones, as it is pretty solid. Thanks!
ewall
A: 

If your Combobox has some data source attached to it , just make

1-IsTextSearchEnabled = true.
2-IsEditable = true.

you are good to go

saurabh
I would've liked to be able to search over multiple fields (e.g. "value" and "description"), be case-insensitive, etc.--but it is a PITA. Falling back on this, because it does work as expected with templates et al.
ewall