# Step 1: Setting up the Application

## Content



In this step, you begin by creating a WPF or Silverlight application and adding the **PdfViewer** control to create a functional document viewer interface that displays PDF files.

1.  Create a new WPF or Silverlight application in Visual Studio.
2.  Navigate to the Toolbox and locate the C1PdfViewer control icon.
3.  Double-click the C1PdfViewer icon to add the control to the MainWindow.
    
    ![](https://cdn.mescius.io/document-site-files/images/ee073b5e-3b7e-41ab-9da9-f678d7e94391/images/pdfviewermainwindow.png)
    
4.  Edit the XAML markup in the application to add relevant namespace and set the basic attributes of the control.
    
    ```xml
    <Window x:Class="PDFViewer_QuickStart.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">
        <Grid>
            <c1:C1PdfViewer x:Name="C1PdfViewer1" />
        </Grid>
    </Window>
    ```