You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/ui/wrap-layout.md
+37-12Lines changed: 37 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,16 @@
1
1
---
2
2
title: WrapLayout
3
+
description: Layout Container that wraps it's items once there's no more space to fit them.
4
+
contributors:
5
+
- rigor789
6
+
- Ombuweb
3
7
---
4
8
5
9
`<WrapLayout>` is a layout container that lets you position items in rows or columns, based on the `orientation` property. When the space is filled, the container automatically wraps items onto a new row or column.
6
10
7
-
## Horizontal WrapLayout
11
+
## Examples
12
+
13
+
### Horizontal WrapLayout
8
14
9
15
By default, a `WrapLayout` wraps its child items along a row.
10
16
The following example creates a row of equally-sized items. When the row runs out of space, the container wraps the last item to a new row.
@@ -20,7 +26,7 @@ The following example creates a row of equally-sized items. When the row runs ou
|`orientation`|`String`| Specifies the stacking direction.<br/>Valid values: `horizontal` (arranges items in rows) and `vertical` (arranges items in columns).<br/>Default value: `horizontal`. |
46
-
|`itemWidth`|`Number`| Sets the width used to measure and layout each child.<br/>Default value: `Number.NaN`, which does not restrict children. |
47
-
|`itemHeight`|`Number`| Sets the height used to measure and layout each child.<br/>Default value is `Number.NaN`, which does not restrict children. |
48
-
|`...Inherited`|`Inherited`| Additional inherited properties not shown. Refer to the [API Reference](https://docs.nativescript.org/api-reference/classes/wraplayout)|
73
+
Sets the height used to measure and layout each child. When not set, the item height is automatically calculated based on it's contents.
49
74
50
-
### Children props
75
+
### ...Inherited
51
76
52
-
None.
77
+
For additional inherited properties not shown, refer to the [API Reference](/api/class/WrapLayout).
0 commit comments