IRangeValueProvider.Value Właściwość

Definicja

Pobiera wartość kontrolki.

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

Wartość właściwości

Double

Wartość kontrolki lub wartości null (Nothing w Visual Basic), jeśli kontrolka nie obsługuje Value.

Przykłady

W poniższym przykładzie pokazano implementację tej metody dla kontrolki niestandardowej. Na potrzeby tego przykładu kontrolka niestandardowa wyświetla wartość za pomocą ustawienia alfa koloru podstawowego.

/// <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

Dotyczy

Zobacz też