nicehacker
nicehacker

Reputation: 35

How to make combobox searchable by keywords

i want to do like this

Althrough i try searching,i can't find any.I'm using visual studio 2019. Here's my combobox.

<ComboBox 
     Name="combo"
     IsEditable="True"
     SelectedValuePath="Id" 
     DisplayMemberPath="Name"                                
     ItemsSource="{Binding Data.CodeList, Mode=OneWay, Source={StaticResource Proxy}}" 

     SelectedItem="{Binding Path=SelectedItem}"/>

Upvotes: 0

Views: 794

Answers (1)

Athanasios Kataras
Athanasios Kataras

Reputation: 26342

Have you tried with IsTextSearchEnabled property

Gets or sets a value that indicates whether TextSearch is enabled on the ItemsControl instance.

You can also check Combobox IsTextSearchEnabled = True validating entered text to check if it is present in Itemsource for checking against speciific values and rollback when they don't exist.

If you want to go before windows 10, then you'll have to use a custom control (effectivly create your own combobox.

Upvotes: 1

Related Questions