GridLengthHelper 類別

定義

提供協助程式方法來評估或設定 GridLength 值。 C# 和 Microsoft Visual Basic 程式碼應該改用 GridLength 的方法。

public ref class GridLengthHelper sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class GridLengthHelper final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class GridLengthHelper
Public NotInheritable Class GridLengthHelper
繼承
Object Platform::Object IInspectable GridLengthHelper
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

GridLength是一種Windows 執行階段結構,代表Grid資料列或資料行中可用空間測量的因素。

GridLengthHelper 是數個Helper類別的其中一個,旨在提供Windows 執行階段結構值的公用程式方法。 C# 和 Microsoft Visual Basic 程式碼可以改用 GridLength 的成員,因為因為.NET Framework執行時間支援而直接在 結構上提供公用程式成員。 C++ 程式碼只能存取 GridLength 上的 Value 資料值。 對於 C++ 開發人員而言,Microsoft Visual Basic 開發人員可以直接在 GridLength 上使用的公用程式功能,可在 GridLengthHelper 類別的靜態表單中使用。

屬性

Auto

取得對應至特殊 「Auto」 值的靜態 GridLength 值。 C# 和 Microsoft Visual Basic 程式碼應該改用 GridLength.Auto

方法

Equals(GridLength, GridLength)

提供兩個 GridLength 值的比較。 C# 和 Microsoft Visual Basic 程式碼應該改用 Equality 運算子或 GridLength.Equals 方法。

FromPixels(Double)

根據固定的圖元數建立新的 GridLength 值。 C# 和 Microsoft Visual Basic 程式碼應該改用 GridLength (Double) 建構函式。

FromValueAndType(Double, GridUnitType)

根據可能的圖元數目和GridUnitType建立新的GridLength值。 C# 和 Microsoft Visual Basic 程式碼應該改用 GridLength (Double、GridUnitType) 建構函式。

GetIsAbsolute(GridLength)

傳回評估的 GridLength 是否為特殊 「Absolute」 值。 C# 和 Microsoft Visual Basic 程式碼應該改用 GridLength.IsAbsolute

GetIsAuto(GridLength)

傳回評估的 GridLength 是否為特殊 「Auto」 值。 C# 和 Microsoft Visual Basic 程式碼應該改用 GridLength.IsAuto

GetIsStar(GridLength)

傳回評估的GridLength是否為特殊 「*」 (star 調整大小) 值。 C# 和 Microsoft Visual Basic 程式碼應該改用 GridLength.IsStar

適用於