Incremental Search
- 2 minutes to read
DevExpress WPF list editors support the incremental search feature.
Incremental search allows end-users to quickly locate list items. Matching values are highlighted in real time as a user types search criteria. The following image demonstrates a ListBoxEdit with incremental search enabled. Items that match the search criteria are highlighted.
A user can modify criteria in a short amount of time. After that time has elapsed, additional input is treated as new criteria.
You can enable the incremental search for the following controls.
Note
Incremental search is case-insensitive.
The following keyboard shortcuts allow end-users to navigate search results.
Keyboard shortcut | Action |
---|---|
Ctrl + Down Arrow | Move focus to the next matching item. |
Ctrl + Up Arrow | Move focus to the previous matching item. |
Esc | End incremental search. |
ListBoxEdit Incremental Search
To enable the incremental search feature for ListBoxEdit, set the ListBoxEdit.IncrementalSearch property to true.
The following example demonstrates ListBoxEdit with the incremental search feature enabled.
<dxe:ListBoxEdit ItemsSource="{Binding Data}" DisplayMember="Name" IncrementalSearch="True" />
Drop-down Editors Incremental Search
Drop-down editors, such as ComboBoxEdit, LookUpEdit and FontEdit require additional incremental search configuration.
To enable the incremental search feature for a drop-down editor, do the following:
- Set the LookUpEditBase.IncrementalSearch property to true.
- Set the ButtonEdit.IsTextEditable property to false.
- Set the LookUpEditBase.AutoComplete property to true.
The following example demonstrates ComboBoxEdit with the incremental search feature enabled.
<dxe:ComboBoxEdit ItemsSource="{Binding Data}" DisplayMember="Name" IncrementalSearch="True"
IsTextEditable="False" AutoComplete="True" />
Note
Token Editors Specifics To enable the incremental search for Token Editors, additionally set the PopupBaseEdit.FocusPopupOnOpen property to true.
The following example demonstrates a token combo box editor with incremental search enabled.
<dxe:ComboBoxEdit ItemsSource="{Binding Data}" DisplayMember="Name" IncrementalSearch="True"
IsTextEditable="False" AutoComplete="True" FocusPopupOnOpen="True">
<dxe:ComboBoxEdit.StyleSettings>
<dxe:TokenComboBoxStyleSettings/>
</dxe:ComboBoxEdit.StyleSettings>
</dxe:ComboBoxEdit>