Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent text autocomplete in WPF ComboBox?

I'm using this filtered WPF ComboBox control from Diederik Krols.

I have found that it works fine for almost all cases but that entering in the first letter of any given item in the collection causes the ComboBox to automatically set its text property to the string representing that item, and therefore kill all further filtering. I can't even backspace away from the result when this happens, as pressing the backspace key causes the cycle to happen again.

After much head-scratching, staring at the wall, and drooling like an idiot, I've finally worked out that this is actually expected behaviour if the ComboBox has been set to AutoCompleteMode.Append. I need to set it to AutoCompleteMode.None.

WPF ComboBoxes don't appear to have an AutoCompleteMode property.

Is there any way around this, to achieve AutoCompleteMode.None behaviour?

like image 957
Frosty840 Avatar asked Sep 05 '12 12:09

Frosty840


1 Answers

<ComboBox IsTextSearchEnabled="false"/>
like image 184
GazTheDestroyer Avatar answered Oct 12 '22 08:10

GazTheDestroyer