[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Collapse]PDF Viewer
   [Expand]Getting Started
   [Expand]Access and Edit Document Content
    [Collapse]Getting Started
      How to: Add a PDF Viewer at Design Time
      How to: Add a PDF Viewer via Code
      How to: Load a PDF Document from a Stream
      How to: Load a PDF Document from a Uri
    [Expand]Interactive Form
    [Expand]UI Customization
    [Expand]Text Markup Annotations
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Add a PDF Viewer at Design Time

This example describes how to add a PdfViewerControl to your WPF application at design time within Visual Studio.

To accomplish this task, perform the following actions:

  • Run Microsoft Visual Studio 2012, 2013, 2015 or 2017.
  • Create a new WPF Application project.
  • Add a PdfViewerControl component to the project.

    To do this, drag the PdfViewerControl from the DX.18.2: Data & Analytics Toolbox tab and drop it onto the main window.

  • Right-click the PDF Viewer and select Layout | Reset All to fill the entire window.

    After this action, your XAML appears as follows.

    Note that you can add the PdfViewerControl by overwriting your MainWindow.xaml file with this code without dragging the PdfViewerControl control to the window. However, in this case, you need to manually add references to the following libraries.

    • DevExpress.Data.v18.2.dll
    • DevExpress.Mvvm.v18.2.dll
    • DevExpress.Pdf.v18.2.Core.dll
    • DevExpress.Pdf.v18.2.Drawing.dll
    • DevExpress.Xpf.Core.v18.2.dll
    • DevExpress.Xpf.Docking.v18.2.dll
    • DevExpress.Xpf.DocumentViewer.v18.2.Core.dll
    • DevExpress.Xpf.Grid.v18.2.dll
    • DevExpress.Xpf.PdfViewer.v18.2.dll

    To add references, right-click References in the Solution Explorer and select Add Reference… in the invoked context menu.


    Normally, when adding references to these assemblies, you should choose them from the Global Assembly Cache (GAC). However, if you prefer to copy them locally, or need to include them later in your product installation, you can find copies of them in the following directory.

    C:\Program Files (x86)\DevExpress 18.2\Components\Bin\Framework\

    Now, you have a PDF Viewer added to our application.

Is this topic helpful?​​​​​​​