TreeView.Collapsed 事件

定义

当树中的节点折叠时发生。

适用于 UWP 的等效 WinUI 2 API:Windows 应用 SDK中用于 WinUI 的 Microsoft.UI.Xaml.Controls.TreeView.Collapsed (,请参阅 ) Windows 应用 SDK命名空间

// Register
event_token Collapsed(TypedEventHandler<TreeView, TreeViewCollapsedEventArgs const&> const& handler) const;

// Revoke with event_token
void Collapsed(event_token const* cookie) const;

// Revoke with event_revoker
TreeView::Collapsed_revoker Collapsed(auto_revoke_t, TypedEventHandler<TreeView, TreeViewCollapsedEventArgs const&> const& handler) const;
public event TypedEventHandler<TreeView,TreeViewCollapsedEventArgs> Collapsed;
function onCollapsed(eventArgs) { /* Your code */ }
treeView.addEventListener("collapsed", onCollapsed);
treeView.removeEventListener("collapsed", onCollapsed);
- or -
treeView.oncollapsed = onCollapsed;
Public Custom Event Collapsed As TypedEventHandler(Of TreeView, TreeViewCollapsedEventArgs) 

事件类型

适用于