TreeView.SelectionChanged 事件

定义

当当前在 中选择的项发生更改时发生 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) 

事件类型

注解

处理 事件, TreeView.SelectionChanged 以在控件中的 TreeView 选定节点集由用户或以编程方式更改时做出响应。 控件 TreeView 引发此事件以响应选择更改,该更改对应于 TreeView.SelectedItemTreeView.SelectedItemsTreeView.SelectedNodes 属性中的更改。

适用于