Menu::StaticDisplayLevels Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the number of menu levels to display in a static menu.

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

public:
[ThemeableAttribute(true)]
property int StaticDisplayLevels {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The number of menu levels to display in a static menu. The default is 1.

Exception Condition
ArgumentOutOfRangeException

The specified value is less than 1.

Use the StaticDisplayLevels property to specify the number of menu levels to display in a static menu. All menu levels below the specified value are displayed in a dynamic menu. You can also limit the number of menu levels to display in a dynamic menu by setting the MaximumDynamicDisplayLevels property.

The following code example demonstrates how to use the StaticDisplayLevels property to display the first two menu levels in the static menu.

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

.NET Framework
Available since 2.0
Return to top
Show: