Skip to main content
A newer version of this page is available. .

DocumentPreviewControl Class

A control used to publish (preview, print and export) documents in WPF applications.

Namespace: DevExpress.Xpf.Printing

Assembly: DevExpress.Xpf.Printing.v18.2.dll

Declaration

public class DocumentPreviewControl :
    DocumentViewerControl

The following members return DocumentPreviewControl objects:

Remarks

The DocumentPreviewControl allows you to choose between a Ribbon or Bars toolbar layout.

wpf-document-viewer-generate-ribbon-layout

To create a Print Preview for publishing documents that are supplied by a specific source, do the following.

  1. Assign an appropriate document source to the DocumentViewerControl.DocumentSource property of the current DocumentPreviewControl. The following types of document sources are supported.

    • An object implementing the IReport interface.
    • An object implementing the ILink interface.
    • A Stream containing report document data.
    • A string containing a path to a file that stores report document data (a PRNX file).
  2. If you are using an IReport or ILink object as a document source, call the document source’s CreateDocument method to generate a preview.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DocumentPreviewControl class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also