System.Web.UI.WebControls.MenuItemStyleCollection Class

Represents a collection of System.Web.UI.WebControls.MenuItemStyle objects in a System.Web.UI.WebControls.Menu control. This class cannot be inherited.

See Also: MenuItemStyleCollection Members

Syntax

public sealed class MenuItemStyleCollection : System.Web.UI.StateManagedCollection

Remarks

The System.Web.UI.WebControls.MenuItemStyleCollection class is used to store and manage a collection of System.Web.UI.WebControls.MenuItemStyle objects in a System.Web.UI.WebControls.Menu control. The System.Web.UI.WebControls.Menu control uses the System.Web.UI.WebControls.MenuItemStyleCollection class as the underlying data type of the Menu.LevelMenuItemStyles and Menu.LevelSelectedStyles properties.

The Menu.LevelMenuItemStyles and Menu.LevelSelectedStyles properties are an alternative to the individual style properties (such as Menu.StaticMenuItemStyle). These properties are applied to regular menu items and the selected menu item, respectively, based on the menu item's level in the menu. The first style in the collection corresponds to the menu item style for the first level of the menu. The second style in the collection corresponds to the menu item style for the second level of the menu, and so on. The Menu.LevelMenuItemStyles and Menu.LevelSelectedStyles properties are most often used to generate menus where menu items at a certain level have the same appearance, regardless of whether they have submenus.

The System.Web.UI.WebControls.MenuItemStyleCollection class inherits most of its members from the System.Web.UI.StateManagedCollection class. For more information on the inherited members, see System.Web.UI.StateManagedCollection.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0