A newer version of this page is available. Switch to the current version.

DocumentViewerControl.ZoomMode Property

Specifies the current document zoom mode. This is a dependency property.

Namespace: DevExpress.Xpf.DocumentViewer

Assembly: DevExpress.Xpf.DocumentViewer.v19.2.Core.dll


public ZoomMode ZoomMode { get; set; }
Public Property ZoomMode As ZoomMode

Property Value

Type Description

A ZoomMode enumeration value.


The ZoomMode property's default value is ActualSize that corresponds to 100%. You can change this property value in XAML ...

      <dxp:DocumentPreviewControl x:Name="documentPreview" ZoomMode="FitToWidth" />

... or in code behind.

using DevExpress.Xpf.DocumentViewer;

// ...
XtraReport1 report = new XtraReport1();
documentPreview.DocumentSource = report;
documentPreview.ZoomMode = ZoomMode.FitToWidth;

You can also use the ZoomFactor property to specify a custom zoom value. This sets the ZoomMode property to Custom automatically.

The Document Preview's Toolbar provides commands to zoom a document.

See Also