Property Value
The zoom level of the viewer, where:- -1 indicates Fit Width mode,
- -2 indicates Fit Whole Page mode,
- A positive value indicates a specific zoom level (e.g., 1.0 for 100%).
Exception | Description |
---|---|
System.ArgumentOutOfRangeException | Thrown when the value is less than -2 or equal to 0. |
System.InvalidOperationException | Thrown when attempting to set the zoom level while in a mode where zoom is not enabled. |
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