Skip to main content

DevExpress StackLayout for .NET MAUI

The DXStackLayout control aligns its child controls in a single line vertically or horizontally.

DevExpress StackLayout for .NET MAUI

Add a DXStackLayout to the Page

The following example adds a DXStackLayout to a page and adds three child items:

DevExpress Layouts for .NET MAUI - Stack layout example

<dx:DXStackLayout Orientation="Vertical" ItemAlignment="Center" ItemSpacing="10">
    <views:ChannelsDonutView .../>
    <dx:DXButton Style="{StaticResource cardButtonStyle}" HeightRequest="100" ...>
        <!--...-->
    </dx:DXButton>
    <dx:DXButton x:Name="pageviewsItem" Style="{StaticResource cardButtonStyle}" HeightRequest="250" ...>
        <!--...-->
    </dx:DXButton>
</dx:DXStackLayout>

Configure Layout’s Settings

The following list contains properties specific to the DXStackLayout control:

ItemSpacing
Sets the amount of space between DXStackLayout child elements.
ItemAlignment

Specifies how the DXStackLayout control aligns its child items.

DevExpress Layouts for .NET MAUI - StackLayout - Item alignments in action

Orientation

Sets whether child controls are positioned horizontally or vertically.

DevExpress Layouts for .NET MAUI -- DXStackLayout - Orientation