Home Forums WPF controls Xceed Toolkit Plus for WPF WatermarkComboBox auto filtering / searching

Mots-clés : 

2 sujets de 1 à 2 (sur un total de 2)
  • Auteur
  • scottlafoy
    Post count: 1
    #45002 |

    I am using the WatermarkComboBox and when I have the item source hooked up so I can type in the combo box and it will filter the list as I type.

    The problem I am having is it seems to be doing the filtering on the start of the string and I would like to do it on if the string contains what I’m typing.

    For example:
    With a list of:

    When I start typing « Ke » it does not match to anything, and I would like it to match « DOMAIN\Kevin »

    My usage:

                            <xctk:WatermarkComboBox Watermark="DOMAIN\USERNAME" IsEditable="True"
                            VerticalAlignment="Center" HorizontalAlignment="Center" Width="150"
                            Text="{Binding UserName, UpdateSourceTrigger=PropertyChanged}"
                            SelectedItem="{Binding UserName}"
                            ItemsSource="{Binding UserList }"/>

    Thank you for any help on this matter.

    Fawzi [Xceed]
    Post count: 722


    The WatermarkComboBox derives from the ComboBox and adds a watermark. So the filtering « Starts With » is the same as the one in the standard comboBox.

    If you want to use the WatermarkComboBox and use a « Contains » filter instead of a « Starts With » filter, you will have to derive from ComboBox (or WatermarkComboBox) and add the necessary to filter the way you want. Here are people trying to do so :

    Please note that the toolkit also offers a TokenizedTextBox with filtering as you type. You can test it in the sample « Input Fields/Text/Tokenized TextBox » of the LiveExplorer of the Toolkit available here : http://forums.xceed.com/xceed-toolkit-plus-for-wpf/.

2 sujets de 1 à 2 (sur un total de 2)
  • Vous devez être connecté pour répondre à ce sujet.