Skip to main content
Tab

ASPxMenuBase.ItemTextTemplate Property

Gets or sets a common template used for displaying the text content of all menu items within a menu control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

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

Property Value

Type Default Description
ITemplate null

An object supporting the ITemplate interface which contains the template used for displaying the text content of all menu items within a menu.

Remarks

Use the ItemTextTemplate property to define a common content for all menu items within a menu control (which can be either the ASPxMenu or ASPxPopupMenu). The template created using this property replaces the text content of each menu item within the menu - in particular, the item’s text specified.

Note that any style settings defined for the menu items via specific properties (such as the ASPxMenuBase.Items or ASPxMenuBase.SubMenuItemStyle, etc) are still in effect for the menu items whose contents are specified through using the ItemTextTemplate property.

The text content of an individual menu item can be defined using the item’s MenuItem.TextTemplate property. A template for the client regions of submenus can be specified via the ASPxMenuBase.SubMenuTemplate or MenuItem.SubMenuTemplate property.

Note

Once a template defined via the ItemTextTemplate property is created within a 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 ItemTextTemplate cannot contain another menu control.

See Also