Basic Library for WPF and Silverlight | ComponentOne
WPF and Silverlight Edition Basic Library / Drop Down / DropDown 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 a WPF application or a Silverlight application using DropDown for WPF and Silverlight. When you add a C1DropDown control to your application, you'll have a complete, functional drop-down box interface that you can add images, controls, and other elements to. To set up your project and add a C1DropDown control to your application, complete the following steps:

    1. In Visual Studio, select File | New Project.

    2. In the New Project dialog box, select either Windows Desktop or Silverlight from the Templates in the left-hand pane.

      New Project Dialog Box

      New Project Dialog Box

         
    3. Select WPF Application or Silverlight Application, depending on the template you chose. 
    4. Enter a Name for your project, for example "QuickStart", and click OK. In a WPF Application, the MainWindow.xaml file will open.
      1. If you selected a Silverlight Application, when you click OK, the New Silverlight Application dialog box will appear.
      2. Click OK to accept default settings. This will close the New Silverlight Application dialog box and create your project.
      3. The MainPage.xaml file should open.
    5. Add the following assemblies to your application by right-clicking the References folder and selecting Add Reference:
    • WPF: C1.WPF.4.dll
    • Silverlight: C1.Silverlight.5.dll
    1. Navigate to the Visual Studio Toolbox, and double-click the C1DropDown icon to add the control to the window.
    2. Resize the Window and reposition the C1DropDown control in the Window.
    3. Navigate to the Properties window and set the C1DropDown control’s Height to 30 and Width to 100.

    The XAML will appear similar to the following:

    XAML
    Copy Code
    <c1:C1DropDown Name="C1DropDown1" Height="30" Width="100" />
    

    The page's Design view should now look similar to the following image (with the C1DropDown control selected on the form):

    You've successfully set up your application's user interface, but if you run your application now you’ll see that the C1DropDown control currently contains no content. In the next step you'll add content to the C1DropDown control, and then you'll observe some of the run-time interactions possible with the control.