A newer version of this page is available.
Switch to the current version.
ASPxMenu.Orientation Property
Gets or sets the direction in which to render the menu.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v18.2.dll
Declaration
[DefaultValue(Orientation.Horizontal)]
public Orientation Orientation { get; set; }
<DefaultValue(Orientation.Horizontal)>
Public Property Orientation As Orientation
Property Value
Type | Default | Description |
---|---|---|
Orientation | Horizontal |
One of the Orientation enumeration values. |
Remarks
Use the Orientation property to specify the direction in which to render the menu control.
On the client side, you can control the menu orientation using the ASPxClientMenu.GetOrientation and ASPxClientMenu.SetOrientation methods.
Examples
This sample illustrates how to keep the NavigateUrl of the item if there's a control in the ItemTemplateContainer of the ASPxMenu.
NOTE
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-keep-the-navigateurl-of-the-item-in-the-templated-aspxmenu-e1202
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication6._Default" %>
<%@ register Assembly="DevExpress.Web.ASPxEditors.v8.3" Namespace="DevExpress.Web.ASPxEditors"
TagPrefix="dxe" %>
<%@ register Assembly="DevExpress.Web.v8.3" Namespace="DevExpress.Web.ASPxMenu" TagPrefix="dxm" %>
<%@ register Assembly="DevExpress.Web.v8.3" Namespace="DevExpress.Web.ASPxSiteMapControl"
TagPrefix="dxsm" %>
<!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>
<dxm:aspxmenu ID="ASPxMenu1" runat="server" DataSourceID="ASPxSiteMapDataSource1"
Orientation="Vertical" OnDataBound="ASPxMenu1_DataBound">
<itemtemplate>
<dxe:aspxlabel ID="ASPxLabel1" runat="server" Text='<%#Container.Item.Text %>' Width="100px" Height="20px" Cursor="pointer">
</dxe:aspxlabel>
</itemtemplate>
</dxm:aspxmenu>
<dxsm:aspxsitemapdatasource ID="ASPxSiteMapDataSource1" runat="server" SiteMapFileName="~/web.sitemap" />
</div>
</form>
</body>
</html>
See Also
Feedback