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 运行时结构,表示网格的行或列中可用空间度量的因子。

GridLengthHelper 是几个帮助程序类之一,旨在为Windows 运行时结构值提供实用工具方法。 C# 和 Microsoft Visual Basic 代码可以改用 GridLength 的成员,因为由于.NET Framework运行时支持,实用工具成员直接在结构上可用。 C++ 代码只能访问 GridLength 上的 数据值。 对于 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

适用于