Class GridLayout
Definition
- 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()
Properties
View SourceColumns
Gets or Sets the number of columns in the grid.
Declaration
public int Columns { get; set; }
Property Value
Type | Description |
---|---|
int |
ColumnSpacing
The distance between columns.
Declaration
public float ColumnSpacing { get; set; }
Property Value
Type | Description |
---|---|
float |
GridOrientation
Get/Set the orientation in the layout
Declaration
public GridLayout.Orientation GridOrientation { get; set; }
Property Value
Type | Description |
---|---|
GridLayout.Orientation |
Exceptions
Type | Condition |
---|---|
System.ComponentModel.InvalidEnumArgumentException | Thrown when using invalid arguments that are enumerators. |
Rows
Gets or Sets the number of rows in the grid.
Declaration
public int Rows { get; set; }
Property Value
Type | Description |
---|---|
int |
RowSpacing
The distance between rows.
Declaration
public float RowSpacing { get; set; }
Property Value
Type | Description |
---|---|
float |
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 |
---|---|
int | The column index of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetColumnSpan(View)
Gets the column span.
Declaration
public static int GetColumnSpan(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
int | The column span of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetHorizontalAlignment(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 |
---|---|
System.ArgumentNullException | The |
GetHorizontalStretch(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 |
---|---|
System.ArgumentNullException | The |
GetRow(View)
Gets the row index.
Declaration
public static int GetRow(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
int | The row index of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetRowSpan(View)
Gets the row span.
Declaration
public static int GetRowSpan(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The child view. |
Returns
Type | Description |
---|---|
int | The row span of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
GetVerticalAlignment(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 |
---|---|
System.ArgumentNullException | The |
GetVerticalStretch(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 |
---|---|
System.ArgumentNullException | The |
OnLayout(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. |
Overrides
View SourceSetColumn(View, int)
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. |
int | value | The column index of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
SetColumnSpan(View, int)
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. |
int | value | The column span of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
SetHorizontalAlignment(View, 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 |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
SetHorizontalStretch(View, 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 |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
SetRow(View, int)
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. |
int | value | The row index of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
SetRowSpan(View, int)
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. |
int | value | The row span of |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
SetVerticalAlignment(View, 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 |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
SetVerticalStretch(View, 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 |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |