user1052768
user1052768

Reputation: 61

WPF IsEditable in ComboBox - how to remove autocomplete

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')

Upvotes: 6

Views: 3297

Answers (2)

Tod
Tod

Reputation: 8252

<ComboBox IsTextSearchEnabled="false" ... />

Upvotes: 11

Arne Nouwynck
Arne Nouwynck

Reputation: 515

c1ComboBox1.AutoComplete = false;

or

<c1:C1ComboBox HorizontalAlignment="Left" Width="249" AutoComplete="False">

Upvotes: 2

Related Questions