# C1.WPF.Grid.FlexGrid.GetPageImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Grid_FlexGrid_GetPageImage_" data-uid="C1.WPF.Grid.FlexGrid.GetPageImage*">GetPageImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Grid_FlexGrid_GetPageImage_" data-uid="C1.WPF.Grid.FlexGrid.GetPageImage*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_GetPageImage_C1_WPF_Grid_GridCellRange_C1_WPF_Grid_GridScaleMode_" data-uid="C1.WPF.Grid.FlexGrid.GetPageImage(C1.WPF.Grid.GridCellRange,C1.WPF.Grid.GridScaleMode)">GetPageImage(GridCellRange, GridScaleMode)</h4>
<div class="markdown level1 summary"><p>Gets a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> that represents a given part of the grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public FrameworkElement GetPageImage(GridCellRange rng, GridScaleMode scaleMode = GridScaleMode.ActualSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetPageImage(rng As GridCellRange, Optional scaleMode As GridScaleMode = GridScaleMode.ActualSize) As FrameworkElement</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a></td>
      <td><span class="parametername">rng</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a> to include in the image.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../C1.WPF.GridControl/C1.WPF.Grid.GridScaleMode.html">GridScaleMode</a></td>
      <td><span class="parametername">scaleMode</span></td>
      <td><p><a class="xref" href="../C1.WPF.GridControl/C1.WPF.Grid.GridScaleMode.html">GridScaleMode</a> that determine how will the image get scaled.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</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.windows.frameworkelement">FrameworkElement</a></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> that represents a given part of the grid.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_Grid_FlexGrid_GetPageImage_C1_WPF_Grid_GridCellRange_C1_WPF_Grid_GridScaleMode__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Remember to call <a class="xref" href="C1.WPF.Grid.FlexGrid.DisposePageImages.html#C1_WPF_Grid_FlexGrid_DisposePageImages">DisposePageImages()</a> after done using the page image to release memory.</p>
</div>


<a id="C1_WPF_Grid_FlexGrid_GetPageImage_" data-uid="C1.WPF.Grid.FlexGrid.GetPageImage*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_GetPageImage_C1_WPF_Grid_GridCellRange_System_Windows_Size_C1_WPF_Grid_GridScaleMode_" data-uid="C1.WPF.Grid.FlexGrid.GetPageImage(C1.WPF.Grid.GridCellRange,System.Windows.Size,C1.WPF.Grid.GridScaleMode)">GetPageImage(GridCellRange, Size, GridScaleMode)</h4>
<div class="markdown level1 summary"><p>Gets a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> that represents a given part of the grid stretched to desired size.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public FrameworkElement GetPageImage(GridCellRange rng, Size contentSize, GridScaleMode scaleMode = GridScaleMode.ActualSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetPageImage(rng As GridCellRange, contentSize As Size, Optional scaleMode As GridScaleMode = GridScaleMode.ActualSize) As FrameworkElement</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a></td>
      <td><span class="parametername">rng</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a> to include in the image.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Size</span></td>
      <td><span class="parametername">contentSize</span></td>
      <td><p>Size of the content area of pages in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../C1.WPF.GridControl/C1.WPF.Grid.GridScaleMode.html">GridScaleMode</a></td>
      <td><span class="parametername">scaleMode</span></td>
      <td><p><a class="xref" href="../C1.WPF.GridControl/C1.WPF.Grid.GridScaleMode.html">GridScaleMode</a> that determine how will the image get scaled.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</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.windows.frameworkelement">FrameworkElement</a></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> that represents a given part of the grid.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_Grid_FlexGrid_GetPageImage_C1_WPF_Grid_GridCellRange_System_Windows_Size_C1_WPF_Grid_GridScaleMode__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Remember to call <a class="xref" href="C1.WPF.Grid.FlexGrid.DisposePageImages.html#C1_WPF_Grid_FlexGrid_DisposePageImages">DisposePageImages()</a> after done using the page image to release memory.</p>
</div>
</div>
