OrgChart for WinRT
Step 1 of 3: Creating the C1OrgChart Application

In this step you'll create a Windows Store application using OrgChart for WinRTC1OrgChart allows you to create hierarchical diagrams that show the structure and relationships of your data. To set up your project and add a C1OrgChart control to your application, complete the following steps:

  1. In Visual Studio select File | New | Project.
  2. In the New Project dialog box, expand a language in the left pane, under the language select Windows Store, and in the templates list select Blank App (XAML).
  3. Enter a Name and click OK to create your project. Open the XAML view of the MainPage.xaml file; in this quick start you'll add controls using XAML markup.
  4. Navigate to the Toolbox and double-click the C1OrgChart icon. This will add the control to your application. This will add the reference and XAML namespace automatically.
  5. Add the following to the <OrgChart:C1OrgChart> tag:

The XAML markup should resemble the following:

Markup
Copy Code
<OrgChart:C1OrgChart Name="c1OrgChart1" ConnectorThickness="2" ConnectorStroke="Black" Orientation="Vertical" ChildSpacing="20,30" VerticalAlignment="Center" HorizontalAlignment="Center" >
  1. Place the following C1OrgChart.ItemTemplate between the <OrgChart:C1OrgChart> and </OrgChart:C1OrgChart> tags:
Markup
Copy Code
<OrgChart:C1OrgChart.ItemTemplate>
   <DataTemplate>
       <Border Background="#FF6AD400" Width="180" Height="90">
          <TextBlock Text="{Binding Name}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
       </Border>
   </DataTemplate>
</OrgChart:C1OrgChart.ItemTemplate>

You've successfully set up your application's user interface, but the C1OrgChart control currently contains no content. In the next step you'll add content to the C1OrgChart control.

See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback