ComponentOne DateTimeEditors for WPF and Silverlight
Step 1 of 3: Creating an Application with a C1DateTimePicker Control
C1DateTimePicker Control Help > C1DateTimePicker Quick Start > Step 1 of 3: Creating an Application with a C1DateTimePicker Control

In this step, you'll begin in Visual Studio to create a WPF or Silverlight application using C1DateTimePicker.

Complete the following steps:

  1. In Visual Studio, select File | New | Project.
  2. In the New Project dialog box, select WPF Application or Silverlight Application.
  3. Enter a Name and Location for your project and click OK to create the new application.
  4. If you created a WPF project, in the Toolbox, double-click the C1DateTimePicker icon to add the C1DateTimePicker control to the WPF application. 
    If you created a Silverlight project, follow these steps:        
    1. In the XAML window of the project, resize the UserControl by changing DesignWidth="400" DesignHeight="300" to DesignWidth="Auto" DesignHeight="Auto" in the tag so that it appears similar to the following:
      XAML
      Copy Code
      <UserControl x:Class="SilverlightApplication24.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" mc:Ignorable="d" d:DesignWidth="Auto" d:DesignHeight="Auto">
      

      The UserControl will now resize to accommodate any content placed within it.

    2. In the XAML window of the project, place the cursor between the <Grid> and </Grid> tags and click once. Note that you cannot currently add Silverlight controls directly to the design area in Visual Studio, so you must add them to the XAML window as directed in the next step.
    3. Navigate to the Toolbox and double-click the C1DateTimePicker icon to add the control to the grid. The XAML markup resembles the following:
      XAML
      Copy Code
      <Grid x:Name="LayoutRoot">
          <c1datetime:C1DateTimePicker></c1datetime:C1DateTimePicker>
      </Grid>
      

You have completed the first step of the C1DateTimePicker quick start. In this step, you created a project and added a C1DateTimePicker control to it. In the next step, you'll customize the control.