IRangeValueProvider.Value 属性

定义

获取控件的值。

public:
 property double Value { double get(); };
public double Value { get; }
member this.Value : double
Public ReadOnly Property Value As Double

属性值

Double

如果控件不支持,则控件或 null (Nothing Visual Basic) 的值(如果控件不支持Value)。

示例

以下示例演示自定义控件此方法的实现。 出于此示例的目的,自定义控件通过其基色的 alpha 设置显示值。

/// <summary>
/// Specifies the current value of the control.
/// </summary>
/// <remarks>
/// For the purposes of this sample, the custom control displays 
/// its value through the alpha setting of the base color.
/// </remarks>
public double Value
{
    get 
    {
        return customControl.colorAlpha; 
    }
}
''' <summary>
''' Specifies the current value of the control.
''' </summary>
''' <remarks>
''' For the purposes of this sample, the custom control displays 
''' its value through the alpha setting of the base color.
''' </remarks>
Public ReadOnly Property Value() As Double Implements IRangeValueProvider.Value
    Get
        Return customControl.colorAlpha
    End Get
End Property

适用于

另请参阅