Componentone Toolbar for WPF and Silverlight
C1Toolbar Quick Start / Step 1 of 3: Adding Toolbar for WPF to your Project
In This Topic
    Step 1 of 3: Adding Toolbar for WPF to your Project
    In This Topic

    To set up your project and add a C1Toolbar control to your application, complete the following steps

    1. Create a new WPF or Silverlight project in Visual Studio.
    2. Add a reference to the C1.WPF and C1.WPF.C1Toolbar or C1.Silverlight and C1.Silverlight.C1Toolbar assemblies. In the Solution Explorer right-click on References and select Add Reference. In the Add Reference dialog box select the Browse tab. Browse for the C1.WPF.C1Toolbar.dll and C1.WPF.dll or C1.Silverlight.C1Toolbar.dll and C1.Silverlight.dll and select OK.
    3. Define the System and the C1.WPF.C1Toolbar or C1.Silverlight.C1Toolbar prefixes.

      WPF
      Copy Code
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns:c1toolbar="clr-namespace:C1.WPF.Toolbar;assembly=C1.WPF.Toolbar"
      
         

      Silverlight
      Copy Code
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns:c1toolbar="clr-namespace:C1.Silverlight.C1Toolbar;assembly=C1.Silverlight.C1Toolbar"
      

    4. Add two rows to the LayoutRoot Grid and set the Height of the first row to Auto.
      XAML
      Copy Code
      <Grid x:Name="LayoutRoot" Background="White">
          <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
          </Grid.RowDefinitions>
      </Grid>
      

       

    5. Drop a C1Toolbar onto the page within the first row and remove the default properties: Height="100" HorizontalAlignment="Left" Margin="174,34,0,0". Your XAML should now look like the following:

      XAML
      Copy Code
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto"/>
         <RowDefinition Height="*"/>
      </Grid.RowDefinitions>
         <c1:C1Toolbar Grid.Row="1" Name="c1Toolbar1">
         </c1:C1Toolbar>