# GridLength 結構

## 定義

``public value class GridLength``
``````[System.Security.SecurityCritical]
public struct GridLength``````
``type GridLength = struct``
``Public Structure GridLength``

GridLength

## 建構函式

 使用指定的絕對值 (以像素為單位)，初始化 GridLength 結構的新執行個體。Initializes a new instance of the GridLength structure using the specified absolute value in pixels. 初始化 GridLength 結構的新執行個體，並指定要包含何種值。Initializes a new instance of the GridLength structure and specifies what kind of value it holds.

## 屬性

 取得 GridLength 的執行個體，這個執行個體所含值的大小是由內容物件的大小屬性決定。Gets an instance of GridLength that holds a value whose size is determined by the size properties of the content object. 取得 GridUnitType 的相關 GridLength。Gets the associated GridUnitType for the GridLength. 取得值，這個值指出 GridLength 是否包含以像素表示的值。Gets a value that indicates whether the GridLength holds a value that is expressed in pixels. 取得值，這個值表示 GridLength 所含值的大小是否由內容物件的大小屬性決定。Gets a value that indicates whether the GridLength holds a value whose size is determined by the size properties of the content object. 取得值，這個值表示 GridLength 是否包含以可用空間的加權比例表示的值。Gets a value that indicates whether the GridLength holds a value that is expressed as a weighted proportion of available space. 取得 Double，它表示 GridLength 的值。Gets a Double that represents the value of the GridLength.

## 方法

 判斷指定的 GridLength 是否等於目前的 GridLength。Determines whether the specified GridLength is equal to the current GridLength. 判斷指定的物件和目前的 GridLength 執行個體是否相等。Determines whether the specified object is equal to the current GridLength instance. 取得 GridLength 的雜湊碼。Gets a hash code for the GridLength. 傳回 String 的 GridLength 表示。Returns a String representation of the GridLength.

## 運算子

 比較兩個 GridLength 結構是否相等。Compares two GridLength structures for equality. 比較兩個 GridLength 結構，判斷它們是否不相等。Compares two GridLength structures to determine if they are not equal.