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

DocumentPreviewControl Class

A control that you can use to publish (preview, print, and export) documents in WPF applications.

Namespace: DevExpress.Xpf.Printing

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

NuGet Package: DevExpress.Wpf.Printing

Declaration

public class DocumentPreviewControl :
    DocumentViewerControl,
    IParameterPanelHandler,
    IDocumentPreviewUI

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

Do the following to create a Print Preview to publish documents:

  1. Assign a document source to the DocumentPreviewControl’s DocumentSource property.

    The following types of document sources are supported:

    • An object that implements the IReport interface.
    • An object that implements the ILink interface.
    • A Stream that contains report document data.
    • A string that contains a path to a file that stores report document data (a PRNX file).
  2. If you use an IReport or ILink object as a document source, call the document source’s CreateDocument method or set the DocumentPreviewControl’s RequestDocumentCreation property to True 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