System.Web.UI.WebControls.Menu.LevelSelectedStyles Property

Gets a System.Web.UI.WebControls.MenuItemStyleCollection object that contains the style settings that are applied to the selected menu item based on its level in a System.Web.UI.WebControls.Menu control.

Syntax

[System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemStyleCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.ComponentModel.DefaultValue(null)]
public MenuItemStyleCollection LevelSelectedStyles { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the Menu.LevelSelectedStyles collection as an alternative to the Menu.DynamicSelectedStyle and Menu.StaticSelectedStyle properties to control the style of a selected menu item at the individual levels of the menu. The styles contained in this collection are applied to a selected menu item based on its menu level. The first style in the collection corresponds to the style of a selected menu item in the first level of the menu. The second style in the collection corresponds to the style of a selected menu item in the second level of the menu, and so on. This collection is most often used to generate table of contents-style navigation menus where menu items at a certain level should have the same appearance, regardless of whether they have submenus.

Note:

If a style is defined for a certain level using the Menu.LevelSelectedStyles collection, this overrides the Menu.DynamicSelectedStyle and Menu.StaticSelectedStyle properties at that level.

Requirements

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