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.
public class FlexLayout : LayoutGroup, ILayoutParent, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourceFlexLayout()
[Draft] Creates a FlexLayout object.
Declaration
public FlexLayout()
Properties
View SourceAlignment
[Draft] Get/Set the alignment of the layout content.
Declaration
public 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
public FlexLayout.FlexDirection Direction { get; set; }
Property Value
Type | Description |
---|---|
FlexLayout.FlexDirection |
ItemsAlignment
[Draft] Get/Set the alignment of the layout items.
Declaration
public FlexLayout.AlignmentType ItemsAlignment { get; set; }
Property Value
Type | Description |
---|---|
FlexLayout.AlignmentType |
Justification
[Draft] Get/Set the justification in the layout.
Declaration
public FlexLayout.FlexJustification Justification { get; set; }
Property Value
Type | Description |
---|---|
FlexLayout.FlexJustification |
WrapType
[Draft] Get/Set the wrap in the layout.
Declaration
public FlexLayout.FlexWrapType WrapType { get; set; }
Property Value
Type | Description |
---|---|
FlexLayout.FlexWrapType |
Methods
View SourceDispose()
Dispose.
Declaration
public void Dispose()
Dispose(DisposeTypes)
Dispose.
Declaration
protected 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
protected override void OnChildAdd(LayoutItem child)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | The Layout child. |
Overrides
View SourceOnChildRemove(LayoutItem)
Callback when child is removed from container.
Declaration
protected override void OnChildRemove(LayoutItem child)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | The Layout child. |
Overrides
View SourceOnLayout(bool, LayoutLength, LayoutLength, LayoutLength, LayoutLength)
Assign a size and position to each of its children.
Declaration
protected 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
View SourceOnMeasure(MeasureSpecification, MeasureSpecification)
Measure the layout and its content to determine the measured width and the measured height.
Declaration
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. |