Chart for WinRT > Getting Started > Quick Start > Step 1: Creating an Application with the C1Chart Control |
In this step you'll create a new Windows 8 Style application in Visual Studio 2012 and add the C1Chart control to a page.
XAML Copy Code<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> <Chart:C1Chart/> </Grid>
The chart will appear populated with some default data and a C1ChartLegend component will be positioned on the right edge of the control. In the next step we will populate the chart with new data.
XAML Copy Code <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> <Chart:C1Chart Margin="0,0,8,8" MinHeight="160" MinWidth="240" Name="c1Chart1"/> </Grid>
Note that if you run the application now, the chart appears empty since you haven't added data for it yet.
XAML Copy Code <Pagexmlns:Chart="using:C1.Xaml.Chart" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:QSAppTest" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Xaml="using:C1.Xaml" x:Class="QSAppTest.MainPage" mc:Ignorable="d"Loaded="Page_Loaded_1">
What You’ve Accomplished
You've successfully created a WinRT application containing a C1Chart control. In the next step, you'll add data for C1Chart.