Class FlowLayout2D

Class Hierarchy

Flow Layout 2D arranges 2D items along a line and continues to the next line when it runs out of space.

You can use a flow layout to arrange the content the same way you would arrange it on a page. The layout iterates through its items in the order you add them to the flow layout and first arranges them along the line of the primary direction you set in the PrimaryDirectionProperty property. When a flow layout runs out of available space in the primary direction it creates a new line along the secondary direction you set in the SecondaryDirectionProperty property.

If you do not set the size of a flow layout or its parent layout, the flow layout arranges items on a single line in the primary direction.

For example, to arrange items according to the rules used in:

  • Left-to-right languages, set the PrimaryDirectionProperty property to DirectionLeftToRight and SecondaryDirectionProperty property to DirectionTopToBottom
  • Right-to-left languages, set the PrimaryDirectionProperty property to DirectionRightToLeft and SecondaryDirectionProperty property to DirectionTopToBottom
  • Traditional Chinese writing layout, set the PrimaryDirectionProperty property to DirectionTopToBottom and SecondaryDirectionProperty property to DirectionRightToLeft
See also

Inherits properties and message types from FlowLayout2DMetadata.

Synopsis

Methods
create()

Creates a flow layout node

FlowLayout2D.FlowLayout2D:create(name)

Creates a flow layout node.

Parameters
name (string)

Name of the flow layout.