Skip to main content
A newer version of this page is available.
All docs
V18.2
Row

WorksheetView.Zoom Property

Gets or sets the current zoom percentage used to display the worksheet.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v18.2.Core.dll

Declaration

int Zoom { get; set; }

Property Value

Type Description
Int32

An integer value specifying the zoom percentage.

Remarks

The image below shows a zoomed worksheet (the workbook is opened in Microsoft® Excel®).

Spreadsheet_Worksheet_ActiveView_Zoom

You can also use the DocumentOptions.ZoomMode property to specify whether the specified zoom setting should be applied to the current worksheet view only (WorksheetZoomMode.ActiveView) or propagated to all worksheet views (WorksheetZoomMode.AllViews, the default value).

Note

The current versions of the WinForms, WPF and ASP.NET spreadsheet controls display the Normal worksheet view only.

Example

This example demonstrates how to zoom a worksheet view (Worksheet.ActiveView). To do this, set the WorksheetView.Zoom property to an integer value that specifies the required zoom factor for a worksheet view.

Note

To specify how a worksheet should be scaled when it is printed, use the WorksheetPrintOptions.Scale property of the object accessed via Worksheet.PrintOptions. Refer to the How to: Specify Print Settings document for details on how to specify print options for a worksheet.

// Zoom in the worksheet view. 
workbook.Worksheets[0].ActiveView.Zoom = 150;

The following code snippets (auto-collected from DevExpress Examples) contain references to the Zoom 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.

See Also