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

ASPxMenuBase.ShowPopOutImages Property

Gets or sets a value specifying whether pop-out images that indicate that a menu item has a submenu are displayed.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(DefaultBoolean.Default)]
public DefaultBoolean ShowPopOutImages { get; set; }

Property Value

Type Default Description
DefaultBoolean **Default**

One of the DefaultBoolean enumeration values.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Remarks

When a menu item contains a submenu, a specific pop-out image can be displayed to indicate that the user can expand the menu by positioning the mouse pointer over the menu item. Use the ShowPopOutImages property to control the availability of pop-out images within a menu control.

Custom pop-out images can be specified for the Orientation.Horizontal and Orientation.Vertical orientation states of a menu control via the ASPxMenuBase.HorizontalPopOutImage and ASPxMenuBase.VerticalPopOutImage properties respectively.

Example

This sample demonstrates how to disable sending a postback and generating the server ItemClick event for the menu items that contain sub-items. In this sample, the desired behavior is implemented by setting the e.processOnServer parameter to false within the handler of the menu client ItemClick event.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="DevExpress.Web.v13.1" Namespace="DevExpress.Web.ASPxMenu" TagPrefix="dxm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <p>
            Try clicking menu items.</p>
        <p>
            Note: Clicking a parent item (an item that has sub-items) does not fire the menu
            server-side ItemClick event.</p>
        <dxm:ASPxMenu ID="ASPxMenu1" runat="server" BorderBetweenItemAndSubMenu="HideAll"
            OnItemClick="ASPxMenu1_ItemClick" SelectParentItem="True" ShowPopOutImages="True">
            <Items>
                <dxm:MenuItem Text="Root 1">
                    <Items>
                        <dxm:MenuItem Text="Sub Item">
                            <Items>
                                <dxm:MenuItem Text="Item 1-1">
                                </dxm:MenuItem>
                                <dxm:MenuItem Text="Item 1-2">
                                </dxm:MenuItem>
                            </Items>
                        </dxm:MenuItem>
                        <dxm:MenuItem Text="Item 1-3">
                        </dxm:MenuItem>
                    </Items>
                </dxm:MenuItem>
                <dxm:MenuItem Text="Root 2">
                    <Items>
                        <dxm:MenuItem Text="Item 2-1">
                        </dxm:MenuItem>
                        <dxm:MenuItem Text="Item 2-2">
                        </dxm:MenuItem>
                        <dxm:MenuItem Text="Item 2-3">
                        </dxm:MenuItem>
                    </Items>
                </dxm:MenuItem>
            </Items>
            <ClientSideEvents ItemClick="function(s, e) {
    e.processOnServer = e.item.GetItemCount() == 0; // Prevent generating a postback for parent menu items
           }" />
        </dxm:ASPxMenu>
        <br />
        <br />
        <br />
        <br />
        <br />
        <asp:Label ID="Label1" runat="server"></asp:Label>
    </div>
    </form>
</body>
</html>
See Also