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#Copypublic class FlexLayout : LayoutGroup, ILayoutParent, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic FlexLayout()
API Level: 6
Properties
Declaration
C#Copypublic FlexLayout.AlignmentType Alignment { get; set; }
Property Value
Type | Description |
---|---|
FlexLayout.AlignmentType |
API Level: 6
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 |
API Level: 6
Declaration
C#Copypublic FlexLayout.AlignmentType ItemsAlignment { get; set; }
Property Value
Type | Description |
---|---|
FlexLayout.AlignmentType |
API Level: 6
Declaration
C#Copypublic FlexLayout.FlexJustification Justification { get; set; }
Property Value
Type | Description |
---|---|
FlexLayout.FlexJustification |
API Level: 6
Declaration
C#Copypublic FlexLayout.FlexWrapType WrapType { get; set; }
Property Value
Type | Description |
---|---|
FlexLayout.FlexWrapType |
API Level: 6
Methods
Declaration
C#Copypublic void Dispose()
API Level: 6
Declaration
C#Copyprotected virtual void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type |
API Level: 6
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
API Level: 6
Declaration
C#Copyprotected override void OnChildRemove(LayoutItem child)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | The Layout child. |
Overrides
API Level: 6
OnLayout(Boolean, 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 |
---|---|---|
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
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. |