語言

IRangeValueProvider.Value 屬性

定義

他懂得控制的價值。

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

屬性值

若控制項不支援 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

適用於

另請參閱