Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Sets or returns the percentage of standard size by which the worksheet will be magnified or reduced. Set this property to a value between 10 and 400.

Signature
C#
C#
 public int ZoomPercentage{ get; set; }
{signature}{signature:
}
Signature
vb.net
vb.net
Public Property ZoomPercentage() As Integer
{signature}
{remarks}
By default the worksheet will have a ZoomPercentage of 100, corresponding to the standard zoom level. Adjusting this property to a larger number will magnify the worksheet, making it so that the contents are larger but less can be displayed on the screen.  Setting this property to a smaller number will zoom out, revealing more of the worksheet.
{remarks}
{exceptions}
{exception:ArgumentException}Thrown if you set the property to a value that is less than 10 or greater than 400{exception}
{example}{code:csharp|title=C#}
Remarks

By default the worksheet will have a ZoomPercentage of 100, corresponding to the standard zoom level. Adjusting this property to a larger number will magnify the worksheet, making it so that the contents are larger but less can be displayed on the screen. Setting this property to a smaller number will zoom out, revealing more of the worksheet.

Exceptions
Exception
ArgumentException
ArgumentException

Thrown if you set the property to a value that is less than 10 or greater than 400

Example
Code Block
csharp
csharp
titleC#


          //--- Get Zoom
          int zoom = ws.ZoomPercentage;

          //--- Set Zoom
          ws.ZoomPercentage = 50;
        
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}


          '--- Get Zoom
          Dim zoom As Integer = ws.ZoomPercentage

          '--- Set Zoom
          ws.ZoomPercentage = 50
        
{code} {example}