Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 710 Bytes

File metadata and controls

32 lines (26 loc) · 710 Bytes
nav-title stack-layout How-To
title stack-layout
environment nativescript
description Examples for using stack-layout
previous_url /ApiReference/ui/layouts/stack-layout/HOW-TO

StackLayout

Using a StackLayout requires the StackLayout module. {%snippet stack-layout-require%}

Declaring a StackLayout.

<Page>
  <StackLayout orientation="horizontal">
    <Label text="This is Label 1" />
  </StackLayout>
</Page>

Create StackLayout

{%snippet stack-layout-new%}

Add child view to layout

{%snippet stack-layout-addchild%}

Remove child view from layout

{%snippet stack-layout-remove%}

Change layout orientation to Horizontal

{%snippet stack-layout-horizontal%}