DevToys logo DevToys
  • Home
  • Blog
  • Documentation
  • Download
Search Results for

    Show / Hide Table of Contents

    Struct UIGridLength

    Represents the length of a row or column.

    Implements
    IEquatable<UIGridLength>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: DevToys.Api
    Assembly: DevToys.Api.dll
    Syntax
    public readonly struct UIGridLength : IEquatable<UIGridLength>

    Constructors

    UIGridLength(double)

    Initializes a new instance of the UIGridLength struct.

    Declaration
    public UIGridLength(double value)
    Parameters
    Type Name Description
    double value

    The size of the UIGridLength in device independent pixels.

    UIGridLength(double, UIGridUnitType)

    Initializes a new instance of the UIGridLength struct.

    Declaration
    public UIGridLength(double value, UIGridUnitType type)
    Parameters
    Type Name Description
    double value

    The size of the UIGridLength.

    UIGridUnitType type

    The unit of the UIGridLength.

    Properties

    Auto

    Gets an instance of UIGridLength that indicates that a row or column should auto-size to fit its content.

    Declaration
    public static UIGridLength Auto { get; }
    Property Value
    Type Description
    UIGridLength

    IsAbsolute

    Gets a value that indicates whether the UIGridLength has a UIGridUnitType of Pixel.

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

    IsAuto

    Gets a value that indicates whether the UIGridLength has a UIGridUnitType of Auto.

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

    IsFraction

    Gets a value that indicates whether the UIGridLength has a UIGridUnitType of Fraction.

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

    UIGridUnitType

    Gets the unit of the UIGridLength.

    Declaration
    public UIGridUnitType UIGridUnitType { get; }
    Property Value
    Type Description
    UIGridUnitType

    Value

    Gets the length.

    Declaration
    public double Value { get; }
    Property Value
    Type Description
    double

    Methods

    Equals(UIGridLength)

    Compares two UIGridLength structures for equality.

    Declaration
    public bool Equals(UIGridLength gridLength)
    Parameters
    Type Name Description
    UIGridLength gridLength

    The structure with which to test equality.

    Returns
    Type Description
    bool

    True if the structures are equal, otherwise false.

    Equals(object?)

    Determines whether the UIGridLength is equal to the specified object.

    Declaration
    public override bool Equals(object? o)
    Parameters
    Type Name Description
    object o

    The object with which to test equality.

    Returns
    Type Description
    bool

    True if the objects are equal, otherwise false.

    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Gets a hash code for the UIGridLength.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Returns a string that represents the current UIGridLength.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current UIGridLength.

    Overrides
    ValueType.ToString()

    Operators

    operator ==(UIGridLength, UIGridLength)

    Compares two UIGridLength structures for equality.

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

    The first UIGridLength.

    UIGridLength b

    The second UIGridLength.

    Returns
    Type Description
    bool

    True if the structures are equal, otherwise false.

    implicit operator UIGridLength(double)

    Creates a UIGridLength from an number interpreted as a pixels.

    Declaration
    public static implicit operator UIGridLength(double pixels)
    Parameters
    Type Name Description
    double pixels
    Returns
    Type Description
    UIGridLength

    operator !=(UIGridLength, UIGridLength)

    Compares two UIGridLength structures for inequality.

    Declaration
    public static bool operator !=(UIGridLength gl1, UIGridLength gl2)
    Parameters
    Type Name Description
    UIGridLength gl1

    The first UIGridLength.

    UIGridLength gl2

    The first UIGridLength.

    Returns
    Type Description
    bool

    True if the structures are unequal, otherwise false.

    Implements

    IEquatable<T>

    Extension Methods

    LoggingExtensions.Log<T>(T)
    In this article
    DevToys logo © 2024 DevToys