Skip to main content
All docs
V18.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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