ComponentOne Gauge for UWP
Gauges for UWP Task-Based Help / Setting the Start Value
In This Topic
    Setting the Start Value
    In This Topic

    In this topic you'll change the C1LinearGauge control's C1Gauge.Value property. The C1Gauge.Value property determines the currently selected number. By default the C1LinearGauge control starts with its C1Gauge.Value set to 0 but you can customize this number at design time, in XAML, and in code. Note that although this topic sets the C1Gauge.Value of the C1LinearGauge control, the same steps can be used to customize the C1Gauge.Value of other controls.

    At Design Time

    To set the C1LinearGauge control's C1Gauge.Value property at run time, complete the following steps:

    1. Click the C1LinearGauge control once to select it.
    2. Navigate to the Properties window, and enter a number, for example "20", in the text box next to the C1Gauge.Value property.

    This will set the C1Gauge.Value property to the number you chose.

    In XAML

    For example, to set the C1Gauge.Value property add Value="20" to the
    <Gauge:C1LinearGauge> tag so that it appears similar to the following:

    Markup
    Copy Code
    <Gauge:C1LinearGauge Height="89" Margin="47,57,33,43" Name="C1LinearGauge1" Width="287" Value="20">
    

    In Code

    For example, to set the C1Gauge.Value property, add the following code to your project:

    Visual Basic
    Copy Code
    C1LinearGauge1.Value = 20
    

    C#
    Copy Code
    C1LinearGauge1.Value = 20;
    

     

    Run your project and observe:

    Initially the gauge's C1GaugePointer will be set to the C1Gauge.Value you selected:

     

    See Also