TreeView.Collapsed 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 a node in the tree is collapsed.
Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeView.Collapsed (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
// 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)