Using a WrapLayout requires the WrapLayout module.

import * as wrapLayoutModule from "tns-core-modules/ui/layouts/wrap-layout";

Declaring a WrapLayout.

        <Label text="This is Label 1" />
        <Label text="This is Label 2" />
        <Label text="This is Label 3" />
        <Label text="This is Label 4" />

Creating a WrapLayout

var wrapLayout = new wrapLayoutModule.WrapLayout();

Setting the orientation of a wrap-layout.

wrapLayout.orientation = "vertical";

Stay connected with NativeScript

(expect a newsletter every 4-8 weeks)

NativeScript is licensed under the Apache 2.0 license .
© Progress Software Corporation. All Rights Reserved.