Back to Devexpress

How to: Zoom In and Out of a Worksheet

wpf-16322-controls-and-libraries-spreadsheet-examples-worksheets-how-to-zoom-in-and-out-of-a-worksheet.md

latest1.1 KB
Original Source

How to: Zoom In and Out of a Worksheet

  • Jun 07, 2019

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.

View Example

csharp
// Zoom in to the worksheet view. 
workbook.Worksheets[0].ActiveView.Zoom = 150;
vb
' Zoom in to the worksheet view. 
workbook.Worksheets(0).ActiveView.Zoom = 150