Class FlexLayout

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll

[Draft] This class implements a flex layout. The flex layout implementation is based on open source Facebook Yoga layout engine. For more information about the flex layout API and how to use it please refer to https://yogalayout.com/docs/ We implement the subset of the API in the class below.

C#
Copy
public class FlexLayout : LayoutGroup, ILayoutParent, IDisposable
Inheritance
System.Object
FlexLayout
Implements
System.IDisposable

Constructors

View Source

FlexLayout()

[Draft] Creates a FlexLayout object.

Declaration
C#
Copy
public FlexLayout()
API Level: 6

Properties

View Source

Alignment

[Draft] Get/Set the alignment of the layout content.

Declaration
C#
Copy
public FlexLayout.AlignmentType Alignment { get; set; }
Property Value
Type Description
FlexLayout.AlignmentType
API Level: 6
View Source

Direction

[Draft] Get/Set the flex direction in the layout. The direction of the main-axis which determines the direction that flex items are laid out.

Declaration
C#
Copy
public FlexLayout.FlexDirection Direction { get; set; }
Property Value
Type Description
FlexLayout.FlexDirection
API Level: 6
View Source

ItemsAlignment

[Draft] Get/Set the alignment of the layout items.

Declaration
C#
Copy
public FlexLayout.AlignmentType ItemsAlignment { get; set; }
Property Value
Type Description
FlexLayout.AlignmentType
API Level: 6
View Source

Justification

[Draft] Get/Set the justification in the layout.

Declaration
C#
Copy
public FlexLayout.FlexJustification Justification { get; set; }
Property Value
Type Description
FlexLayout.FlexJustification
API Level: 6
View Source

WrapType

[Draft] Get/Set the wrap in the layout.

Declaration
C#
Copy
public FlexLayout.FlexWrapType WrapType { get; set; }
Property Value
Type Description
FlexLayout.FlexWrapType
API Level: 6

Methods

View Source

Dispose()

Dispose.

Declaration
C#
Copy
public void Dispose()
API Level: 6
View Source

Dispose(DisposeTypes)

Dispose.

Declaration
C#
Copy
protected virtual void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type
API Level: 6
View Source

OnChildAdd(LayoutItem)

Callback when child is added to container.
Derived classes can use this to set their own child properties on the child layout's owner.

Declaration
C#
Copy
protected override void OnChildAdd(LayoutItem child)
Parameters
Type Name Description
LayoutItem child

The Layout child.

Overrides
API Level: 6
View Source

OnChildRemove(LayoutItem)

Callback when child is removed from container.

Declaration
C#
Copy
protected override void OnChildRemove(LayoutItem child)
Parameters
Type Name Description
LayoutItem child

The Layout child.

Overrides
API Level: 6
View Source

OnLayout(Boolean, LayoutLength, LayoutLength, LayoutLength, LayoutLength)

Assign a size and position to each of its children.

Declaration
C#
Copy
protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
Parameters
Type Name Description
System.Boolean changed

This is a new size or position for this layout.

LayoutLength left

Left position, relative to parent.

LayoutLength top

Top position, relative to parent.

LayoutLength right

Right position, relative to parent.

LayoutLength bottom

Bottom position, relative to parent.

Overrides
API Level: 6
View Source

OnMeasure(MeasureSpecification, MeasureSpecification)

Measure the layout and its content to determine the measured width and the measured height.

Declaration
C#
Copy
protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
Parameters
Type Name Description
MeasureSpecification widthMeasureSpec

horizontal space requirements as imposed by the parent.

MeasureSpecification heightMeasureSpec

vertical space requirements as imposed by the parent.

Overrides
API Level: 6

Implements

System.IDisposable