ComponentOne Carousel for WPF and Silverlight
C1CarouselPanel Quick Start / Step 1 of 3: Creating the Application
In This Topic
    Step 1 of 3: Creating the Application
    In This Topic

    In this step you'll create and set up an application. Note that in this example, you'll use images installed with the WPF and Silverlight Edition samples. If you choose, you can substitute other images but you will have to update the steps below. To set up your project, complete the following steps:

    1. From the Visual Studio File menu select New and choose Project.
    2. In the New Project dialog box choose a language and WPF Application or Silverlight Application in the left-side menu, choose .NET Framework 4 in the Framework drop-down list, and enter a name for the project. You may also need to select Silverlight 4 as the Silverlight version number if creating a Silverlight project. In this example the application will be named "QuickStart". If you name the project something else, in later steps you may need to change references to "QuickStart" with the name of your 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:
      • WPF: C1.WPF and C1.WPF.Carousel 
      • Silverlight: C1.Silverlight and C1.Silverlight.Carousel 
    4. Open the XAML view of the MainPage.xaml or MainWindow.xaml file; in this quick start you'll use XAML markup and code.
    5. Add the XAML namespace to the UserControl or Window tag with the following markup:

      The namespaces will now appear similar to the following:

      Silverlight XAML
      Copy Code
      <UserControl x:Class="QuickStart.MainPage"                      
        xmlns:c1="" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">

      WPF XAML
      Copy Code
      <Window x:Class="MainWindow"                        
          Title="MainWindow" Height="350" Width="525">

      This is a unified namespace that will enable you to work with most WPF or Silverlight Edition controls without adding multiple namespaces.

    6. In the Solution Explorer window, right-click the QuickStart.Web item and select Add │ New Folder to add a folder. Name the folder "Resources".
    7. In the Solution Explorer window, right-click the Resources folder and select Add │ New Folder to add a folder. Name the folder "covers".
    8. Right-click the covers folder and select Add Existing Item. This will open the Add Existing Item dialog box.
    9. In the Add Existing Item dialog box, locate the covers folder in the C1Extended_Demo sample folder, select all the files, and click Add. By default this sample should be located in Documents | ComponentOne Samples| WPF or Documents | ComponentOne Samples| Silverlight. Several images will be added to the application.
    10. Select all of the images you added in the Solutions Explorer (select the first image and press SHIFT and click on the last image) and set their Build Action to Resource in the Properties window.

    You've successfully created a new Silverlight application and added image resources to the application. In the next step you'll add a ListBox and create a C1CarouselPanel template to apply to the ListBox control.


    See Also