Share via


TreeViewNode Class

Definition

Represents a node in a TreeView control.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.UI.Xaml.Data.Bindable]
class TreeViewNode : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.UI.Xaml.Data.Bindable]
public class TreeViewNode : DependencyObject
Public Class TreeViewNode
Inherits DependencyObject
Inheritance
Object IInspectable DependencyObject TreeViewNode
Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)

Constructors

TreeViewNode()

Initializes a new instance of the TreeViewNode class.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.-ctor (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Properties

Children

Gets the collection of nodes that are children of the current node.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.Children (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Content

Gets or sets the data content for the current node.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.Content (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

ContentProperty

Identifies the Content dependency property.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.ContentProperty (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Depth

Gets a value that indicates how far the current node is from the root node of the tree.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.Depth (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

DepthProperty

Identifies the Depth dependency property.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.DepthProperty (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)
HasChildren

Gets a value that indicates whether the current node has child items.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.HasChildren (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

HasChildrenProperty

Identifies the HasChildren dependency property.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.HasChildrenProperty (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

HasUnrealizedChildren

Gets or sets a value that indicates whether the current node has child items that haven't been shown.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.HasUnrealizedChildren (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

IsExpanded

Gets or sets a value that indicates whether the cuurent tree view node is expanded.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.IsExpanded (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

IsExpandedProperty

Identifies the IsExpanded dependency property.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.IsExpandedProperty (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Parent

Gets or sets the node that is the parent of the current node.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewNode.Parent (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Methods

ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)
GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

Applies to