Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DocumentViewerControl.ZoomFactor Property

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

Namespace: DevExpress.Xpf.DocumentViewer

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

NuGet Package: DevExpress.Wpf.DocumentViewer.Core

#Declaration

public double ZoomFactor { get; set; }

#Property Value

Type Description
Double

A Double value that specifies the document zoom factor.

#Remarks

This property affects the ZoomMode property’s behavior. The zoom mode switches to Custom when you specify the ZoomFactor property.

The ZoomFactor property’s default value is 1 (corresponds to 100%), the minimum value is 0.1 (10%), the maximum value is 5 (500%).

You can use the Document Preview‘s toolbar commands to specify the document zoom factor.

Alternatively, specify this property from code as shown below.

using DevExpress.Xpf.Printing;
//...
documentPreviewControl.ZoomFactor = 5;
//...

You can also specify the ZoomFactor property in XAML.

<Window
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing">
      ... 
      <dxp:DocumentPreviewControl ZoomFactor="5" />
</Window>
See Also