ComponentOne FlexChart for UWP
FlexChart / Quick Start / Step 1: Adding FlexChart to the Application
In This Topic
    Step 1: Adding FlexChart to the Application
    In This Topic

    In this step, we will create a new Visual Studio application, add the appropriate references for the project, and add XAML markup to create the FlexChart control.

    1. Create a new Universal Windows application:
      1. Select File | New | Project. The New Project dialog box opens.
      2. Select Templates | Visual C# | Windows | Universal. From the templates list, select Blank App (Universal Windows).
      3. Give your application a Name and click OK. Your new application in now created.
    2. Open the MainPage.xaml file and drag and drop the FlexChart control. The following references are added to the project:
      • C1.UWP.dll
      • C1.UWP.DX.dll
      • C1.UWP.FlexChart.dll
      If the references do not get added, add them manually - right-click the References folder in the Solution Explorer and select Add | New Reference.

      The necessary namespaces and control markup are added in the MainPage.xaml as shown:

      Copy Code
          xmlns:Chart="using:C1.Xaml.Chart" xmlns:Xaml="using:C1.Xaml" xmlns:Foundation="using:Windows.Foundation"
          <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
              <Chart:C1FlexChart x:Name="flexChart" HorizontalAlignment="Left" Height="300" VerticalAlignment="Top" Width="300" Xaml:C1NagScreen.Nag="True">
                  <Chart:Series Binding="Y" BindingX="X" SeriesName="Series 1">
                  <Chart:Series Binding="Y" BindingX="X" SeriesName="Series 2">
                  <Chart:Series Binding="Y" BindingX="X" SeriesName="Series 3">
    3. Run the application. You see the FlexChart as shown below.