Back to Devexpress

TreeListView.NodeCollapsed Event

wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-e52f093a.md

latest5.6 KB
Original Source

TreeListView.NodeCollapsed Event

Occurs after a node has been collapsed.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public event TreeListNodeEventHandler NodeCollapsed
vb
Public Event NodeCollapsed As TreeListNodeEventHandler

Event Data

The NodeCollapsed event's data class is TreeListNodeEventArgs. The following properties provide information specific to this event:

PropertyDescription
HandledGets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
NodeGets the processed node.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
RowGets the processed row.
SourceGets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

The event data class exposes the following methods:

MethodDescription
InvokeEventHandler(Delegate, Object)When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation. Inherited from RoutedEventArgs.
OnSetSource(Object)When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. Inherited from RoutedEventArgs.

Remarks

To learn more, see Expanding and Collapsing Nodes.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NodeCollapsed event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-grid-sync-isnodeexpanded-with-view-model/CS/DevExpress.Example04/BindableExpandingBehavior.cs#L49

csharp
tree.NodeExpanded += GridNodeChanged;
    tree.NodeCollapsed += GridNodeChanged;
}

wpf-grid-sync-isnodeexpanded-with-view-model/VB/DevExpress.Example04/BindableExpandingBehavior.vb#L54

vb
AddHandler tree.NodeExpanded, AddressOf GridNodeChanged
    AddHandler tree.NodeCollapsed, AddressOf GridNodeChanged
End Sub

See Also

CollapseNode(Int32)

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace