# C1.Framework.XViewLight.GetBounds

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Framework_XViewLight_GetBounds_" data-uid="C1.Framework.XViewLight.GetBounds*">GetBounds Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Framework_XViewLight_GetBounds_" data-uid="C1.Framework.XViewLight.GetBounds*"></a>
<h4 id="C1_Framework_XViewLight_GetBounds_C1_Framework_Element_System_Boolean_System_Boolean_" data-uid="C1.Framework.XViewLight.GetBounds(C1.Framework.Element,System.Boolean,System.Boolean)">GetBounds(Element, bool, bool)</h4>
<div class="markdown level1 summary"><p>Gets the rectangle that contains a given element.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected Rectangle GetBounds(Element e, bool contentArea = false, bool clip = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Function GetBounds(e As Element, Optional contentArea As Boolean = False, Optional clip As Boolean = False) As Rectangle</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.Framework.Element.html">Element</a></td>
      <td><span class="parametername">e</span></td>
      <td><p><a class="xref" href="C1.Framework.XViewLight.Element.html#C1_Framework_XViewLight_Element">Element</a> to locate.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">contentArea</span></td>
      <td><p>Whether to get the bounds of the whole element or just the content area.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">clip</span></td>
      <td><p>Whether to clip the rectangle based on ancestor elements.</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.drawing.rectangle">Rectangle</a></td>
      <td><p>Bounds of element <code class="paramref">e</code>, in client coordinates.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Framework_XViewLight_GetBounds_C1_Framework_Element_System_Boolean_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is similar to the <a class="xref" href="C1.Framework.Element.GetBounds.html#C1_Framework_Element_GetBounds_C1_Framework_Element_">GetBounds(Element)</a> method in the
<a class="xref" href="C1.Framework.XViewLight.Element.html#C1_Framework_XViewLight_Element">Element</a> class.</p>
</div>
</div>
