Version

Depth Property (UIElement)

Calculates the depth of the current UIElement within the scene graph.
Syntax
'Declaration
 
Protected ReadOnly Property Depth As Integer
protected int Depth {get;}

Property Value

The depth, or distance from the root UIElement containing everything within the scene, of this UIElement instance when it is part of the scene graph.

When the current instance is detached from a scene graph, this property returns -1.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also