[]
        
(Showing Draft Content)

Auto Complete Mode

MultiSelect supports AutoComplete feature which helps in automatic completion of input by suggesting or appending the values from the list. This feature can be implemented in MultiSelect using AutoCompleteMode property of C1MultiSelect class. The property accepts values from AutoCompleteMode enumeration which specifies the mode for automatic completion in the control through following values:

  • None: Disables the automatic completion

  • Append: Appends remainder of the probable value and highlights it

  • Suggest: Displays dropdown list populated with one or more suggested values

  • SuggestAppend: Appends the probable value and displays a dropdown list populated with suggested values

You can further customize the suggestions which appear on selecting Suggest or SuggestAppend modes by filtering items from the dropdown list based on one of the following filtering criteria:

  • Contains

  • StartWith

  • None

MultiSelect provides these filtering criteria through AutoSuggestMode. For more details, see Auto Suggest Mode topic.

The following GIF displays the how the AutoComplete feature works in MultiSelect.

Autocomplete mode in WPF MultiSelect

To illustrate how the AutoComplete property is used for automatic completion of input, use the following code:

<c1:C1MultiSelect x:Name="mselect" AutoCompleteMode="SuggestAppend" Height="100" Width="350"></c1:C1MultiSelect>
mselect.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

Select Multiple Items from AutoSuggest Popup

MultiSelect supports consecutive selection from the auto-suggest popup through the SelectMultiple member of AutoCompleteMode. When AutoCompleteMode is set to SelectMultiple, the popup remains open after an item is selected, allowing additional items to be selected during the same popup session.

Configure SelectMultiple

Set the AutoCompleteMode property to SelectMultiple.

The following example configures the mode in XAML:

<c1:C1MultiSelect Height="50"
                  x:Name="c1MultiSelectPro"
                  Width="300"
                  Margin="0 50"
                  Grid.Row="1"
                  AutoCompleteMode="SelectMultiple"
                  HighlightColor="#C3534B"
                  Background="#F8F9FA"
                  Foreground="Black"
                  VerticalAlignment="Center"
                  ItemsSource="{Binding Fruits}"
                  DisplayMemberPath="Name" />

The same mode can be assigned programmatically:

c1MultiSelectPro.AutoCompleteMode = AutoCompleteMode.SelectMultiple;

WPF C1MultiSelect - Selecting multiple items from the AutoSuggest popup using SelectMultiple mode.

Select Multiple Items

After an item is selected:

  • MultiSelect clears the input text.

  • The selected item is removed from the visible popup list.

  • The popup continues to display the remaining unselected results from the active filter.

Selected items remain selected when subsequent filtering removes them from the visible results. When the popup closes, MultiSelect displays the selected items through its existing multiple-selection display behavior.

 WPF C1MultiSelect -  Multiple items selected from the AutoSuggest popup using SelectMultiple mode.

Note: Selected items cannot be deselected from the auto-suggest popup. Remove a selected item through the cross icon displayed with the selected item or through the main dropdown popup.