mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
710 B
710 B
nav-title | title | environment | description | previous_url |
---|---|---|---|---|
stack-layout How-To | stack-layout | nativescript | Examples for using stack-layout | /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%}