Files
NativeScript/tests/app/ui/layouts/dock-layout.md
2016-06-20 14:32:12 +03:00

1.2 KiB

nav-title, title, environment, description, previous_url
nav-title title environment description previous_url
dock-layout How-To dock-layout nativescript Examples for using dock-layout /ApiReference/ui/layouts/dock-layout/HOW-TO

DockLayout

Using a DockLayout requires the DockLayout module.

Declaring a DockLayout

<Page>
 <DockLayout stretchLastChild="true">
   <Button dock="left" text="left" style="background-color: red; margin: 5;" />
   <Button dock="top" text="top" style="background-color: lightblue; margin: 5;" />
   <Button dock="right" text="right" style="background-color: lightgreen; margin: 5;" />
   <Button dock="bottom" text="bottom" style="background-color: lightpink; margin: 5;" />
   <Button text="fill" style="background-color: wheat; margin: 5;" />
 </DockLayout>
</Page>

Other frequently used modules when working with a DockLayout include:

Create DockLayout

Add child view to layout

Remove child view from layout

Setting the dock roperty