Does Treeview use command bindings for expand/collapse?
问题 The WPF Treeview responds to + and - keystrokes to expand and collapse nodes in the tree. Great! Is there an existing command I can bind my toolbar buttons or menu items to to perform the same actions in the treeview? I don't see anything related to expand/collapse in the stock command constants. 回答1: The TreeView handles the expansion of a TreeViewItem with the mouse by binding ToggleButton.IsChecked to TreeViewItem.IsExpanded in the ControlTemplate and handles expansion with the keyboard in