Skip to main content

ASPxMenuBase.ItemStyle Property

Gets the style settings for all menu items of the menu control’s root level.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web


public virtual MenuItemStyle ItemStyle { get; }

Property Value

Type Description

A MenuItemStyle object that contains the style settings for the root menu items.


The ItemStyle property provides access to the style settings which define the appearance style of all menu items of the menu control’s root level.

A specific item style can be applied to all submenu items of the menu control using the menu’s ASPxMenuBase.SubMenuItemStyle property. The style settings for all submenu items of an individual menu item can be defined via the item’s MenuItem.SubMenuItemStyle property.

Note that the appearance of the root menu’s client region can be customized using the standard style settings available at the menu control’s level (such as the BackColor, BackgroundImage, Border, etc.).


This example demonstrates how the checked state of items can be manipulated to emulate the toolbar behavior (using the ASPxMenu control).

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=, Culture=neutral, 
    Namespace="DevExpress.Web.ASPxMenu" TagPrefix="dxm" %>  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">

<html xmlns="" >
 <head id="Head1" runat="server">
     <title>Check states of items</title>
     <form id="form1" runat="server">
          <dxm:ASPxMenu ID="ASPxMenu1" runat="server" ItemSpacing="1px" 
              SeparatorHeight="15px" SeparatorWidth="2px">
                 <dxm:MenuItem GroupName="Bold" Text="">
                     <Image Url="~/ASPxperience/Menu/Images/bold.gif" />
                 <dxm:MenuItem GroupName="Italic" Text="">
                     <Image Url="~/ASPxperience/Menu/Images/italic.gif" />
                 <dxm:MenuItem GroupName="Underline" Text="">
                     <Image Url="~/ASPxperience/Menu/Images/underline.gif" />
                 <dxm:MenuItem BeginGroup="True" GroupName="Align" Text="" Checked="True">
                     <Image Url="~/ASPxperience/Menu/Images/left.gif" />
                 <dxm:MenuItem GroupName="Align" Text="">
                     <Image Url="~/ASPxperience/Menu/Images/center.gif" />
                 <dxm:MenuItem GroupName="Align" Text="">
                     <Image Url="~/ASPxperience/Menu/Images/right.gif" />
                 <dxm:MenuItem GroupName="Align" Text="">
                     <Image Url="~/ASPxperience/Menu/Images/justify.gif" />
                 <Paddings Padding="2px" />
                 <HoverStyle BackColor="#B6BDD2">
                     <Border BorderColor="#0A246A" BorderWidth="1px" />
                 <CheckedStyle BackColor="#D4D5D8">
                     <Border BorderColor="#0A246A" BorderWidth="1px" />
             <Paddings Padding="1px" />
             <BackgroundImage ImageUrl="~/ASPxperience/Menu/Images/back.gif" />
             <SeparatorPaddings PaddingLeft="2px" PaddingRight="2px" />
             <SeparatorBackgroundImage ImageUrl="~/ASPxperience/Menu/Images/separator.gif" 
              Repeat="NoRepeat" />

See Also