IRangeValueProvider.Value Eigenschaft

Definition

Ruft den Wert des Steuerelements ab.

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

Eigenschaftswert

Double

Der Wert des Steuerelements oder null (Nothing in Visual Basic), wenn das Steuerelement nicht unterstützt Valuewird.

Beispiele

Das folgende Beispiel zeigt eine Implementierung dieser Methode für ein benutzerdefiniertes Steuerelement. Für die Zwecke dieses Beispiels zeigt das benutzerdefinierte Steuerelement den Wert über die Alphaeinstellung seiner Basisfarbe an.

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

Gilt für

Siehe auch