GridLength Struct

Summary

Holds the width or height of a Grid's column and row definitions.
Namespace
Avalonia.Controls
Interfaces
Base Types
  • object
  • ValueType
graph TD Base0["ValueType"]-->Type Base1["object"]-->Base0 Interface0["IEquatable<GridLength>"]-.->Type Type["GridLength"] class Type type-node

Syntax

public struct GridLength : ValueType, IEquatable<GridLength>

Constructors

Name Summary
GridLength(double) Initializes a new instance of the GridLength struct.
GridLength(double, GridUnitType) Initializes a new instance of the GridLength struct.

Properties

Name Value Summary
Auto GridLength
Gets an instance of GridLength that indicates that a row or column should auto-size to fit its content.
static
GridUnitType GridUnitType
Gets the unit of the GridLength.
IsAbsolute bool
Gets a value that indicates whether the GridLength has a GridUnitType of Pixel.
IsAuto bool
Gets a value that indicates whether the GridLength has a GridUnitType of Auto.
IsStar bool
Gets a value that indicates whether the GridLength has a GridUnitType of Star.
Value double
Gets the length.

Methods

Name Value Summary
Equals(GridLength) bool
Compares two GridLength structures for equality.
Equals(object) bool
Determines whether the GridLength is equal to the specified object.
GetHashCode() int
Gets a hash code for the GridLength.
Parse(string) GridLength
Parses a string to return a GridLength.
static
ParseLengths(string) IEnumerable<GridLength>
Parses a string to return a collection of GridLengths.
static
ToString() string
Gets a string representation of the GridLength.

Operators

Name Value Summary
operator !=(GridLength, GridLength) bool
operator ==(GridLength, GridLength) bool