Components
    • Animation
    • Barcodes
    • Buttons
    • Charts
    • Common Utilities
    • Conversational UI
    • Data Grid
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdowns
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gantt
    • Gauges
    • Indicators
    • Inputs
    • Labels
    • Layout
    • ListBox
    • ListView
    • Mapbeta
    • Notification
    • PDF Processing
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeView
    • Upload
    Sample Applications
    Styling & Themes
    Common Features
    Project Setup
    Changelog

Layout

The StackLayout component provides options for controlling its appearance.

To customize the layout of the StackLayout, use any of the following configuration options:

Orientation

To set the StackLayout orientation, use the orientation property.

By default, orientation is set to horizontal.

Example
View Source
Change Theme:

Gaps

To set the StackLayout gaps, use the gap property.

By default, the StackLayout does not apply a gap.

Example
View Source
Change Theme:

Horizontal alignment

To set the StackLayout horizontal alignment, use the align property. The horizontal key controls the alignment of the inner elements based on the X axis.

The available values are:

  • startUses the start point of the container.
  • centerUses the central point of the container.
  • endUses the end point of the container.
  • (Default)stretchStretches the items to fill the width of the container.
Example
View Source
Change Theme:

Vertical alignment

To set the StackLayout vertical alignment, use the align property. The vertical key controls the alignment of the inner elements based on the Y axis.

The available values are:

  • topUses the top point of the container.
  • middleUses the middle point of the container.
  • bottomUses the bottom point of the container.
  • (Default)stretchStretches the items to fill the height of the container.
Example
View Source
Change Theme:

Nested StackLayouts

The component enables you to create a more complex layout that includes both horizontal and vertical items by nesting StackLayout components inside one another.

Example
View Source
Change Theme: