Skip to main content
All docs
V18.2

How to: Add a PDF Viewer to the WinForms Application at Design Time

The following example demonstrates how to add the PdfViewer to a form at design time.

To add a PDF Viewer to the Windows Forms application at design time, do the following.

  1. Run Microsoft® Visual Studio® 2012, 2013, 2015 or 2017.
  2. Start a new project (by pressing CTRL+SHIFT+N) and create a new Windows Forms Application.

    win-create-new-application

  3. Open the Visual Studio designer and press CTRL+ALT+X to run the Toolbox. Expand the DX.18.2: Common Controls category, and drop the PdfViewer control onto the main form of the application.

    toolbox-common-controls-pdf-viewer

  4. Click the PdfViewer’s smart tag to invoke its actions list. In the actions list, click the Dock in parent container link. This allows the PDF Viewer to occupy all of the available spaces on the form.

    PDFViewerDockInContainer

    After docking the PDF Viewer, it will appear as follows.

    DockedPDFViewer

    The PdfViewer is now added to your application.

See Also