Tab
A newer version of this page is available. Switch to the current version.

MenuItem.Alignment Property

Gets or sets the value that specifies a root item's horizontal layout within the menu.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(MenuItemAlignment.Default)]
public MenuItemAlignment Alignment { get; set; }
<DefaultValue(MenuItemAlignment.Default)>
Public Property Alignment As MenuItemAlignment

Property Value

Type Default Description
MenuItemAlignment

Default

A MenuItemAlignment value that specifies the root item's horizontal layout.

Remarks

Note that this property is in effect when the ASPxMenu.ItemAutoWidth property is set to false.

The following example demonstrate how to arrange the menu root items using the Alignment property.


<dx:ASPxMenu ID="ASPxMenu1" runat="server" Width="100%" ItemAutoWidth="false">
    <SettingsAdaptivity Enabled="true" />
    <Items>
        <dx:MenuItem Text="Products"></dx:MenuItem>
        <dx:MenuItem Text="Demos"></dx:MenuItem>
        <dx:MenuItem Text="Buy"></dx:MenuItem>
        <dx:MenuItem Text="Support"></dx:MenuItem>
        <dx:MenuItem Text="Blogs"></dx:MenuItem>

        <dx:MenuItem Text="About" Alignment="Right"></dx:MenuItem>
        <dx:MenuItem Text="Sign In" Alignment="Right" BeginGroup="true"></dx:MenuItem>
    </Items>
</dx:ASPxMenu>

The result:

ASPxMenu_Alignment

See Also