# Step 1 of 3: Creating a WPF/Silverlight Application

## Content



In this step you'll create a WPF/Silverlight application in Visual Studio using **OutlookBar for WPF and Silverlight**.

To set up your project and add a [C1OutlookBar](/componentone/api/wpf/online-outlookbar/dotnet-framework-api/C1.WPF.OutlookBar.4.6.2/C1.WPF.OutlookBar.C1OutlookBar.html) control to your application, complete the following steps:

1.  In Visual Studio, select **File | New | Project**. Note that Visual Studio 2010 is used to complete the steps in this quick start.
2.  In the **New Project** dialog box, select a language in the left pane (in this example, C# is used), and in the templates list select **WPF or Silverlight Application**.
3.  In the .NET Framework drop-down list, select **.NET Framework 3.5** or later.
4.  Enter a **Name** for your project and click **OK**. The **New WPF Application** or **New Silverlight Application** dialog box will appear.
5.  Uncheck the **Host the WPF or Silverlight application in a new Web site** box, if necessary, and click **OK**. The **MainWindow.xaml** file opens.
6.  In the XAML window of the project, place the cursor between the _\<Grid>_ and _\</Grid>_ tags and click once.
7.  Navigate to the Toolbox and drag the [C1OutlookBar](/componentone/api/wpf/online-outlookbar/dotnet-framework-api/C1.WPF.OutlookBar.4.6.2/C1.WPF.OutlookBar.C1OutlookBar.html) icon in between the _\<Grid>_ tags to add the [C1OutlookBar](/componentone/api/wpf/online-outlookbar/dotnet-framework-api/C1.WPF.OutlookBar.4.6.2/C1.WPF.OutlookBar.C1OutlookBar.html) to **MainWindow.xaml** or **MainPage.xaml**. The XAML markup will now look similar to the following:
    
    ```WPF
    <Window xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"  x:Class="WpfApplication17.MainWindow"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         Title="MainWindow" Height="350" Width="525">
        <Grid>
          <c1:C1OutlookBar />
        </Grid>
    </Window>
    ```
    
    ```SILVERLIGHT
    <UserControl x:Class="OutlookBar.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:DesignHeight="300" d:DesignWidth="400"
        xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:my="clr-namespace:C1.Silverlight;assembly=C1.Silverlight">
        <Grid x:Name="LayoutRoot" Background="White">
            <c1:C1OutlookBar c1:C1NagScreen.Nag="True">
            </c1:C1OutlookBar>
        </Grid>
    </UserControl>
    ```
    

In the next step, you will add [C1OutlookItem](/componentone/api/wpf/online-outlookbar/dotnet-framework-api/C1.WPF.OutlookBar.4.6.2/C1.WPF.OutlookBar.C1OutlookItem.html)**s** to the [C1OutlookBar](/componentone/api/wpf/online-outlookbar/dotnet-framework-api/C1.WPF.OutlookBar.4.6.2/C1.WPF.OutlookBar.C1OutlookBar.html).