Back to Devexpress

TreeListView.NodeExpanded Event

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

latest5.7 KB
Original Source

TreeListView.NodeExpanded Event

Occurs after a node has been expanded.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public event TreeListNodeEventHandler NodeExpanded
vb
Public Event NodeExpanded As TreeListNodeEventHandler

Event Data

The NodeExpanded 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

Refer to the following help topic for more information: Expand and Collapse Nodes.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NodeExpanded 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#L48

csharp
var tree = (this.AssociatedObject.View as TreeListView);
tree.NodeExpanded += GridNodeChanged;
tree.NodeCollapsed += GridNodeChanged;

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

vb
Dim tree = (TryCast(Me.AssociatedObject.View, TreeListView))
AddHandler tree.NodeExpanded, AddressOf GridNodeChanged
AddHandler tree.NodeCollapsed, AddressOf GridNodeChanged

See Also

ExpandNode(Int32)

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace