#973 – Keyboard Shortcuts for a ListBox

You can use any of the following keyboard shortcuts when interacting with a ListBox at run-time (this assumes that the ListBox has keyboard focus):

  • Up/Down arrow keys – move to previous /next item
  • Page Up / Page Down – move to item on previous / next page (based on size of ListBox)
  • Home / End – move to first / last item in last
  • Enter single character – move to next item that begins with that character
  • Enter sequence of characters – move to next item that begins with that sequence
  • If the SelectionMode is Single or Extended
    • Moving to another item selects it (and unselects previous)
    • Spacebar – select the current item (if not already selected)
    • Ctrl + Spacebar – unselect the current item
  • If the SelectionMode is Multiple
    • Moving to another item does not select it
    • Spacebar toggles current item as selected/unselected
  • If the SelectionMode is Extended
    • Holding down the Shift key while moving to another item adds to selection

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

One Response to #973 – Keyboard Shortcuts for a ListBox

  1. Steffen Jensen says:

    I would like to have a ListBox with an ItemTemplate making items Label controls and so that I can set Content to _Departments or _Buildings or something. This should give the user the ability to press ALT+D or ALT+B to select this particular ListBoxItem. Is this possible?
    thx
    Steffen

Leave a comment