ComponentOne FinancialChart for UWP
Quick Start / Step 1: Adding FinancialChart to the Project
In This Topic
    Step 1: Adding FinancialChart to the Project
    In This Topic

    This step creates a new Visual Studio project and adds the FinancialChart control to it.

    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 C1FinancialChart control. The following references are added to the project:
      • C1.UWP.dll
      • C1.UWP.DX.dll
      • C1.UWP.FlexChart.dll
      • C1.UWP.FlexChart.Finance.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:

          <Page
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="using:FinancialChart"
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
          xmlns:Finance="using:C1.Xaml.Chart.Finance"
          x:Class="FinancialChart.MainPage1"
          mc:Ignorable="d">
      
          <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
              <Finance:C1FinancialChart ChartType="HeikinAshi"
                                        HorizontalAlignment="Left"
                                        Height="300" 
                                        Name="financialChart"
                                        VerticalAlignment="Top"
                                        Width="300">
                  <Finance:FinancialSeries Binding="High,Low,Open,Close,Volume" BindingX="Date">
                      <Finance:FinancialSeries.ItemsSource>
                          <Finance:QuoteCollection>
                              <Finance:Quote Close="23.23" Date="01/23/15" High="24.73" Low="20.16" Open="20.2" Volume="42593223"/>
                              <Finance:Quote Close="22.6" Date="01/26/15" High="24.39" Low="22.5" Open="23.67" Volume="8677164"/>
                              <Finance:Quote Close="21.3" Date="01/27/15" High="22.47" Low="21.17" Open="22" Volume="3272512"/>
                              <Finance:Quote Close="19.78" Date="01/28/15" High="21.84" Low="19.6" Open="21.62" Volume="5047364"/>
                              <Finance:Quote Close="18.8" Date="01/29/15" High="19.95" Low="18.51" Open="19.9" Volume="3419482"/>
                          </Finance:QuoteCollection>
                      </Finance:FinancialSeries.ItemsSource>
                  </Finance:FinancialSeries>
              </Finance:C1FinancialChart>
          </Grid>
      </Page>
      

    The FinancialChart control is successfully added to the project.