Skip to main content

DocumentViewer Class

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

Namespace: DevExpress.Xpf.Printing

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

#Declaration

[DXToolboxBrowsable(true)]
public class DocumentViewer :
    Control

#Remarks

The DocumentViewer control enables you to select between a Ribbon or Bars toolbar layout.

document-viewer-silverlight-generate-ribbon-layout-smart-tag

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

  1. Create an appropriate DocumentPreviewModelBase class descendant (e.g., a PrintingSystemPreviewModel, ReportServicePreviewModel or DevExpress.Xpf.Printing.ReportPreviewModel) and assign it to the DocumentViewer.Model property.
  2. Assign an appropriate document source (e.g., a report, printing system, or report service) to the document preview model.
  3. Call the CreateDocument method of the document source.

    Do not call this method until the document source is assigned to a model.

To learn more, see the following tutorial: How to: Add a Print Preview to a Silverlight Application.

See Also