Class LayoutGroup
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
[Draft] LayoutGroup class providing container functionality.
C#Copypublic class LayoutGroup : LayoutItem, ILayoutParent
- Inheritance
- Derived
- Implements
Constructors
Declaration
C#Copypublic LayoutGroup()
API Level: 6
Properties
Declaration
C#Copyprotected List<LayoutItem> LayoutChildren { get; }
Property Value
Type | Description |
---|---|
List<LayoutItem> |
API Level: 6
Methods
Declaration
C#Copypublic virtual void Add(LayoutItem childLayout)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | childLayout | LayoutItem to add to the layout group. |
API Level: 6
ChangeLayoutChildOrder(LayoutItem, Int32)
Sets the order of the child layout in the layout group.
Declaration
C#Copypublic void ChangeLayoutChildOrder(LayoutItem child, int order)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | the child layout in the layout group |
Int32 | order | the order of the child layout in the layout group |
GetAttachedValue<T>(BindableObject, BindableProperty)
Gets the value that is contained in the attached BindableProperty.
Declaration
C#Copypublic static T GetAttachedValue<T>(BindableObject bindable, BindableProperty property)
Parameters
Type | Name | Description |
---|---|---|
BindableObject | bindable | The bindable object. |
BindableProperty | property | The BindableProperty for which to get the value. |
Returns
Type | Description |
---|---|
T | The value that is contained in the attached BindableProperty. |
Type Parameters
Name | Description |
---|---|
T | The return type of property |
GetChildMeasureSpecification(MeasureSpecification, LayoutLength, LayoutLength)
Calculate the right measure spec for this child.
Does the hard part of MeasureChildren: figuring out the MeasureSpec to
pass to a particular child. This method figures out the right MeasureSpec
for one dimension (height or width) of one child view.
Declaration
C#Copypublic static MeasureSpecification GetChildMeasureSpecification(MeasureSpecification parentMeasureSpec, LayoutLength padding, LayoutLength childDimension)
Parameters
Type | Name | Description |
---|---|---|
MeasureSpecification | parentMeasureSpec | The requirements for this view. MeasureSpecification. |
LayoutLength | padding | The padding of this view for the current dimension and margins, if applicable. LayoutLength. |
LayoutLength | childDimension | How big the child wants to be in the current dimension. LayoutLength. |
Returns
Type | Description |
---|---|
MeasureSpecification | a MeasureSpec for the child. |
IterateLayoutChildren()
returns an enumerable collection of the child layouts that owner's ExcludeLayouting is false.
Declaration
C#Copyprotected IEnumerable<LayoutItem> IterateLayoutChildren()
Returns
Type | Description |
---|---|
IEnumerable<LayoutItem> | An enumerable collection of the child layouts that affected by this layout. |
MeasureChild(LayoutItem, MeasureSpecification, MeasureSpecification)
Ask one of the children of this view to measure itself, taking into
account both the MeasureSpec requirements for this view and its padding.
The heavy lifting is done in GetChildMeasureSpecification.
Declaration
C#Copyprotected virtual void MeasureChild(LayoutItem child, MeasureSpecification parentWidthMeasureSpec, MeasureSpecification parentHeightMeasureSpec)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | The child to measure. |
MeasureSpecification | parentWidthMeasureSpec | The width requirements for this view. |
MeasureSpecification | parentHeightMeasureSpec | The height requirements for this view. |
API Level: 6
MeasureChildren(MeasureSpecification, MeasureSpecification)
Ask all of the children of this view to measure themselves, taking into
account both the MeasureSpec requirements for this view and its padding.
The heavy lifting is done in GetChildMeasureSpec.
Declaration
C#Copyprotected virtual void MeasureChildren(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
Parameters
Type | Name | Description |
---|---|---|
MeasureSpecification | widthMeasureSpec | The width requirements for this view. |
MeasureSpecification | heightMeasureSpec | The height requirements for this view. |
API Level: 6
MeasureChildWithMargins(LayoutItem, MeasureSpecification, LayoutLength, MeasureSpecification, LayoutLength)
Ask one of the children of this view to measure itself, taking into
account both the MeasureSpec requirements for this view and its padding.
and margins. The heavy lifting is done in GetChildMeasureSpecification.
Declaration
C#Copyprotected virtual void MeasureChildWithMargins(LayoutItem child, MeasureSpecification parentWidthMeasureSpec, LayoutLength widthUsed, MeasureSpecification parentHeightMeasureSpec, LayoutLength heightUsed)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | The child to measure. |
MeasureSpecification | parentWidthMeasureSpec | The width requirements for this view. |
LayoutLength | widthUsed | Extra space that has been used up by the parent horizontally (possibly by other children of the parent). |
MeasureSpecification | parentHeightMeasureSpec | The height requirements for this view. |
LayoutLength | heightUsed | Extra space that has been used up by the parent vertically (possibly by other children of the parent). |
API Level: 6
MeasureChildWithoutPadding(LayoutItem, MeasureSpecification, MeasureSpecification)
Ask one of the children of this view to measure itself, taking into
account both the MeasureSpec requirements for this view and without its padding.
and margins. The heavy lifting is done in GetChildMeasureSpecification.
Declaration
C#Copyprotected void MeasureChildWithoutPadding(LayoutItem child, MeasureSpecification parentWidthMeasureSpec, MeasureSpecification parentHeightMeasureSpec)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | The child to measure. |
MeasureSpecification | parentWidthMeasureSpec | The width requirements for this view. |
MeasureSpecification | parentHeightMeasureSpec | The height requirements for this view. |
Declaration
C#Copyprotected override void OnAttachedToOwner()
Overrides
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 virtual void OnChildAdd(LayoutItem child)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | The Layout child. |
API Level: 6
Declaration
C#Copyprotected virtual void OnChildRemove(LayoutItem child)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | child | The Layout child. |
API Level: 6
OnLayout(Boolean, LayoutLength, LayoutLength, LayoutLength, LayoutLength)
Called from Layout() when this layout should assign a size and position to each of its children.
Derived classes with children should override this method and call Layout() on each of their children.
Declaration
C#Copyprotected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
Parameters
Type | Name | Description |
---|---|---|
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.
If this method is overridden, it is the subclass's responsibility to make
sure the measured height and width are at least the layout's minimum height
and width.
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. |
Overrides
API Level: 6
OnUnparent()
Virtual method to allow derived classes to remove any children before it is removed from its parent.
Declaration
C#Copyprotected override void OnUnparent()
Overrides
Declaration
C#Copypublic virtual void Remove(LayoutItem layoutItem)
Parameters
Type | Name | Description |
---|---|---|
LayoutItem | layoutItem | LayoutItem to remove from the layout group. |
API Level: 6
Declaration
C#Copypublic void RemoveAll()
API Level: 6
SetAttachedValue(BindableObject, BindableProperty, Object)
Sets the value of the attached property.
Declaration
C#Copypublic static void SetAttachedValue(BindableObject bindable, BindableProperty property, object value)
Parameters
Type | Name | Description |
---|---|---|
BindableObject | bindable | The bindable object. |
BindableProperty | property | The BindableProperty on which to assign a value. |
Object | value | The value to set. |