ComponentOne RadialGauge for ASP.NET Web Forms
C1RadialGauge Concepts / Task-Based Help / Setting the Minimum and Maximum Values
In This Topic
    Setting the Minimum and Maximum Values
    In This Topic

    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.

    Note: When setting the C1Gauge.Min and C1Gauge.Max properties, the C1Gauge.Min should be smaller than the C1Gauge.Max. Also be sure to set the C1Gauge.Value property to a number within the C1Gauge.Min and C1Gauge.Max range (in the example below, the C1Gauge.Value is set to 0, which falls within the range set below).

    At Design Time
    To set the C1Gauge.Min and C1Gauge.Max for the C1RadialGauge at run time, complete the following steps:

    1. Click the C1RadialGauge control once to select it.
    2. Navigate to the Properties window, and enter a number, for example 50, next to the C1Gauge.Max property.
    3. In the Properties window, enter a number, for example -50, next to the C1Gauge.Min property.

    This will set C1Gauge.Min and C1Gauge.Max values.

    In XAML
    To set the C1RadialGauge control's C1Gauge.Min and C1Gauge.Max in XAML add Maximum="50" Minimum="-50" to the <cc1:C1RadialGauge> tag so that it appears similar to the following:

    <cc1:C1RadialGauge Name="C1RadialGauge1" Maximum="50" Minimum="-50">
    

    In Code
    To set the C1RadialGauge control's C1Gauge.Min and C1Gauge.Max add the following code to your project:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    C1RadialGauge1.Minimum = -50
    C1RadialGauge1.Maximum = 50

    To write code in C#

    C#
    Copy Code
    c1RadialGauge1.Minimum = -50;
    c1RadialGauge1.Maximum = 50;

    Run your project and observe:
    The gauge will be limited to the selected range at run time.

    See Also

    Narrative