Back to Devexpress

DxMenu.ItemsPosition Property

blazor-devexpress-dot-blazor-dot-dxmenu-e3546379.md

latest2.2 KB
Original Source

DxMenu.ItemsPosition Property

Specifies the alignment of items in the menu.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(ItemPosition.Start)]
[Parameter]
public ItemPosition ItemsPosition { get; set; }

Property Value

TypeDefaultDescription
ItemPositionStart

An ItemPosition enumeration value.

|

Available values:

NameDescription
Start

A menu item or all menu items are placed closer to the left edge (horizontal orientation) or top edge (vertical orientation) of the menu container.

| | Center |

A menu item or all menu items are placed in the center of the menu container.

| | End |

A menu item or all menu items are placed closer to the right edge of the menu container (for horizontal orientation) or bottom edge (for vertical orientation).

|

Remarks

Use the ItemsPosition property to align menu items in the menu container. To specify the position of an individual menu item, use the Position property.

razor
<div class="card w-50">
    <DxMenu Title="DevExpress"
            ItemsPosition="ItemPosition.Start">
        <Items>
            <DxMenuItem Text="Products" IconCssClass="oi oi-layers"/>
            <DxMenuItem Text="Support" IconCssClass="oi oi-person" />
            <DxMenuItem Text="Documentation" IconCssClass="oi oi-book" Position="ItemPosition.End"/>
        </Items>
    </DxMenu>
</div>

The control arranges items based on their position within the menu and their order in markup.

Run Demo: Menu - Overview

YouTube video

See Also

DxMenu Class

DxMenu Members

DevExpress.Blazor Namespace