Back to Devexpress

TreeListNodeAutomationEventArgs.Node Property

wpf-devexpress-dot-xpf-dot-grid-dot-treelist-dot-treelistnodeautomationeventargs.md

latest2.1 KB
Original Source

TreeListNodeAutomationEventArgs.Node Property

Gets the target tree node. This is a dependency property.

Namespace : DevExpress.Xpf.Grid.TreeList

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public TreeListNode Node { get; protected set; }
vb
Public Property Node As TreeListNode

Property Value

TypeDescription
TreeListNode

The target tree node.

|

Remarks

The following code example handles the AutomationRequested event and changes values announced by a screen reader when the target node is focused:

xaml
<dxg:TreeListControl ItemsSource="{Binding Categories}">
    <dxg:TreeListControl.View>
        <dxg:TreeListView
        dxg:GridAutomationHelper.AutomationRequested="OnAutomationRequested"/>
    </dxg:TreeListControl.View>
</dxg:TreeListControl>
csharp
using DevExpress.Xpf.Grid.TreeList;
using DevExpress.Xpf.Grid.Automation;

void OnAutomationRequested(object sender, AutomationEventArgs e) {
    if (e is TreeListNodeAutomationEventArgs args) {
        // Example: use a property from the bound data object
        if (args.Row is Category item && !string.IsNullOrEmpty(item.Title)) {
            e.AutomationValue = $"Category {item.Title}";
        }
    }
}

See Also

TreeListNodeAutomationEventArgs Class

TreeListNodeAutomationEventArgs Members

DevExpress.Xpf.Grid.TreeList Namespace