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.
public class GridLayout : LayoutGroup, ILayoutParent
- Inheritance
- Implements
Constructors
View SourceGridLayout()
GridLayout Constructor.
Declaration
public GridLayout()
API Level: 6
Properties
View SourceColumns
Gets or Sets the number of columns in the grid.
Declaration
public int Columns { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 6
View SourceColumnSpacing
The distance between columns.
Declaration
public float ColumnSpacing { get; set; }
Property Value
Type | Description |
---|---|
Single |
API Level: 8
View SourceGridOrientation
Get/Set the orientation in the layout
Declaration
public GridLayout.Orientation GridOrientation { get; set; }
Property Value
Type | Description |
---|---|
GridLayout.Orientation |
Exceptions
Type | Condition |
---|---|
InvalidEnumArgumentException | Thrown when using invalid arguments that are enumerators. |
API Level: 8
View SourceRows
Gets or Sets the number of rows in the grid.
Declaration
public int Rows { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 8
View SourceRowSpacing
The distance between rows.
Declaration
public float RowSpacing { get; set; }
Property Value
Type | Description |
---|---|
Single |
API Level: 8
Methods
View SourceGetColumn(View)
Gets the column index.
Declaration
public static int GetColumn(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Int32 | The column index of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
API Level: 8
View SourceGetColumnSpan(View)
Gets the column span.
Declaration
public static int GetColumnSpan(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Int32 | The column span of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
API Level: 8
View SourceGetHorizontalAlignment(View)
Gets the horizontal alignment of this child.
Declaration
public static GridLayout.Alignment GetHorizontalAlignment(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
GridLayout.Alignment | The horizontal alignment of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
API Level: 8
View SourceGetHorizontalStretch(View)
Gets the value how child is resized within its horizontal space.
Declaration
public 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 |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
API Level: 8
View SourceGetRow(View)
Gets the row index.
Declaration
public static int GetRow(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Int32 | The row index of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
API Level: 8
View SourceGetRowSpan(View)
Gets the row span.
Declaration
public static int GetRowSpan(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
Int32 | The row span of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
API Level: 8
View SourceGetVerticalAlignment(View)
Gets the vertical alignment of this child.
Declaration
public static GridLayout.Alignment GetVerticalAlignment(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
GridLayout.Alignment | The vertical alignment of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
API Level: 8
View SourceGetVerticalStretch(View)
Gets the value how child is resized within its vertical space.
Declaration
public 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 |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
API Level: 8
View SourceOnLayout(Boolean, 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 |
---|---|---|
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
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. |
Overrides
API Level: 6
View SourceSetColumn(View, Int32)
Sets the column index the child occupies. A default column is Tizen.NUI.GridLayout.AutoColumn.
If column is a Tizen.NUI.GridLayout.AutoColumn, child will be automatically laid out depending on GridOrientation.
Declaration
public static void SetColumn(View view, int value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Int32 | value | The column index of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
API Level: 8
View SourceSetColumnSpan(View, Int32)
Sets the column span the child occupies. the default value is 1.
Declaration
public static void SetColumnSpan(View view, int value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Int32 | value | The column span of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
API Level: 8
View SourceSetHorizontalAlignment(View, GridLayout.Alignment)
Set the horizontal alignment of this child inside the cells. Start by default.
Declaration
public 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 |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
API Level: 8
View SourceSetHorizontalStretch(View, GridLayout.StretchFlags)
Sets the value how child is resized within its horizontal space. None by default.
Declaration
public 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 |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
API Level: 8
View SourceSetRow(View, Int32)
Sets the row index the child occupies. A default row index is Tizen.NUI.GridLayout.AutoRow.
If row is a Tizen.NUI.GridLayout.AutoRow, child will be automatically laid out depending on GridOrientation.
Declaration
public static void SetRow(View view, int value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Int32 | value | The row index of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
API Level: 8
View SourceSetRowSpan(View, Int32)
Sets the row span the child occupies. the default value is 1.
Declaration
public static void SetRowSpan(View view, int value)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Int32 | value | The row span of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
API Level: 8
View SourceSetVerticalAlignment(View, GridLayout.Alignment)
Set the vertical alignment of this child inside the cells.
Declaration
public 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 |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
API Level: 8
View SourceSetVerticalStretch(View, GridLayout.StretchFlags)
Set the value how child is resized within its vertical space. None by default.
Declaration
public 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 |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |