# GrapeCity.ActiveReports.Viewer.Win.Viewer.Zoom

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Zoom_" data-uid="GrapeCity.ActiveReports.Viewer.Win.Viewer.Zoom*">Zoom Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Zoom_" data-uid="GrapeCity.ActiveReports.Viewer.Win.Viewer.Zoom*"></a>
<h4 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Zoom" data-uid="GrapeCity.ActiveReports.Viewer.Win.Viewer.Zoom">Zoom</h4>
<div class="markdown level1 summary"><p>Gets or sets the viewer's zoom level.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public float Zoom { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><p>The zoom level of the viewer, where:</p>
<ul><li>-1 indicates Fit Width mode,</li><li>-2 indicates Fit Whole Page mode,</li><li>A positive value indicates a specific zoom level (e.g., 1.0 for 100%).</li></ul>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Zoom_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The default value is <code>1f</code>, which corresponds to 100% zoom.</p>
<p>
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.
</p>
</div>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Zoom_examples">Examples</h5>
<pre><code class="lang-csharp">// 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</code></pre>

<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Thrown when the value is less than -2 or equal to 0.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></td>
      <td><p>Thrown when attempting to set the zoom level while in a mode where zoom is not enabled.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
