ComponentOne Gauge for UWP
Gauges for UWP Quick Start / Step 3 of 4: Adding Code to the Application
In This Topic
    Step 3 of 4: Adding Code to the Application
    In This Topic

    In the previous step you created a new UWP style project and added Gauges for UWP controls to the application. In this step you'll add code to your application to customize it.
    Complete the following steps:

    1. Select View | Code to switch to Code view.
    2. Add the following imports statements to the top of the page:
    Visual Basic
    Copy Code
    Imports C1.Xaml
    Imports C1.Xaml.Gauge
    

    C#
    Copy Code
    using C1.Xaml;
    using C1.Xaml.Gauge;
    
    1. Add the code for the s1_ValueChanged_1 event handler to set the gauge and slider control values. It will look like the following:
    Visual Basic
    Copy Code
    Private Sub s1_ValueChanged_1(sender As Object, e As  RangeBaseValueChangedEventArgs)
        Me.c1lg1.Value = Me.s1.Value
        Me.c1rg1.Value = Me.s1.Value
        Me.c1kb1.Value = Me.s1.Value
    End Sub
    

    C#
    Copy Code
    private void s1_ValueChanged_1(object sender, RangeBaseValueChangedEventArgs e)
    {
        this.c1lg1.Value = this.s1.Value;
        this.c1rg1.Value = this.s1.Value;
        this.c1kb1.Value = this.s1.Value;
    }
    

    In this step you completed adding code to your application. In the next step you'll run the application and observe run-time interactions.

    See Also