Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF IsEditable in ComboBox - how to remove autocomplete

Tags:

combobox

wpf

I have a ComboBox and I would like to allow typing and to display in the TextBox only what was typed. so I used IsEditable="True" The problem is that the autocompelete kicks in and completes the text to one of the items.

for example:

<ComboBox IsEditable="True">
     <ComboBoxItem>ABC</ComboBoxItem>
     <ComboBoxItem>PPP</ComboBoxItem>
     <ComboBoxItem>QQQ</ComboBoxItem>
     <ComboBoxItem>NNN</ComboBoxItem>
</ComboBox>

When I type 'A' I get 'ABC' in the TextBox where the 'BC' is highlighted (and I would like to get only 'A')

like image 569
user1052768 Avatar asked Nov 17 '11 22:11

user1052768


2 Answers

<ComboBox IsTextSearchEnabled="false" ... />
like image 168
Tod Avatar answered Nov 06 '22 17:11

Tod


c1ComboBox1.AutoComplete = false;

or

<c1:C1ComboBox HorizontalAlignment="Left" Width="249" AutoComplete="False">
like image 2
Arne Nouwynck Avatar answered Nov 06 '22 16:11

Arne Nouwynck