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
Declaration
Property Value
Type | Description |
---|---|
ZoomMode | A ZoomMode enumeration value. |
Remarks
The ZoomMode property's default value is ActualSize that corresponds to 100%. You can change this property value in XAML ...
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing">
...
<dxp:DocumentPreviewControl x:Name="documentPreview" ZoomMode="FitToWidth" />
</Window>
... or in code behind.
using DevExpress.Xpf.DocumentViewer;
// ...
XtraReport1 report = new XtraReport1();
documentPreview.DocumentSource = report;
report.CreateDocument();
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
Feedback