# Step 1 of 4: Creating a Windows Application

## Content

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](https://cdn.mescius.io/document-site-files/images/7e9deccd-1f1c-4ec7-af90-b4332b45dead/images/newprojectdialog.png)
> New Project Dialog Box

4. Select **WPF Application** or **Silverlight Application**, depending on the template you chose.
5. 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.
6. Add the following assemblies to your application by right-clicking the **References** folder and selecting **Add Reference**:
    * **WPF**: C1.WPF.x.dll
    * **Silverlight**: C1.Silverlight.x.dll
7. Click once on the form to select it, navigate to the Visual Studio Toolbox, and add a TextBlock and two Button controls (double-clicking on an item in the Toolbox to add it to the form).
8. Resize the form, and resize the controls on the form.

* Select each control in turn, and set the following properties for each in the Properties window:
* Set TextBlock1's Text property to "Click a button to open a dialog window:"
* Set Button1's Content property to "Open a modeless window."
* Set Button2's Content property to "Open a modal window."

 The XAML markup will appear similar to the following:

 ```xml
 <Grid>
         <TextBlock Height="23" Margin="10,10,31,0" Name="TextBlock1" VerticalAlignment="Top" Text="Click a button to open a dialog window:" />
         <Button Height="23" Margin="10,41,148,0" Name="Button1" VerticalAlignment="Top">Open a modeless window.</Button>
         <Button Margin="10,74,148,0" Name="Button2" Height="23" VerticalAlignment="Top">Open a modal window.</Button>
 </Grid>
 ```

 The form will appear similar to the following image:
 
 ![](https://cdn.mescius.io/document-site-files/images/7e9deccd-1f1c-4ec7-af90-b4332b45dead/images/windows/qsstep1.png)