Layouts

Layouts are object containers that define the position of objects they contain. Use different layouts and their properties to arrange objects in 3D space.

The simplest layout in Kanzi is the stack layout, which you can use to automatically position its children side-by-side towards the desired direction. Layouts are especially useful for managing content that is added or removed during the use of Kanzi application, or loaded into the UI from external sources, for example, files in a directory.

Object specific layout

You can set object positions, rotations and scale with transformations. Two transformation types are available in Kanzi Studio:

Layout containers (for example, stack layouts or grid layouts) apply their own transformations on all immediate child objects who in their part define their own layout considering their own children, layout transformations, margins and alignments.

For example, a stack layout set in direction X places two objects next to each other based on the their dimensions (bounding boxes). By using the Layout Width property you can override the width of the bounding box: a value smaller than the actual size of the object creates two nested objects, whereas a larger value extends the space between the two objects.

After all layout tasks are done, final transformations from parent nodes are applied. The Root Layer under the Screen object has special rules for its layout if it is a Viewport Layer or an Empty Layer. It inherits the defined screen size, unless defined by the layout properties.

Kanzi contains these layout types:

See also

Using flow layouts

Using grid layouts

Using stack layouts

Using trajectory layouts

Optimizing rendering of layouts