Back to Devexpress

DocumentViewerBase.Document Property

windowsforms-devexpress-dot-documentview-dot-controls-dot-documentviewerbase-59c53a96.md

latest3.4 KB
Original Source

DocumentViewerBase.Document Property

Specifies the document assigned to the DocumentViewer.

Namespace : DevExpress.DocumentView.Controls

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[Browsable(false)]
public IDocument Document { get; set; }
vb
<Browsable(False)>
Public Property Document As IDocument

Property Value

TypeDescription
IDocument

An object implementing the IDocument interface. (Typically, this is a Document object.)

|

Remarks

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.

winforms-scheduler-localizer-translate-ui/CS/SchedulerLocalizerExample/OutlookAppointmentForm.cs#L472

csharp
protected virtual void OnApplicationButtonClick() {
    this.dvInfo.Document = Control.GetPrintPreviewDocument(new RibbonFormPreviewMemoPrintStyle(Controller.EditedAppointmentCopy));
    this.dvInfo.ExecCommand(DevExpress.XtraPrinting.PrintingSystemCommand.ZoomToWholePage);

winforms-scheduler-localizer-translate-ui/VB/SchedulerLocalizationExample_VB/OutlookAppointmentForm.vb#L515

vb
Protected Overridable Sub OnApplicationButtonClick()
    Me.dvInfo.Document = Control.GetPrintPreviewDocument(New MemoPrintStyle())
    Me.dvInfo.ExecCommand(DevExpress.XtraPrinting.PrintingSystemCommand.ZoomToWholePage)

See Also

DocumentSource

DocumentViewerBase Class

DocumentViewerBase Members

DevExpress.DocumentView.Controls Namespace