Class FlexLayout
Definition
- 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#Copypublic class FlexLayout : LayoutGroup, ILayoutParent, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic FlexLayout()
Properties
Declaration
C#Copypublic FlexLayout.AlignmentType Alignment { get; set; }
Property Value
| Type | Description |
|---|---|
| FlexLayout.AlignmentType |
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#Copypublic FlexLayout.FlexDirection Direction { get; set; }
Property Value
| Type | Description |
|---|---|
| FlexLayout.FlexDirection |
Declaration
C#Copypublic FlexLayout.AlignmentType ItemsAlignment { get; set; }
Property Value
| Type | Description |
|---|---|
| FlexLayout.AlignmentType |
Declaration
C#Copypublic FlexLayout.FlexJustification Justification { get; set; }
Property Value
| Type | Description |
|---|---|
| FlexLayout.FlexJustification |
Declaration
C#Copypublic FlexLayout.FlexWrapType WrapType { get; set; }
Property Value
| Type | Description |
|---|---|
| FlexLayout.FlexWrapType |
Methods
Declaration
C#Copypublic void Dispose()
Declaration
C#Copyprotected virtual void Dispose(DisposeTypes type)
Parameters
| Type | Name | Description |
|---|---|---|
| DisposeTypes | type |
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#Copyprotected override void OnChildAdd(LayoutItem child)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutItem | child | The Layout child. |
Overrides
Declaration
C#Copyprotected override void OnChildRemove(LayoutItem child)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutItem | child | The Layout child. |
Overrides
OnLayout(bool, LayoutLength, LayoutLength, LayoutLength, LayoutLength)
Assign a size and position to each of its children.
Declaration
C#Copyprotected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | 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
OnMeasure(MeasureSpecification, MeasureSpecification)
Measure the layout and its content to determine the measured width and the measured height.
Declaration
C#Copyprotected 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. |