GridLengthHelper.FromValueAndType(Double, GridUnitType) 方法

定义

基于可能的像素数和 GridUnitType 创建新的 GridLength 值。 C# 代码应改用 GridLength (Double,GridUnitType) 构造函数。

public:
 static GridLength FromValueAndType(double value, GridUnitType type);
 static GridLength FromValueAndType(double const& value, GridUnitType const& type);
public static GridLength FromValueAndType(double value, GridUnitType type);
function fromValueAndType(value, type)
Public Shared Function FromValueAndType (value As Double, type As GridUnitType) As GridLength

参数

value
Double

double

数字值。 如果 指定为 ,则这可能是要指定的像素高度或宽度;如果 typetype 指定为 PixelStar,则为 因子。 如果 type 指定为 Auto,则忽略此值。

type
GridUnitType

枚举的值,指定 GridLength 表示的单元类型。

返回

创建的 GridLength

适用于