Class GridLayout
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
GridLayout is a 2D grid pattern layout that consists of a set of rows and columns.
C#Copypublic class GridLayout : LayoutGroup, ILayoutParent
- Inheritance
- Implements
Constructors
Declaration
C#Copypublic GridLayout()
API Level: 6
Fields
Declaration
C#Copypublic const int AutoColumn = null
Field Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic const int AutoRow = null
Field Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic static readonly BindableProperty ColumnProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ColumnSpanProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty HorizontalAlignmentProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty HorizontalStretchProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty RowProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty RowSpanProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty VerticalAlignmentProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty VerticalStretchProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
Declaration
C#Copypublic int Columns { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 6
Declaration
C#Copypublic float ColumnSpacing { get; set; }
Property Value
Type | Description |
---|---|
Single |
API Level: 8
Declaration
C#Copypublic GridLayout.Orientation GridOrientation { get; set; }
Property Value
Type | Description |
---|---|
GridLayout.Orientation |
API Level: 8
Declaration
C#Copypublic int Rows { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 8
Declaration
C#Copypublic float RowSpacing { get; set; }
Property Value
Type | Description |
---|---|
Single |
API Level: 8
Methods
Declaration
C#Copypublic static int GetColumn(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Int32 | The column index of |
API Level: 8
Declaration
C#Copypublic static int GetColumnSpan(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Int32 | The column span of |
API Level: 8
Declaration
C#Copypublic static GridLayout.Alignment GetHorizontalAlignment(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
GridLayout.Alignment | The horizontal alignment of |
API Level: 8
GetHorizontalStretch(View)
Gets the value how child is resized within its horizontal space.
Declaration
C#Copypublic static GridLayout.StretchFlags GetHorizontalStretch(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
GridLayout.StretchFlags | The horizontal stretch flag of |
API Level: 8
Declaration
C#Copypublic static int GetRow(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Int32 | The row index of |
API Level: 8
Declaration
C#Copypublic static int GetRowSpan(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Int32 | The row span of |
API Level: 8
Declaration
C#Copypublic static GridLayout.Alignment GetVerticalAlignment(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
GridLayout.Alignment | The vertical alignment of |
API Level: 8
Declaration
C#Copypublic static GridLayout.StretchFlags GetVerticalStretch(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
GridLayout.StretchFlags | The vertical stretch flag of |
API Level: 8
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 |
---|---|---|
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. |
Overrides
API Level: 6
SetColumn(View, Int32)
Sets the column index the child occupies. A default column is AutoColumn.
If column is a AutoColumn, child will be automatically laid out depending on GridOrientation.
Declaration
C#Copypublic static void SetColumn(View view, int value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Int32 | value | The column index of |
API Level: 8
SetColumnSpan(View, Int32)
Sets the column span the child occupies. the default value is 1.
Declaration
C#Copypublic static void SetColumnSpan(View view, int value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Int32 | value | The column span of |
API Level: 8
SetHorizontalAlignment(View, GridLayout.Alignment)
Set the horizontal alignment of this child inside the cells. Start by default.
Declaration
C#Copypublic static void SetHorizontalAlignment(View view, GridLayout.Alignment value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
GridLayout.Alignment | value | The horizontal alignment flag of |
API Level: 8
SetHorizontalStretch(View, GridLayout.StretchFlags)
Sets the value how child is resized within its horizontal space. None by default.
Declaration
C#Copypublic static void SetHorizontalStretch(View view, GridLayout.StretchFlags value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
GridLayout.StretchFlags | value | The horizontal stretch flag of |
API Level: 8
SetRow(View, Int32)
Sets the row index the child occupies. A default row index is AutoRow.
If row is a AutoRow, child will be automatically laid out depending on GridOrientation.
Declaration
C#Copypublic static void SetRow(View view, int value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Int32 | value | The row index of |
API Level: 8
Declaration
C#Copypublic static void SetRowSpan(View view, int value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Int32 | value | The row span of |
API Level: 8
SetVerticalAlignment(View, GridLayout.Alignment)
Set the vertical alignment of this child inside the cells.
Declaration
C#Copypublic static void SetVerticalAlignment(View view, GridLayout.Alignment value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
GridLayout.Alignment | value | The vertical alignment flag of |
API Level: 8
SetVerticalStretch(View, GridLayout.StretchFlags)
Set the value how child is resized within its vertical space. None by default.
Declaration
C#Copypublic static void SetVerticalStretch(View view, GridLayout.StretchFlags value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
GridLayout.StretchFlags | value | The vertical stretch flag of |