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#
Copy
public class GridLayout : LayoutGroup, ILayoutParent
Inheritance
Implements

Constructors

View Source

GridLayout()

GridLayout Constructor.

Declaration
C#
Copy
public GridLayout()
API Level: 6

Fields

View Source

AutoColumn

Declaration
C#
Copy
public const int AutoColumn = null
Field Value
Type Description
Int32
View Source

AutoRow

Declaration
C#
Copy
public const int AutoRow = null
Field Value
Type Description
Int32
View Source

ColumnProperty

ColumnProperty

Declaration
C#
Copy
public static readonly BindableProperty ColumnProperty
Field Value
Type Description
BindableProperty
View Source

ColumnSpanProperty

ColumnSpanProperty

Declaration
C#
Copy
public static readonly BindableProperty ColumnSpanProperty
Field Value
Type Description
BindableProperty
View Source

HorizontalAlignmentProperty

HorizontalAlignmentProperty

Declaration
C#
Copy
public static readonly BindableProperty HorizontalAlignmentProperty
Field Value
Type Description
BindableProperty
View Source

HorizontalStretchProperty

HorizontalStretchProperty

Declaration
C#
Copy
public static readonly BindableProperty HorizontalStretchProperty
Field Value
Type Description
BindableProperty
View Source

RowProperty

RowProperty

Declaration
C#
Copy
public static readonly BindableProperty RowProperty
Field Value
Type Description
BindableProperty
View Source

RowSpanProperty

RowSpanProperty

Declaration
C#
Copy
public static readonly BindableProperty RowSpanProperty
Field Value
Type Description
BindableProperty
View Source

VerticalAlignmentProperty

VerticalAlignmentProperty

Declaration
C#
Copy
public static readonly BindableProperty VerticalAlignmentProperty
Field Value
Type Description
BindableProperty
View Source

VerticalStretchProperty

VerticalStretchProperty

Declaration
C#
Copy
public static readonly BindableProperty VerticalStretchProperty
Field Value
Type Description
BindableProperty

Properties

View Source

Columns

Gets or Sets the number of columns in the grid.

Declaration
C#
Copy
public int Columns { get; set; }
Property Value
Type Description
Int32
API Level: 6
View Source

ColumnSpacing

The distance between columns.

Declaration
C#
Copy
public float ColumnSpacing { get; set; }
Property Value
Type Description
Single
API Level: 8
View Source

GridOrientation

Get/Set the orientation in the layout

Declaration
C#
Copy
public GridLayout.Orientation GridOrientation { get; set; }
Property Value
Type Description
GridLayout.Orientation
API Level: 8
View Source

Rows

Gets or Sets the number of rows in the grid.

Declaration
C#
Copy
public int Rows { get; set; }
Property Value
Type Description
Int32
API Level: 8
View Source

RowSpacing

The distance between rows.

Declaration
C#
Copy
public float RowSpacing { get; set; }
Property Value
Type Description
Single
API Level: 8

Methods

View Source

GetColumn(View)

Gets the column index.

Declaration
C#
Copy
public static int GetColumn(View view)
Parameters
Type Name Description
View view

The child view.

Returns
Type Description
Int32

The column index of view.

API Level: 8
View Source

GetColumnSpan(View)

Gets the column span.

Declaration
C#
Copy
public static int GetColumnSpan(View view)
Parameters
Type Name Description
View view

The child view.

Returns
Type Description
Int32

The column span of view.

API Level: 8
View Source

GetHorizontalAlignment(View)

Gets the horizontal alignment of this child.

Declaration
C#
Copy
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 view.

API Level: 8
View Source

GetHorizontalStretch(View)

Gets the value how child is resized within its horizontal space.

Declaration
C#
Copy
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 view.

API Level: 8
View Source

GetRow(View)

Gets the row index.

Declaration
C#
Copy
public static int GetRow(View view)
Parameters
Type Name Description
View view

The child view.

Returns
Type Description
Int32

The row index of view.

API Level: 8
View Source

GetRowSpan(View)

Gets the row span.

Declaration
C#
Copy
public static int GetRowSpan(View view)
Parameters
Type Name Description
View view

The child view.

Returns
Type Description
Int32

The row span of view.

API Level: 8
View Source

GetVerticalAlignment(View)

Gets the vertical alignment of this child.

Declaration
C#
Copy
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 view.

API Level: 8
View Source

GetVerticalStretch(View)

Gets the value how child is resized within its vertical space.

Declaration
C#
Copy
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 view.

API Level: 8
View Source

OnLayout(Boolean, LayoutLength, LayoutLength, LayoutLength, LayoutLength)

Assign a size and position to each of its children.

Declaration
C#
Copy
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 Source

OnMeasure(MeasureSpecification, MeasureSpecification)

Measure the layout and its content to determine the measured width and the measured height.

Declaration
C#
Copy
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 Source

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#
Copy
public static void SetColumn(View view, int value)
Parameters
Type Name Description
View view

The child view.

Int32 value

The column index of view.

API Level: 8
View Source

SetColumnSpan(View, Int32)

Sets the column span the child occupies. the default value is 1.

Declaration
C#
Copy
public static void SetColumnSpan(View view, int value)
Parameters
Type Name Description
View view

The child view.

Int32 value

The column span of view.

API Level: 8
View Source

SetHorizontalAlignment(View, GridLayout.Alignment)

Set the horizontal alignment of this child inside the cells. Start by default.

Declaration
C#
Copy
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 view.

API Level: 8
View Source

SetHorizontalStretch(View, GridLayout.StretchFlags)

Sets the value how child is resized within its horizontal space. None by default.

Declaration
C#
Copy
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 view.

API Level: 8
View Source

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#
Copy
public static void SetRow(View view, int value)
Parameters
Type Name Description
View view

The child view.

Int32 value

The row index of view.

API Level: 8
View Source

SetRowSpan(View, Int32)

Sets the row span the child occupies. the default value is 1.

Declaration
C#
Copy
public static void SetRowSpan(View view, int value)
Parameters
Type Name Description
View view

The child view.

Int32 value

The row span of view.

API Level: 8
View Source

SetVerticalAlignment(View, GridLayout.Alignment)

Set the vertical alignment of this child inside the cells.

Declaration
C#
Copy
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 view.

API Level: 8
View Source

SetVerticalStretch(View, GridLayout.StretchFlags)

Set the value how child is resized within its vertical space. None by default.

Declaration
C#
Copy
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 view.

API Level: 8

Implements

Extension Methods