The Children Layout
property determines how a container positions its children. The default value is "Regular" which means that children are positioned according to their
The value TopToBottomStack
results in the children stacking one on top of another, from top to bottom.
The value LeftToWriteStack
results in the children stacking one beside another, from left to right.
The following shows how to use the ChildrenLayout property to stack objects. It begins with a single NineSlice inside of a container called ContainerInstance. The following actions are performed:
- The NineSliceInstance is copied and pasted 3 times. At this point all NineSliceInstance's are overlapping each other
- The Children Layout is changed from Regular to TopToBottomStack. The NineSliceInstance's are automatically stacked top-to-bottom.
- The Children Layout is changed to LeftToRightStack. The NineSliceInstance's are automatically stacked left-to-right.
When children in a container are stacked, their position values can be used to separate the objects. For example, on a TopToBottomStack, the Y value of each child can be used to separate it from the previous child.
property controls how stacking behaves beyond boundaries. For more information, see the