You can use the C1Gauge.Min and C1Gauge.Max properties to set a numeric range that the gauge would be limited to. You can customize the C1Gauge.Min and C1Gauge.Max values at design time, in XAML, and in code.
At Design Time
To set the C1Gauge.Min and C1Gauge.Max for the C1LinearGauge at run time, complete the following steps:
This will set C1Gauge.Min and C1Gauge.Max values.
In XAML
To set the C1LinearGauge control's C1Gauge.Min and C1Gauge.Max in XAML add Maximum="50" Minimum="-50" to the <cc1:C1LinearGauge> tag so that it appears similar to the following:
To write code in Source View
<cc1:C1LinearGauge Name="C1LinearGauge1" Maximum="50" Minimum="-50">
In Code
To set the C1LinearGauge control's C1Gauge.Min and C1Gauge.Max add the following code to your project:
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
C1LinearGauge1.Minimum = -50 C1LinearGauge1.Maximum = 50 |
To write the code in C:
C# |
Copy Code
|
---|---|
c1LinearGauge1.Minimum = -50; c1LinearGauge1.Maximum = 50; |
Run your project and observe:
The gauge will be limited to the selected range at run time.