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

DocumentViewer.DocumentSource Property

Specifies a document supplier for the DocumentViewer.

Namespace: DevExpress.XtraPrinting.Preview

Assembly: DevExpress.XtraPrinting.v18.2.dll

Declaration

[DefaultValue(null)]
public object DocumentSource { get; set; }

Property Value

Type Default Description
Object *null*

A Object value.

Remarks

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.

document-viewer-document-source-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.

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

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