title | description | type | page_title | slug | position | tags | ticketid | res_type |
---|---|---|---|---|---|---|---|---|
How to Scroll Multiple Items with Page Up and Down |
An article explaining how to enable the scrolling of an arbitrary number of items. |
how-to |
Allow Scrolling of an Arbitrary Number of Items with Page Up and Page Down |
kb-autocompletebox-scroll-with-page-up-down |
0 |
autocompletebox, scroll, multiple, number, items, page, up, down |
1479153 |
kb |
Product Version | 2020.3.817 |
Product | RadAutoCompleteBox for WPF |
How to enable the scrolling of multiple items using the Page Up and Page Down keys.
As of version 2020.3.817 the RadAutoCompleteBox exposes a protected HighlightedIndex property which can be used to set the highlighted item. This property can be used in the HandleKeyDown method of the control to enable [custom keyboard navigation]({%slug radautocompletebox-features-keyboard-support%}) with the Page Up and Page Down keys.
{{region cs-kb-autocompletebox-scroll-with-page-up-down-0}} public class CustomAutoCompleteBox : RadAutoCompleteBox { protected override bool HandleKeyDown(Key systemKey) { if (systemKey == Key.PageDown) { this.HighlightedIndex += 10; return true; }
if (systemKey == Key.PageUp)
{
this.HighlightedIndex -= 10;
return true;
}
return base.HandleKeyDown(systemKey);
}
}
{{endregion}}
- [Keyboard Support]({%slug radautocompletebox-features-keyboard-support%})