# Adding C1Carousel to the Application

## Content



Follow these steps to add a CarouselPanel control to your project:

1.  From the Visual Studio **File** menu select **New** and choose **Project**.
2.  In the **New Project** dialog box choose a language in the left-side menu, choose **.NET Framework 4** in the **Framework** drop-down list, and enter a name for the project.
3.  In the Solution Explorer, right-click the project name and choose **Add Reference**. In the **Add Reference** dialog box, locate and select the following assemblies and click **OK** to add references to your project:
    
    *   C1.Silverlight.dll
    *   C1.Silverlight.Carousel.dll
    
4.  Add the XAML namespace to the **UserControl** or **Window** tag with the following markup:
    
    ```xml
    xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
    ```
    
    The namespaces will now appear similar to the following:
    
    ```xml
    <UserControl x:Class="QuickStart.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
    mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">
    ```
    
5.  In the XAML view add a **Resources** tag just under the **UserControl** or **Window** tag and above the **Grid** tag with the following markup:
    
    ```WPF
    <Window.Resources>
    </Window.Resources>
    ```
    
    ```SILVERLIGHT
    <UserControl.Resources>   
    </UserControl.Resources>
    ```
    
    You will add templates within this tag.
    
6.  Add an **ItemsPanelTemplate** within the **Resources** tag to define the **C1CarouselPanel**:
    
    ```xml
    <ItemsPanelTemplate x:Key="carouselPanelTemplate">
    <c1:C1CarouselPanel Padding="0, 10, 50, 50" VerticalPathAlignment="Center" HorizontalItemAnchorOnPath="Center" VerticalItemAnchorOnPath="Center"/>
    </ItemsPanelTemplate>
    ```
    

You have now added a CarouselPanel to the page. If you run your application now, there will be an empty application displayed.

## See Also

[Adding and Moving Content in C1Carousel](/componentone/docs/wpf/online-carousel/C1CarouselPanel_Task_Based_Help/Adding_and_Moving_Content_in_C1Carousel)