Skip to main content

LinearScale.Value Property

Gets or sets the scale’s current value.

Namespace: DevExpress.XtraGauges.Core.Model

Assembly: DevExpress.XtraGauges.v22.2.Core.dll

NuGet Package: DevExpress.Gauges.Core


public float Value { get; set; }

Property Value

Type Default Description
Single 0

The scale’s current value.


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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Value property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also