Skip to main content
Tab

ASPxMenuBase.SubMenuTemplate Property

Gets or sets a common template used for displaying the client region’s content of all submenus within a menu control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll

Declaration

[DefaultValue(null)]
public virtual ITemplate SubMenuTemplate { get; set; }

Property Value

Type Default Description
ITemplate null

An object supporting the System.Web.UI.ITemplate interface which contains the template used for displaying the client regions of all submenus within the menu.

Remarks

Use the SubMenuTemplate property to define a common content for the client regions of all submenus within the current menu control. A submenu’s client region is considered as an area where menu items are displayed - it involves the menu items, separators and gutters. The template created using the SubMenuTemplate property fills the entire client region of each submenu within the menu control.

The SubMenuTemplate property is useful when it is required to display a specific control within a menu control’s submenus. Placing a control onto the template container causes the control be displayed within a submenu when the submenu is invoked.

Note that any style settings defined for the client regions of the submenus via specific properties (such as the ASPxMenuBase.SubMenuStyle or MenuItem.SubMenuStyle) are still in effect for the submenus whose contents are specified using the SubMenuTemplate property.

The client region’s content of a particular menu item’s submenus can be defined using the item’s MenuItem.SubMenuTemplate property.

Note

Once a template defined via the SubMenuTemplate property is created within a tab control, it is instantiated within a container object of the MenuItemTemplateContainer type. This container object exposes a set of specific properties to which the template’s child controls can be bound.

Note

An SubMenuTemplate cannot contain another menu control.

See Also