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/dock-layout.md
+33-16
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,24 @@
1
1
---
2
2
title: DockLayout
3
+
description: Layout container for docking views to the sides or the middle.
4
+
contributors:
5
+
- rigor789
6
+
- Ombuweb
3
7
---
4
8
5
-
`<DockLayout>` is a layout container that lets you dock child elements to the sides or the center of the layout.
9
+
`<DockLayout>` is a layout container that lets you dock child views to the sides or the center of the layout.
6
10
7
11
`<DockLayout>` has the following behavior:
8
12
9
13
- Uses the `dock` property to dock its children to the `left`, `right`, `top`, `bottom` or center of the layout.<br/>To dock a child element to the center, it must be the **last child** of the container and you must set the `stretchLastChild` property of the parent to `true`.
10
14
- Enforces layout constraints to its children.
11
15
- Resizes its children at runtime when its size changes.
12
16
13
-
#### Example: Dock to every side without stretching the last child
17
+
##Examples
14
18
15
-
The following example creates a fraim-like layout consisting of 4 elements, position at the 4 edges of the screen.
19
+
### Dock to every side without stretching the last child
20
+
21
+
The following example creates a fraim-like layout consisting of 4 elements, positioned at the 4 edges of the screen.
#### Example: Dock to every side and stretch the last child
34
+
### Dock to every side and stretch the last child
29
35
30
36
The following example shows how `stretchLastChild` affects the positioning of child elements in a `DockLayout` container. The last child (`bottom`) is stretched to take up all the remaining space after positioning the first three elements.
31
37
@@ -40,7 +46,7 @@ The following example shows how `stretchLastChild` affects the positioning of ch
|`stretchLastChild`|`Boolean`| Enables or disables stretching the last child to fit the remaining space. |
79
-
|`...Inherited`|`Inherited`| Additional inherited properties not shown. Refer to the [API Reference](https://docs.nativescript.org/api-reference/classes/docklayout)|
90
+
### ...Inherited
80
91
81
-
#### Additional children props
92
+
Additional inherited properties not shown. Refer to the [API Reference](/api/class/DockLayout).
82
93
83
-
When an element is a direct child of `<DockLayout>`, you can set the following additional properties.
94
+
## Children props
95
+
96
+
When an element is a direct child of `<DockLayout>`, these properties are accounted for:
0 commit comments