Show / Hide Table of Contents

    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, IDisposable, ILayoutParent
    Inheritance
    Object
    LayoutItem
    LayoutGroup
    GridLayout
    Implements
    IDisposable
    ILayoutParent

    Constructors

    View Source

    GridLayout()

    GridLayout Constructor.

    Declaration
    public GridLayout()
    API Level: 6

    Properties

    View Source

    Columns

    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 Source

    ColumnSpacing

    The distance between columns.

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

    GridOrientation

    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 Source

    Rows

    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 Source

    RowSpacing

    The distance between rows.

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

    Methods

    View Source

    GetColumn(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    API Level: 8
    View Source

    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
    Int32

    The column span of view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    API Level: 8
    View Source

    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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    API Level: 8
    View Source

    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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    API Level: 8
    View Source

    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
    Int32

    The row index of view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    API Level: 8
    View Source

    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
    Int32

    The row span of view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    API Level: 8
    View Source

    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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    API Level: 8
    View Source

    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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    API Level: 8
    View Source

    OnLayout(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
    LayoutGroup.OnLayout(Boolean, LayoutLength, LayoutLength, LayoutLength, LayoutLength)
    API Level: 6
    View Source

    OnMeasure(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
    LayoutGroup.OnMeasure(MeasureSpecification, MeasureSpecification)
    API Level: 6
    View Source

    SetColumn(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    ArgumentException

    The value cannot be a negative value other than Tizen.NUI.GridLayout.AutoColumn.

    API Level: 8
    View Source

    SetColumnSpan(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    ArgumentException

    The value cannot be less than 1.

    API Level: 8
    View Source

    SetHorizontalAlignment(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    ArgumentException

    The value should be GridLayout.Alignment.

    API Level: 8
    View Source

    SetHorizontalStretch(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    ArgumentException

    The value should be GridLayout.StretchFlags.

    API Level: 8
    View Source

    SetRow(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    ArgumentException

    The value cannot be a negative value other than Tizen.NUI.GridLayout.AutoRow.

    API Level: 8
    View Source

    SetRowSpan(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    ArgumentException

    The value cannot be less than 1.

    API Level: 8
    View Source

    SetVerticalAlignment(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    ArgumentException

    The value should be GridLayout.Alignment.

    API Level: 8
    View Source

    SetVerticalStretch(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 view.

    Exceptions
    Type Condition
    ArgumentNullException

    The view cannot be null.

    ArgumentException

    The value should be GridLayout.StretchFlags.

    API Level: 8

    Implements

    System.IDisposable
    ILayoutParent
    • View Source
    Back to top Copyright © 2016-2021 Samsung
    Generated by DocFX