Skip to main content
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.v24.2.dll

Declaration

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

Property Value

Type Default Description
DefaultBoolean Default

One of the enumeration values.

Available values:

Name Description Return Value
True

The value is true.

0

False

The value is false.

1

Default

The value is specified by a global option or a higher-level object.

2

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