MenuSettingsBase.ApplyItemStyleToTemplates Property

Gets or sets a value that specifies whether the styles defined for menu items can be applied to templated menu items.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.2.dll

Declaration

public bool ApplyItemStyleToTemplates { get; set; }
Public Property ApplyItemStyleToTemplates As Boolean

Property Value

Type Description
Boolean

true, if item styles apply to templated menu items; otherwise, false.

Remarks

Use the ApplyItemStyleToTemplates property to control whether the syles defined for menu items affect the appearance of templated menu items.

If this property is set to false (the default value), the appearance of menu items, which are rendered using templates (such as the ASPxMenuBase.ItemTemplate or MenuItem.Template), is not affected by style settings defined for menu items (via the ASPxMenuBase.ItemStyle, ASPxMenuBase.SubMenuItemStyle or MenuItem.SubMenuItemStyle property).

Set the ApplyItemStyleToTemplates property to true to make templated menu items inherit some item style settings, such as background images, paddings, etc. This allows you to keep the outward appearance of templated menu items identical to other items within the menu control.

The image below demonstrates how this property's setting affects the appearance of the second root item, which is rendered using a template consisting of a standard CheckBox control:

ASPxMenu_ApplyItemStylesToTemplates.png

See Also