System.Web.UI.WebControls.SubMenuStyle Class

Represents the style of a submenu in a System.Web.UI.WebControls.Menu control.

See Also: SubMenuStyle Members

Syntax

public class SubMenuStyle : Style, System.ComponentModel.ICustomTypeDescriptor

Remarks

Use the System.Web.UI.WebControls.SubMenuStyle class to represent the style of a submenu in the System.Web.UI.WebControls.Menu control. A submenu can be displayed within either a static menu or a dynamic menu. A static menu is always visible on a System.Web.UI.WebControls.Menu control, whereas a dynamic menu is displayed only when the user positions the mouse pointer over a parent menu item that contains a dynamic submenu. You can specify different style characteristics (such as font size and color) for the submenus within a static menu and a dynamic menu by using the properties in the following table.

Menu.DynamicMenuStyle

The style settings for a submenu within a dynamic menu.

Menu.StaticMenuStyle

The style settings for a submenu within a static menu.

The System.Web.UI.WebControls.SubMenuStyle class inherits most of its members from the Style class. It extends the Style class by providing properties that control the amount of space around a menu item's text. Use the SubMenuStyle.HorizontalPadding property to control the amount of space to the left and right of the menu item's text. Similarly, the SubMenuStyle.VerticalPadding property controls the amount of space above and below the menu item's text.

For more information on the inherited style settings, see System.Web.UI.WebControls.Style.

Note:

Set the z-index of HTML objects that are associated with a submenu by setting the Style.CssClass property of the submenu style. The z-index attribute defines the stacking order of rendered HTML objects. By default, dynamic menu items will appear above any HTML object that has the default z-index (0).

Requirements

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