Share via


TreeViewNode.Depth 属性

定义

获取一个值,该值指示当前节点与树根节点的距离。

本文档适用于 Windows 应用 SDKWinUI 的 WinUI 2 for UWP (,请参阅Windows 应用 SDK命名空间) 。

public:
 property int Depth { int get(); };
int Depth();
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
int Depth();
public int Depth { get; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
public int Depth { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")] get; }
Public ReadOnly Property Depth As Integer

属性值

Int32

int

树根节点的当前节点的深度。

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

适用于