microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
Proposal: support keyboard shortcuts to expand/collapse children in TreeView
Proposal: support keyboard shortcuts to expand/collapse children in TreeView
Summary
Add support to the TreeView control to expand/recursively expand/collaps the selected node when the +/*/- keys are pressed.
Rationale
The TreeView controls in WPF (and probably also WinForms/Win32) allow the following keyboard shortcuts when an item is selected in a TreeView:
- plus key: expand selected node
- asterisk key: recursively expand all child nodes
- minus key: collapse selected node
These shortcuts have been in use for a long time and supported across applications. It would be desirable that WinUI continues to support them. Especially the shortcut to recursively expand nodes is sometimes very useful because it is not available via the mouse or touch (as far as I know).
UX regressions from win32 seem like a very low priority for the team, so don't hold your breath 😅 ref: #8953
asterisk key: recursively expand all child nodes
Today I learned that one could press "*" in File Explorer and expand the whole subtree! 😲
Today I learned that one could press "*" in File Explorer and expand the whole subtree! 😲
It is documented in MSDN for Win32 Tree View : https://learn.microsoft.com/en-us/previous-versions/windows/desktop/dnacc/guidelines-for-keyboard-user-interface-design#windows-shortcut-keys