Struct LayoutDimension

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    The LayoutDimension structure defines the size of a view in layout.

    public struct LayoutDimension

    Fields

    View Source

    MatchParent

    Constant value that indicates MatchParent for LayoutDimension. For example, LayoutDimension layoutWidth = LayoutDimension.MatchParent;

    Declaration
    public const float MatchParent
    Field Value
    Type Description
    float
    View Source

    WrapContent

    Constant value that indicates WrapContent for LayoutDimension. For example, LayoutDimension layoutWidth = LayoutDimension.WrapContent;

    Declaration
    public const float WrapContent
    Field Value
    Type Description
    float

    Properties

    View Source

    IsFixedValue

    Gets whether the size is fixed value or not. If it's fixed value, then the value is valid.

    Declaration
    public bool IsFixedValue { get; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Operators

    View Source

    operator +(float, LayoutDimension)

    Addition operator for LayoutDimension. If the size is fixed value, then it adds the value to the given float. Otherwise, it returns the given float. For example, float width = 10 + layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static float operator +(float a, LayoutDimension b)
    Parameters
    Type Name Description
    float a

    A on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    float

    The sum of a float value and the fixed value of LayoutDimension.

    View Source

    operator +(LayoutDimension, float)

    Addition operator for LayoutDimension. If the size is fixed value, then it adds the value to the given float. Otherwise, it returns the given float. For example, float width = layoutWidth + 10; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static float operator +(LayoutDimension a, float b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    float b

    A on the right hand side.

    Returns
    Type Description
    float

    The sum of the fixed value of LayoutDimension and a float value.

    View Source

    operator /(float, LayoutDimension)

    Division operator for LayoutDimension. If the size is fixed value, then it divides the value by the given float. Otherwise, it returns the given float. For example, float width = 10 / layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static float operator /(float a, LayoutDimension b)
    Parameters
    Type Name Description
    float a

    A on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    float

    The division of a float value and the fixed value of LayoutDimension.

    View Source

    operator /(LayoutDimension, float)

    Division operator for LayoutDimension. If the size is fixed value, then it divides the value by the given float. Otherwise, it returns the negative of the given float. For example, float width = layoutWidth / 10; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static float operator /(LayoutDimension a, float b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    float b

    A on the right hand side.

    Returns
    Type Description
    float

    The division of the fixed value of LayoutDimension and a float value.

    View Source

    operator ==(LayoutDimension, LayoutDimension)

    Equality operator for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values.

    Declaration
    public static bool operator ==(LayoutDimension a, LayoutDimension b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    bool
    View Source

    operator >(LayoutDimension, LayoutDimension)

    Comparison operators for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values. Otherwise, it returns false.

    Declaration
    public static bool operator >(LayoutDimension a, LayoutDimension b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    bool
    View Source

    operator >=(LayoutDimension, LayoutDimension)

    Comparison operators for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values. Otherwise, it returns false.

    Declaration
    public static bool operator >=(LayoutDimension a, LayoutDimension b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    bool
    View Source

    implicit operator LayoutDimension(float)

    Creates a LayoutDimension from a float value. It's used implicitly. For example, LayoutDimension layoutWidth = 100; // Fixed value 100.0f.

    Declaration
    public static implicit operator LayoutDimension(float value)
    Parameters
    Type Name Description
    float value
    Returns
    Type Description
    LayoutDimension
    View Source

    implicit operator float(LayoutDimension)

    Converts LayoutDimension to float. It's used implicitly. For example, float width = layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static implicit operator float(LayoutDimension layoutDimension)
    Parameters
    Type Name Description
    LayoutDimension layoutDimension

    The LayoutDimension converted to float.

    Returns
    Type Description
    float
    View Source

    operator !=(LayoutDimension, LayoutDimension)

    Inequality operator for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values.

    Declaration
    public static bool operator !=(LayoutDimension a, LayoutDimension b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    bool
    View Source

    operator <(LayoutDimension, LayoutDimension)

    Comparison operators for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values. Otherwise, it returns false.

    Declaration
    public static bool operator <(LayoutDimension a, LayoutDimension b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    bool
    View Source

    operator <=(LayoutDimension, LayoutDimension)

    Comparison operators for LayoutDimension. It compares two LayoutDimensions. If both are fixed values, then it compares their values. Otherwise, it returns false.

    Declaration
    public static bool operator <=(LayoutDimension a, LayoutDimension b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    bool
    View Source

    operator *(float, LayoutDimension)

    Multiplication operator for LayoutDimension. If the size is fixed value, then it multiplies the value with the given float. Otherwise, it returns the given float. For example, float width = 10 * layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static float operator *(float a, LayoutDimension b)
    Parameters
    Type Name Description
    float a

    A on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    float

    The multiplication of a float value and the fixed value of LayoutDimension.

    View Source

    operator *(LayoutDimension, float)

    Multiplication operator for LayoutDimension. If the size is fixed value, then it multiplies the value with the given float. Otherwise, it returns the negative of the given float. For example, float width = layoutWidth * 10; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static float operator *(LayoutDimension a, float b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    float b

    A on the right hand side.

    Returns
    Type Description
    float

    The multiplication of the fixed value of LayoutDimension and a float value.

    View Source

    operator -(float, LayoutDimension)

    Subtraction operator for LayoutDimension. If the size is fixed value, then it subtracts the value from the given float. Otherwise, it returns the given float. For example, float width = 10 - layoutWidth; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static float operator -(float a, LayoutDimension b)
    Parameters
    Type Name Description
    float a

    A on the left hand side.

    LayoutDimension b

    A LayoutDimension on the right hand side.

    Returns
    Type Description
    float

    The subtraction of a float value and the fixed value of LayoutDimension.

    View Source

    operator -(LayoutDimension, float)

    Subtraction operator for LayoutDimension. If the size is fixed value, then it subtracts the value from the given float. Otherwise, it returns the negative of the given float. For example, float width = layoutWidth - 10; // Only valid when layoutWidth is fixed value. Otherwise, it will cause compile error.

    Declaration
    public static float operator -(LayoutDimension a, float b)
    Parameters
    Type Name Description
    LayoutDimension a

    A LayoutDimension on the left hand side.

    float b

    A on the right hand side.

    Returns
    Type Description
    float

    The subtraction of the fixed value of LayoutDimension and a float value.

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX