Version

NestDepth Property (DockablePaneBase)

Returns the level of nesting occupied by the current pane. This property is read-only.
Syntax
'Declaration
 
Public ReadOnly Property NestDepth As Integer
public int NestDepth {get;}
Remarks

This property specifies how deeply nested the pane is within other panes. For top-level (DockArea) panes, NestDepth returns 0. A pane nested inside a top-level pane will return 1.

Example
The following examples demonstrates the use of the DockableGroupPane's Contains method to determine whether a specific pane exists within the group.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock

Private Sub btnVisibleIndex_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVisibleIndex.Click

    Dim group As DockableGroupPane = Me.ultraDockManager1.DockAreas(0)
    Dim pane As DockableControlPane

    For Each pane In Me.ultraDockManager1.ControlPanes
        Debug.WriteLine("Control Pane:" + pane.ToString())
        Debug.Indent()

        ' The 'Contains' methods checks the 'Panes' of the
        ' group. the second argument indicates whether to
        ' check the children of any contained group pane.
        ' therefore passing in false will indicate whether
        ' the pane is directly contained in the panes collection
        If group.Contains(pane, False) Then
            Debug.WriteLine("Is contained directly by the first dock area")

            If pane.IsVisible Then
                Debug.WriteLine("Its visible position is " & group.Panes.GetVisiblePosition(pane))
            End If
        ElseIf group.Contains(pane, True) Then
            ' While the pane is not in the Panes collection
            ' of the group, it is contained within the
            ' dock area at a deeper level
            Debug.WriteLine("Is a descendant of the first dock area")

            ' The nest depth indicates how many levels
            ' deep the pane is from the dock area
            Debug.WriteLine("The pane's current nest depth is:" & pane.NestDepth)
        Else
            Debug.WriteLine("Is not contained within the first dock area")

            Debug.WriteLine(String.Format("The pane is currently at index {0} of the pane {1}", pane.Index, pane.Parent))
        End If

        Debug.Unindent()
    Next

End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDock;
using System.Diagnostics;

private void btnVisibleIndex_Click(object sender, System.EventArgs e)
{

  DockableGroupPane group = this.ultraDockManager1.DockAreas[0];

	foreach(DockableControlPane pane in this.ultraDockManager1.ControlPanes )
	{
		Debug.WriteLine("Control Pane:" + pane.ToString());
		Debug.Indent();

		// The 'Contains' methods checks the 'Panes' of the
		// group. the second argument indicates whether to
		// check the children of any contained group pane.
		// therefore passing in false will indicate whether
		// the pane is directly contained in the panes collection
		if (group.Contains(pane, false))
		{
			Debug.WriteLine("Is contained directly by the first dock area");

			if (pane.IsVisible)
				Debug.WriteLine("Its visible position is " + group.Panes.GetVisiblePosition(pane));
		}
		else if (group.Contains(pane, true))
		{
			// While the pane is not in the Panes collection
			// of the group, it is contained within the
			// dock area at a deeper level
			Debug.WriteLine("Is a descendant of the first dock area");

			// The nest depth indicates how many levels
			// deep the pane is from the dock area
			Debug.WriteLine("The pane's current nest depth is:" + pane.NestDepth);
		}
		else
		{
			Debug.WriteLine("Is not contained within the first dock area");

			Debug.WriteLine(string.Format("The pane is currently at index {0} of the pane {1}", pane.Index, pane.Parent));
		}

		Debug.Unindent();
	}

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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