TreeView.SelectionChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when there's a change to the items currently selected in the TreeView
.
// Register
event_token SelectionChanged(TypedEventHandler<TreeView, TreeViewSelectionChangedEventArgs const&> const& handler) const;
// Revoke with event_token
void SelectionChanged(event_token const* cookie) const;
// Revoke with event_revoker
TreeView::SelectionChanged_revoker SelectionChanged(auto_revoke_t, TypedEventHandler<TreeView, TreeViewSelectionChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<TreeView,TreeViewSelectionChangedEventArgs> SelectionChanged;
function onSelectionChanged(eventArgs) { /* Your code */ }
treeView.addEventListener("selectionchanged", onSelectionChanged);
treeView.removeEventListener("selectionchanged", onSelectionChanged);
- or -
treeView.onselectionchanged = onSelectionChanged;
Public Custom Event SelectionChanged As TypedEventHandler(Of TreeView, TreeViewSelectionChangedEventArgs)
Event Type
Remarks
Handle the TreeView.SelectionChanged
event to respond when the set of selected nodes in the TreeView
control is changed either by a user or programmatically. The TreeView
control raises this event in response to selection changing, which corresponds to changes in the TreeView.SelectedItem, TreeView.SelectedItems, and TreeView.SelectedNodes properties.