[]
Gets or sets the viewer's zoom level.
public float Zoom { get; set; }
Type | Description |
---|---|
float | The zoom level of the viewer, where:
|
The default value is 1f
, which corresponds to 100% zoom.
Setting the zoom level to -1 or -2 adjusts the view to fit the width or the entire page within the viewer's display area, respectively. Specifying a positive value sets the zoom to that specific level.
// Assuming 'viewer' is an instance of the Viewer class
viewer.Zoom = 1f; // 100% zoom
viewer.Zoom = -2; // Fit Whole Page
viewer.Zoom = 1.5f; // 150% zoom
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown when the value is less than -2 or equal to 0. |
InvalidOperationException | Thrown when attempting to set the zoom level while in a mode where zoom is not enabled. |