.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

WorksheetView.Zoom Property

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

Namespace: DevExpress.Spreadsheet

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

Declaration

int Zoom { get; set; }
Property Zoom As Integer
int Zoom { get; set; }
Property Zoom As Integer
int Zoom { get; set; }
Property Zoom As Integer

Property Value

Type Description
Int32

An integer value specifying the zoom percentage.

Property Value

Type Description
Int32

An integer value specifying the zoom percentage.

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.

Examples

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;
See Also