Back to Devexpress

ASPxMenuBase.SubMenuStyle Property

aspnet-devexpress-dot-web-dot-aspxmenubase-c54336d8.md

latest3.1 KB
Original Source

ASPxMenuBase.SubMenuStyle Property

Gets the style settings for the client regions of all submenus within the current menu control.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public virtual MenuStyle SubMenuStyle { get; }
vb
Public Overridable ReadOnly Property SubMenuStyle As MenuStyle

Property Value

TypeDescription
MenuStyle

A MenuStyle object that contains the style settings for the client regions of the menu control’s submenus.

|

Remarks

The SubMenuStyle property provides access to the style settings which define the common appearance style for the client regions of all submenus within the menu control. A submenu’s client region is considered as an area where submenu items are displayed.

In order to access and change the style of a particular menu item’s submenus, the item’s MenuItem.SubMenuStyle property can be used.

The appearance of menu items within all submenus of the menu control can be defined via the ASPxMenuBase.SubMenuItemStyle property.

Example

aspx
<dx:ASPxMenu ID="ASPxMenu1" runat="server" Width="200px" ItemSpacing="0px" >
    <Items>
        ...
        <dx:MenuItem Text="Green">
            <Items>
                <dx:MenuItem Text="Green Item 1" />
                <dx:MenuItem Text="Green Item 2" />
            </Items>
            <SubMenuStyle BackColor="Green" />
            <TextTemplate>
                <table style="background-color:Green;" height=100% width=100%>
                    <tr>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text='<%# Eval("Text") %>' />
                        </td>
                    </tr>
                </table>
            </TextTemplate>
        </dx:MenuItem>
        ...
    </Items>
    <ItemStyle Height="30px" HorizontalAlign="Center">
        <HoverStyle BackColor="Aqua">
            <Border BorderWidth="0px" />
        </HoverStyle>
        <Paddings Padding="0px" />
    </ItemStyle>
    <SubMenuStyle GutterWidth="0px" />
    <Paddings Padding="0px" />
</dx:ASPxMenu>

See Also

SubMenuStyle

ASPxMenuBase.SubMenuItemStyle

MenuItem.SubMenuItemStyle

ItemStyle

ASPxMenuBase Class

ASPxMenuBase Members

DevExpress.Web Namespace