# C1.Framework.XView.GetBounds

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Framework_XView_GetBounds_" data-uid="C1.Framework.XView.GetBounds*">GetBounds Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Framework_XView_GetBounds_" data-uid="C1.Framework.XView.GetBounds*"></a>
<h4 id="C1_Framework_XView_GetBounds_C1_Framework_Element_" data-uid="C1.Framework.XView.GetBounds(C1.Framework.Element)">GetBounds(Element)</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">public Rectangle GetBounds(Element e)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetBounds(e As Element) 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><span class="xref">C1.Framework.XView.Element</span> to locate.</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 class="implements">Implements</h5>
    <div><a class="xref" href="C1.Framework.IView.GetBounds.html#C1_Framework_IView_GetBounds_C1_Framework_Element_">IView.GetBounds(Element)</a></div>


<a id="C1_Framework_XView_GetBounds_" data-uid="C1.Framework.XView.GetBounds*"></a>
<h4 id="C1_Framework_XView_GetBounds_C1_Framework_Element_System_Boolean_System_Boolean_" data-uid="C1.Framework.XView.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">public Rectangle GetBounds(Element e, bool contentArea, bool clip)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetBounds(e As Element, contentArea As Boolean, clip As Boolean) 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><span class="xref">C1.Framework.XView.Element</span> 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 class="implements">Implements</h5>
    <div><a class="xref" href="C1.Framework.IView.GetBounds.html#C1_Framework_IView_GetBounds_C1_Framework_Element_System_Boolean_System_Boolean_">IView.GetBounds(Element, bool, bool)</a></div>
<h5 id="C1_Framework_XView_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
<span class="xref">C1.Framework.XView.Element</span> class, except this one takes the current <a class="xref" href="C1.Framework.ScrollableControl.ScrollPosition.html#C1_Framework_ScrollableControl_ScrollPosition">ScrollPosition</a>
into account.</p>
</div>
</div>
