Skip to main content

DocumentViewer.DocumentSource Property

Specifies a document supplier for the DocumentViewer.

Namespace: DevExpress.XtraPrinting.Preview

Assembly: DevExpress.XtraPrinting.v22.1.dll

NuGet Package: DevExpress.Win.Printing


public object DocumentSource { get; set; }

Property Value

Type Default Description
Object null

A Object value.


Use the DocumentSource property to assign an object that will supply a document for the DocumentViewer. This object must implement the IDocumentSource interface (typically, this is an XtraReport, PrintingSystem or RemoteDocumentSource object).

You can specify this property at design time using the control’s smart tag.


When assigning the DocumentSource at runtime, additionally, call the CreateDocument method of a supplier object to generate a document ready to preview.

For more information, refer to the following tutorials.

See Also