# Adding C1ReportViewer to the Application

## Content



Complete the following steps to add a [C1ReportViewer](/componentone/api/wpf/online-reportviewer/dotnet-framework-api/C1.WPF.ReportViewer.4.6.2/C1.WPF.ReportViewer.C1ReportViewer.html) control to your application:

1.  From the Visual Studio **File** menu select **New** and choose **Project**.
2.  In the **New Project** dialog box choose a language in the left-side menu, choose **.NET** **6.0** in the **Framework** drop-down list, and enter a name for the 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:
    *   C1.WPF
    *   C1.WPF.ReportViewer
    *   C1.WPF.RichTextBox
    *   C1.WPF.Zip
4.  Open the XAML view of the MainWindow.xaml file and add the XAML namespace to the UserControl tag with the following markup: `xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"`.
    
    The namespaces will now appear similar to the following:
    
    ```xml
    <Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    ```
    
    This is a unified namespace that will enable you to work with most ComponentOne WPF or Silverlight controls without adding multiple namespaces.
    
5.  Add the `<c1:C1ReportViewer x:Name="C1ReportViewer1" />` tag within the Grid tags on the page to add the [C1ReportViewer](/componentone/api/wpf/online-reportviewer/dotnet-framework-api/C1.WPF.ReportViewer.4.6.2/C1.WPF.ReportViewer.C1ReportViewer.html) control to the application.
    
    The XAML will appear similar to the following:
    
    ```xml
    <Grid x:Name="LayoutRoot" Background="White">
        <c1:C1ReportViewer x:Name="C1ReportViewer1" />
    </Grid>
    ```
    
    This will add a [C1ReportViewer](/componentone/api/wpf/online-reportviewer/dotnet-framework-api/C1.WPF.ReportViewer.4.6.2/C1.WPF.ReportViewer.C1ReportViewer.html) control named "C1ReportViewer1" to the application. If you run the application now, it will appear similar to the following image:
    
    ![](https://cdn.mescius.io/document-site-files/images/3fd48234-00af-4f48-bc8e-c47a6fc263dd/imagesext/image11_0.png)
    

You've successfully set up your application's user interface, but if you run your application now you'll see that the [C1ReportViewer](/componentone/api/wpf/online-reportviewer/dotnet-framework-api/C1.WPF.ReportViewer.4.6.2/C1.WPF.ReportViewer.C1ReportViewer.html) control currently contains no content. See the [Loading Documents into C1ReportViewer](/componentone/docs/wpf/online-reportviewer/reportviewerforwpfta/loadingdocumentsinto) topic for options for loading content.


> type=note
> **Note**: If the **C1ReportViewer** control was installed to the Visual Studio Toolbox, simply dragging the control onto a page will automatically perform all the steps above.