LinearScale.Value Property

Gets or sets the scale's current value.

Namespace: DevExpress.XtraGauges.Core.Model

Assembly: DevExpress.XtraGauges.v20.1.Core.dll

Declaration

[Bindable(true)]
[DefaultValue(0F)]
public float Value { get; set; }
<Bindable(True)>
<DefaultValue(0F)>
Public Property Value As Single

Property Value

Type Default Description
Single

0

The scale's current value.

Remarks

A scale's minimum and maximum values are specified by the LinearScale.MinValue and LinearScale.MaxValue properties, respectively. Typically, you set the scale's Value in this range. However, you can set the value beyond this range, and then correct the range to have it include the specified Value.

When you assign a value to the Value property, the value is stored in an internal variable (let's call it internalValue). Reading the Value property returns the following values:

  • internalValue, if it falls in the range [MinValue; MaxValue];
  • MinValue, if internalValue is less than MinValue;
  • MaxValue, if internalValue is greater than MaxValue;

Only the value returned by the Value property is persisted. This means that the internalValue is not persisted, if it falls outside the range [MinValue; MaxValue].

To get the internalValue, use the LinearScale.GetInternalValue method.

The current value is displayed by the level bar represented by the LinearScaleLevelComponent class. To display the value, ensure that a level bar exists, and it's linked with the scale via its LinearScale property. If no level bar is associated with the scale, the current value will not be indicated.

Implements

DevExpress.XtraGauges.Core.Model.IScale.Value
See Also