MenuItem.Depth Property

Note: This property is new in the .NET Framework version 2.0.

Gets the level at which a menu item is displayed.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
property int Depth {
	int get ();
}
/** @property */
public int get_Depth ()

public function get Depth () : int

Property Value

The level at which a menu item is displayed.

Use the Depth property to determine the depth of the menu item. The depth indicates the level at which a menu item is displayed and represents the number of levels of hierarchy between the current menu item and the root menu item. For example, a root menu item has a depth of 0. A submenu item of the root menu item has a depth of 1, and so on.

The following code example demonstrates how to use the Depth property to determine the depth of a menu item.

No code example is currently available or this language may not be supported.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: