# C1.WPF.FlexGrid.ICellFactory

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_FlexGrid_ICellFactory" data-uid="C1.WPF.FlexGrid.ICellFactory" class="text-break">ICellFactory Interface
</h1>
  <div class="markdown level0 summary"><p>Defines the functionality of classes used to create grid cells dynamically.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.FlexGrid.html">C1.WPF.FlexGrid</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.FlexGrid.4.6.2.dll</h6>
  <h5 id="C1_WPF_FlexGrid_ICellFactory_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public interface ICellFactory</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Interface ICellFactory</code></pre>
  </div>
  <h5 id="C1_WPF_FlexGrid_ICellFactory_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>The <a class="xref" href="C1.WPF.FlexGrid.C1FlexGrid.html">C1FlexGrid</a> fully virtualizes rows and columns. Cells are created
only when their row and column are visible to the user. In this case, a class that
implements the <b>ICellFactory</b> interface is used to create the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a>
objects that represent the cells. When cells are scrolled out of view, the same
class is notified so it can properly dispose of the cell or recycle it for future use.</p>
</div>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_FlexGrid_ICellFactory_CreateCell_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.ICellFactory.CreateCell(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.ICellFactory.CreateCell.html#C1_WPF_FlexGrid_ICellFactory_CreateCell_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_">CreateCell(C1FlexGrid, CellType, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> responsible for representing a grid
cell of a given type at the given coordinates.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_ICellFactory_CreateCellEditor_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.ICellFactory.CreateCellEditor(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.ICellFactory.CreateCellEditor.html#C1_WPF_FlexGrid_ICellFactory_CreateCellEditor_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_">CreateCellEditor(C1FlexGrid, CellType, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> responsible for editing the value in a grid
cell at the given coordinates.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_ICellFactory_DisposeCell_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_System_Windows_FrameworkElement_" data-uid="C1.WPF.FlexGrid.ICellFactory.DisposeCell(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,System.Windows.FrameworkElement)">
          <a class="xref" href="C1.WPF.FlexGrid.ICellFactory.DisposeCell.html#C1_WPF_FlexGrid_ICellFactory_DisposeCell_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_System_Windows_FrameworkElement_">DisposeCell(C1FlexGrid, CellType, FrameworkElement)</a>
        </td>
        <td class="markdown level1 summary"><p>Disposes of a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> when its associated cell is scrolled
out of view.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
