[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].NET Core 3 Support
 [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]Getting Started
   [Expand]Fundamental Concepts
     Printing Links
     Document Preview
     Backstage Print Preview
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [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]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Document Preview

This topic describes the DocumentPreviewControl that is used to display an interactive document preview in WPF applications.

The topic consists of the following sections.

Expanded Overview

The Document Preview displays document data provided by a document source of one of the following supported document source types.

  • An object implementing the IReport interface.
  • An object implementing the ILink interface.
  • A System.IO.Stream containing report document data.
  • A string containing a path to a file that stores report document data (a PRNX file).

When a document is created, it is shown in the Document Preview.

Expanded Invoke the Document Preview

To show a document in a Document Preview, use one of the following approaches.

For more details, see Document Preview.

Expanded Main Features


The Document Preview can include a toolbar and menu that contain buttons used to view, navigate, edit, print and export a document. The following two toolbar types are supported.

Each toolbar button triggers a specific command. For example, clicking the Page Setup... button triggers the DocumentPreviewControl.PageSetupCommand and invokes the Page Setup dialog, which is shown in the following image.

Document Map Panel

If a document contains bookmarks, the Document Map panel becomes available and allows you to quickly navigate through the document.

Parameters Panel

If a report has visible parameters, the corresponding button that defines the visibility of the Parameters panel becomes available. The Parameters user interface allows you to modify parameter values and update the document accordingly.

Thumbnails Panel

The Thumbnails toolbar button changes the visibility of report thumbnails used to quickly navigate between document pages.

Search Panel

To search for a specific text throughout a document, invoke the dedicated Search panel by clicking the Search toolbar button.

Expanded Interactivity

Content Editing

If content editing is enabled for document elements, it is possible to customize the corresponding field values in the Document Preview (clicking a field will invoke an appropriate editor). To highlight all editing fields available in a document, click the Editing Fields toolbar button.

Drill-Down Reports

You can add the drill-down functionality to a report to display data partially. Hidden data can be accessed in the Document Preview by clicking the designated element.

Document Preview Mouse Events

You can provide interactivity to reports shown in a Document Preview using the Preview's mouse events (e.g., to create drill-through reports or enable data sorting directly in the preview).

For code samples, see the following examples online.

Expanded Customization

Expanded See Also

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