Skip to main content

ArcScale.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

Declaration

[Bindable(true)]
[DefaultValue(0F)]
public float Value { get; set; }

Property Value

Type Default Description
Single 0

The scale’s current value.

Remarks

A scale’s minimum and maximum values are specified by the ArcScale.MinValue and ArcScale.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 ArcScale.GetInternalValue method.

A needle (ArcScaleNeedle) linked to a scale automatically points to the scale’s current value. The current value is also indicated by a marker (ArcScaleMarker) and range bar (ArcScaleRangeBar) objects, linked to this scale.

Needle, marker and range bar objects can be linked to a scale via their ArcScale properties.

When the Value property changes, the ArcScale.ValueChanged event fires.

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

Note

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