Returns or sets zoom factor for the image, only valid when the view mode is set to -1 by -1.

Data type



.Zoom = 0.5;




The viewer will refresh to reflect the change of Zoom.
Before change the value of Zoom, make sure you have set the view mode to -1 by -1 using SetViewMode.
Also make sure you have set IfFitWindow to false.

The zoom value is expressed as a percentage. The valid range is from 2 to 6500 percent (Value: 0.02 ~ 65.0); the default value is 100 percent (Value: 1.0). A zoom value can be specified before or after an image is displayed. When the zoom value is changed, the displayed image will refresh automatically.

When an error occurs, check ErrorCode or ErrorString for error information.


if (DWObject)
    DWObject.SetViewMode(-1,-1);  // Zoom is valid only when the view mode is set to -1 by -1.
    DWObject.Zoom =  DWObject.Zoom * 1.2;  // Zoom in
    DWObject.Zoom =  DWObject.Zoom / 1.2;  // Zoom out

See also


Is this page helpful?

Leave a Reply

Your email address will not be published.