0

I'm working with ComboBox in WPF. ComboBox IsEditable property setted to TrueIsEditable="True". ComboBox has several items. When I'm typing it is showing item in ComboBox text, but not showing DropDown list. XAML code:

 <ComboBox Name="uiComboBox" IsEditable="True">
        <ComboBoxItem>One1</ComboBoxItem>
        <ComboBoxItem>One2</ComboBoxItem>
        <ComboBoxItem>One3</ComboBoxItem>
        <ComboBoxItem>One4</ComboBoxItem>
        <ComboBoxItem>Two</ComboBoxItem>
        <ComboBoxItem>Three</ComboBoxItem>
    </ComboBox>

When I typing "o" showing first item that starts with "o", in this case it is "One1" enter image description here

When I type "o" it should show me DropDown list with items that starts with "o" in this case 4 items, you can see in picture in below.enter image description here

After researching I found:

 private void ComboBox_KeyUp(object sender, KeyEventArgs e)
    {
        uiComboBox.IsDropDownOpen = true;
    }

It is showing all not items that starts with letter i typed. Any ideas to do that or maybe another control to use for this case?

Jamaxack
  • 2,400
  • 2
  • 24
  • 42
  • 1
    take a look on this: http://stackoverflow.com/questions/2001842/dynamic-filter-of-wpf-combobox-based-on-text-input – Dilshod Jan 30 '15 at 04:01

1 Answers1

1

Have you heard the term called "Roll your own"? That's what you will need to do or I am sure some one out there wants the same thing and there should be tons of information about this on the web.

Take a look at these:

Filter ComboBox items based on TextBox text

Dynamic filter of WPF combobox based on text input

I hope that helps!

Community
  • 1
  • 1
Dilshod
  • 3,189
  • 3
  • 36
  • 67