The Scales property displays the range of values on your gauge.
The next step after adding a scale to your gauge is to Add Tick Marks to a Scale to a Gauge.
You can add scales to your gauge:
When you save and run your application after completing the following steps, your gauge should look similar to the gauge below. The scale on the gauge is not visible until you add tick marks.
To add scales to your gauge using the Gauge Designer:
In the Gauge Explorer, expand the Scales property.
Click Add Scale and select New Scale.
In the Properties panel, in the Sweep Angle pane set the following properties:
Start — 135
End — 405
In the Axis pane of the Sweep Angle pane, set the End Value to 100.00.
To add scales to your gauge at design time:
In the Gauges Collection editor window, click the Scales property. Then, click the ellipsis button to open the Scales editor.
In the editor, click Add to add a new Scales.
Set the EndAngle property to 405.
Set the StartAngle property to 135.
Click the Axis property. Then, from the drop-down list, select Numeric Axis.
Expand the Axis property and set the StartValue property to 0\.
Set EndValue to 100.
To add scales to your gauge at run time:
Add the following steps to the load event.
Create instances of the classes:
In Visual Basic:
Dim myScale As New RadialGaugeScale() Dim numericAxis1 As New NumericAxis()
In C#:
RadialGaugeScale myScale = new RadialGaugeScale(); NumericAxis numericAxis1 = new NumericAxis();
Set the following property:
Margin — (10, 10, 10, Pixels)
In Visual Basic:
myRadialGauge.Margin = New Margin(10, 10, 10, 10, Measure.Pixels)
In C#:
myRadialGauge.Margin = new Margin(10, 10, 10, 10, Pixels);
Set the following Axis property and add the numeric axis to the scale:
EndValue = 100
In Visual Basic:
numericAxis1.EndValue = 100 myScale.Axes.Add(numericAxis1)
In C#:
numericAxis1.EndValue = 100; myScale.Axes.Add(numericAxis1);
Set the following properties:
EndAngle — 405
StartAngle — 135
In Visual Basic:
myScale.EndAngle = 405 myScale.StartAngle = 135
In C#:
myScale.EndAngle = 405; myScale.StartAngle = 135;
Add your scales to the Scales collection:
In Visual Basic:
myRadialGauge.Scales.Add(myScale)
In C#:
myRadialGauge.Scales.Add(myScale);