kanzi

Trait IContentLayoutConcept

pub trait IContentLayoutConcept: Inherits<Object> + Inherits<ContentLayoutConcept> {
    // Provided methods
    fn get_horizontal_padding(&self) -> Result<Vector2, Error> { ... }
    fn set_horizontal_padding(&self, value: Vector2) -> Result<(), Error> { ... }
    fn get_vertical_padding(&self) -> Result<Vector2, Error> { ... }
    fn set_vertical_padding(&self, value: Vector2) -> Result<(), Error> { ... }
    fn get_depth_padding(&self) -> Result<Vector2, Error> { ... }
    fn set_depth_padding(&self, value: Vector2) -> Result<(), Error> { ... }
}
Expand description

Use the Content Layout nodes to present complex content as one element in the UI. You can use a Content Layout node to create a control that adapts to the size of its content, or a control where the content adapts to the size of the control.

§Content Layout dimensions

By default the size of a Content Layout node is determined by the size of its child nodes.

§Arranging the items in a Content Layout node

In the arrange phase, all items in a Content Layout node receive the allocated size that is the actual size of the layout.

To align the items in a Content Layout node, set in those items the Node::HorizontalAlignmentProperty, Node::VerticalAlignmentProperty, and Node::DepthAlignmentProperty.

§Setting the content padding

To add space between the content and boundaries of a Content Layout node, use the padding properties:

  • HorizontalPaddingProperty to add space on the left and right sides of the content
  • VerticalPaddingProperty to add space on the bottom and the top of the content
  • DepthPaddingProperty to add space in the back and front of the content in a Content Layout 3D node

See: For a 2D content layout node, see ContentLayout2D. See: For a 3D content layout node, see ContentLayout3D.

§Since

Kanzi 3.9.0

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§