Skip to main content

ArcScale.Ranges Property

Provides access to the collection of custom ranges with which you can mark specific value ranges along the scale.

Namespace: DevExpress.XtraGauges.Core.Model

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

NuGet Package: DevExpress.Gauges.Core


[XtraSerializableProperty(XtraSerializationVisibility.Collection, true)]
public virtual RangeCollection Ranges { get; }

Property Value

Type Description

A RangeCollection object that represents a collection of ranges.


Custom ranges in circular scales are fixed segments that are used to mark specific value ranges along scales. To create a custom range, add a DevExpress.XtraGauges.Core.Model.ArcScaleRange object to the Ranges collection. An ArcScaleRange object specifies the start and end value for the range, the color, the start and end thickness of the range and other options.

When a scale’s value falls into a specific range, the range’s Enter event raises. When the value leaves the range, the Leave event raises.


The following code shows how to add custom ranges to a circular gauge.

Two ranges are added to the ArcScale.Ranges collection. These are used to mark values from 20 to 70 in green, and values between 70 and 80 in red. The result is displayed below:


using DevExpress.XtraGauges.Core.Model;
using DevExpress.XtraGauges.Core.Drawing;

// Range 1
ArcScaleRange range1 = new ArcScaleRange();
range1.AppearanceRange.ContentBrush = new SolidBrushObject(Color.Red);
range1.StartValue = 70;
range1.EndValue = 80;
// Range 2
ArcScaleRange range2 = new ArcScaleRange();
range2.AppearanceRange.ContentBrush = new SolidBrushObject(Color.FromArgb(0,192,0));
range2.StartValue = 20;
range2.EndValue = 70;
// Add the ranges to the scale.
arcScaleComponent1.Ranges.AddRange(new ArcScaleRange[] {range1, range2});
See Also