# GrapeCity.Wpf.SpreadSheet.CellType.UniversalCellType.ContainsFocus

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Wpf_SpreadSheet_CellType_UniversalCellType_ContainsFocus_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.UniversalCellType.ContainsFocus*">ContainsFocus Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Wpf_SpreadSheet_CellType_UniversalCellType_ContainsFocus_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.UniversalCellType.ContainsFocus*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_CellType_UniversalCellType_ContainsFocus_System_Windows_FrameworkElement_System_Windows_IInputElement_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.UniversalCellType.ContainsFocus(System.Windows.FrameworkElement,System.Windows.IInputElement)">ContainsFocus(FrameworkElement, IInputElement)</h4>
<div class="markdown level1 summary"><p>Gets a boolean value indicates whether the focus scope of <code class="paramref">element</code> belong to <code class="paramref">editor</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected override bool ContainsFocus(FrameworkElement editor, IInputElement element)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overrides Function ContainsFocus(editor As FrameworkElement, element As IInputElement) As Boolean</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="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a></td>
      <td><span class="parametername">editor</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> object indicates the cell editor.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iinputelement">IInputElement</a></td>
      <td><span class="parametername">element</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iinputelement">IInputElement</a> object indicates the focused element.</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.boolean">bool</a></td>
      <td><p><code>true</code> if the focus scope of <code class="paramref">element</code> belong to <code class="paramref">editor</code>; otherwise, <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.CellTypeBase.ContainsFocus.html#GrapeCity_Wpf_SpreadSheet_CellType_CellTypeBase_ContainsFocus_System_Windows_FrameworkElement_System_Windows_IInputElement_">CellTypeBase.ContainsFocus(FrameworkElement, IInputElement)</a></div>
</div>
