Skip to main content
A newer version of this page is available. .
Tab

MenuItem.DropDownMode Property

Gets or sets a value that specifies whether the menu item’s sub menu should only be invoked by using a specific drop down button.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(false)]
public bool DropDownMode { get; set; }

Property Value

Type Default Description
Boolean **false**

true if the drop down button is enabled; otherwise, false.

Remarks

Typically, a sub menu is opened by clicking any area of the parent menu item (root item or sub item).

The enabled DropDownMode property only provides for opening the sub menu by using a specific drop down button. A mouse click to another part of an item (for instance, an item caption, etc) won’t open the sub menu. You can use the ASPxClientMenuBase.ItemClick or ASPxMenuBase.ItemClick events handlers to implement custom functionality.

Use the MenuItemStyle.DropDownButtonStyle property to specify the drop down button‘s appearance. The MenuItemStyle.DropDownButtonSpacing property is useful to define the amount of space between the right border of a menu item and the drop down button.

Example

This sample demonstrates how to enable drop down mode for the ASPxMenu items via the MenuItem.DropDownMode property.

<dxm:ASPxMenu ID="ASPxMenu1" runat="server">
   <Items>
      <dxm:MenuItem Text="Yahoo">
         <Image Url="~/Images/Yahoo.png" />
      </dxm:MenuItem>
      <dxm:MenuItem Text="Google">
         <Image Url="~/Images/Google.png" />
      </dxm:MenuItem>
      <dxm:MenuItem Text="LiveSearch">
         <Image Url="~/Images/LiveSearch.png" />
      </dxm:MenuItem>
      <dxm:MenuItem DropDownMode="True" Text="Other">
         <Items>
            <dxm:MenuItem Text="Ask.com">
               <Image Url="~/Images/ASK.png" />
            </dxm:MenuItem>
            <dxm:MenuItem Text="Altavista">
               <Image Url="~/Images/AltaVista.png" />
            </dxm:MenuItem>
         </Items>
     </dxm:MenuItem>
   </Items>
<ItemStyle DropDownButtonSpacing="10px">
   <DropDownButtonStyle>
      <HoverStyle BackColor="#999999">
      </HoverStyle>
   </DropDownButtonStyle>
</ItemStyle>
</dxm:ASPxMenu>
See Also