WrapLayout

Using a WrapLayout requires the WrapLayout module.

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

Declaring a WrapLayout.

<Page>
    <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" />
    </WrapLayout>
</Page>

Creating a WrapLayout

var wrapLayout = new wrapLayoutModule.WrapLayout();

Setting the orientation of a wrap-layout.

wrapLayout.orientation = "vertical";
Is this article helpful? Yes / No
Thank you for your feedback!

Tell us how we can improve this article

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