共用方式為


IRangeValueProvider.Value 屬性

定義

取得控制項的值。

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

屬性值

Double

如果控制項不支援 Value ,則控制項的值或 null (Nothing 在 Visual Basic) 。

範例

下列範例示範自訂控制項的這個方法實作。 為了此範例的目的,自訂控制項會透過其基底色彩的 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

適用於

另請參閱