TreeViewNode Class

Definition

Represents a node in a TreeView control.

/// [Windows.Foundation.Metadata.Composable(Windows.UI.Xaml.Controls.ITreeViewNodeFactory, Windows.Foundation.Metadata.CompositionType.Public, 393216, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.UI.Xaml.Controls.ITreeViewNodeStatics, 393216, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
/// [Windows.UI.Xaml.Data.Bindable]
class TreeViewNode : DependencyObject
[Windows.Foundation.Metadata.Composable(typeof(Windows.UI.Xaml.Controls.ITreeViewNodeFactory), Windows.Foundation.Metadata.CompositionType.Public, 393216, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.UI.Xaml.Controls.ITreeViewNodeStatics), 393216, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
[Windows.UI.Xaml.Data.Bindable]
public class TreeViewNode : DependencyObject
Public Class TreeViewNode
Inherits DependencyObject
Inheritance
TreeViewNode
Attributes

Windows 10 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.

Properties

Children

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

Content

Gets or sets the data content for the current node.

ContentProperty

Identifies the Content dependency property.

Depth

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

DepthProperty

Identifies the Depth dependency property.

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.

Equivalent WinUI property: Microsoft.UI.Xaml.DependencyObject.Dispatcher.

(Inherited from DependencyObject)
HasChildren

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

HasChildrenProperty

Identifies the HasChildren dependency property.

HasUnrealizedChildren

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

IsExpanded

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

IsExpandedProperty

Identifies the IsExpanded dependency property.

Parent

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

Methods

ClearValue(DependencyProperty)

Clears the local value of a dependency property.

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.ClearValue.

(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.

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.GetAnimationBaseValue.

(Inherited from DependencyObject)
GetValue(DependencyProperty)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.GetValue.

(Inherited from DependencyObject)
ReadLocalValue(DependencyProperty)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.ReadLocalValue.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.RegisterPropertyChangedCallback.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.SetValue.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.UnregisterPropertyChangedCallback.

(Inherited from DependencyObject)

Applies to