windowsforms-devexpress-dot-documentview-dot-controls-dot-documentviewerbase-59c53a96.md
Specifies the document assigned to the DocumentViewer.
Namespace : DevExpress.DocumentView.Controls
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[Browsable(false)]
public IDocument Document { get; set; }
<Browsable(False)>
Public Property Document As IDocument
| Type | Description |
|---|---|
| IDocument |
An object implementing the IDocument interface. (Typically, this is a Document object.)
|
To specify an object that will serve as a document provider, use the DocumentViewer.DocumentSource property.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Document 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.
protected virtual void OnApplicationButtonClick() {
this.dvInfo.Document = Control.GetPrintPreviewDocument(new RibbonFormPreviewMemoPrintStyle(Controller.EditedAppointmentCopy));
this.dvInfo.ExecCommand(DevExpress.XtraPrinting.PrintingSystemCommand.ZoomToWholePage);
Protected Overridable Sub OnApplicationButtonClick()
Me.dvInfo.Document = Control.GetPrintPreviewDocument(New MemoPrintStyle())
Me.dvInfo.ExecCommand(DevExpress.XtraPrinting.PrintingSystemCommand.ZoomToWholePage)
See Also