Text Search Navigation
RadPanelBar allows you to navigate through its items by typing on the keyboard while the control is focused. This will search and select the corresponding item.
To enable the feature, set the IsTextSearchEnabled property to True.
To change the search mode that is used to match the results, set the TextSearchMode property. This allows you to set one of the following modes:
- StartsWith: This is the default mode.
- Contains
- StartsWithCaseSensitive
- ContainsCaseSensitive
You can also utilize the IsTextSearchCaseSensitive property of RadPanelBar in order to determine if the search is case sensitive.
Example 1: Setting up text search navigation
<telerik:RadPanelBar IsTextSearchEnabled="True" TextSearchMode="Contains" />
Example 2: Setting TextPath
<telerik:RadPanelBar IsTextSearchEnabled="True" telerik:TextSearch.TextPath="MyProperty" />
MyProperty
points to a property defined in the view model of the panelbar items. If the typed text matches the value of this property, the corresponding item will get selected.
To increase the time interval for typing before the text is reset, set the TextSearch.AutoCompleteTimeout static property.
Example 3: Setting search text reset timeout
public MyUserControl()
{
Telerik.Windows.Controls.TextSearch.AutoCompleteTimeout = new TimeSpan(1500);
InitializeComponent();
}