This question is locked. New answers and comments are not allowed.
Hi,
I have a control inhertited from RadComboBox control, QuickLaunch, with the following XAML definition:
<Components:QuickLaunch x:Name="QuickSearchBar" DropDownWidth="Auto" MaxDropDownHeight="700" Width="200" EmptyText="Quick Launch (Ctrl + Q)" IsFilteringEnabled="True" CanAutocompleteSelectItems="False" IsTextSearchEnabled="True"
TextSearchMode="Contains" telerik:TextSearch.TextPath="Label" SelectedValuePath="Label" OpenDropDownOnFocus="True" StaysOpenOnEdit="True" IsEditable="True" Controls1:RadToolBar.OverflowMode="Never" MaxWidth="300"
>
This control has code behind to support different categories and filtering.
I would like to implement Key.Home and Key.End behavior, so that Home key will highlight the first element of the drop down, and End key the last element.
I created an override OnKeyDown method, where I tried to set SelectedIndex, SelectedItem, Items.View.MoveCurrentToFirst() (where Items is CollectionViewSource), but none of these solutions actually select the item in the combo box.
I have been able to trigger the OnSelectionChanged event, but what I want is to just highlight the item, and set focus to it, just like the current functionality of the PageUp/PageDown event. Please advise.
Irena
I have a control inhertited from RadComboBox control, QuickLaunch, with the following XAML definition:
<Components:QuickLaunch x:Name="QuickSearchBar" DropDownWidth="Auto" MaxDropDownHeight="700" Width="200" EmptyText="Quick Launch (Ctrl + Q)" IsFilteringEnabled="True" CanAutocompleteSelectItems="False" IsTextSearchEnabled="True"
TextSearchMode="Contains" telerik:TextSearch.TextPath="Label" SelectedValuePath="Label" OpenDropDownOnFocus="True" StaysOpenOnEdit="True" IsEditable="True" Controls1:RadToolBar.OverflowMode="Never" MaxWidth="300"
>
This control has code behind to support different categories and filtering.
I would like to implement Key.Home and Key.End behavior, so that Home key will highlight the first element of the drop down, and End key the last element.
I created an override OnKeyDown method, where I tried to set SelectedIndex, SelectedItem, Items.View.MoveCurrentToFirst() (where Items is CollectionViewSource), but none of these solutions actually select the item in the combo box.
I have been able to trigger the OnSelectionChanged event, but what I want is to just highlight the item, and set focus to it, just like the current functionality of the PageUp/PageDown event. Please advise.
Irena