# C1.WPF.FlexGrid.CellFactory

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_FlexGrid_CellFactory" data-uid="C1.WPF.FlexGrid.CellFactory" class="text-break">CellFactory Class
</h1>
  <div class="markdown level0 summary"><p>Class that implements the default cell factory for a <a class="xref" href="C1.WPF.FlexGrid.C1FlexGrid.html">C1FlexGrid</a>.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">CellFactory</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="C1.WPF.FlexGrid.ICellFactory.html">ICellFactory</a></div>
    <div><a class="xref" href="C1.WPF.FlexGrid.ICustomCellRender.html">ICustomCellRender</a></div>
  </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_CellFactory_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class CellFactory : ICellFactory, ICustomCellRender</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class CellFactory
    Implements ICellFactory, ICustomCellRender</code></pre>
  </div>
  <h5 id="C1_WPF_FlexGrid_CellFactory_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>If you need to create custom cells, then you have to create a class that implements
the <a class="xref" href="C1.WPF.FlexGrid.ICellFactory.html">ICellFactory</a> interface and assign an instance of that class to the
<a class="xref" href="C1.WPF.FlexGrid.C1FlexGrid.CellFactory.html#C1_WPF_FlexGrid_C1FlexGrid_CellFactory">CellFactory</a> property.</p>
</div>
  <h3 id="constructors">Constructors
</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_CellFactory__ctor" data-uid="C1.WPF.FlexGrid.CellFactory.#ctor">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.-ctor.html#C1_WPF_FlexGrid_CellFactory__ctor">CellFactory()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <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_CellFactory_ApplyCellStyles_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_System_Windows_Controls_Border_" data-uid="C1.WPF.FlexGrid.CellFactory.ApplyCellStyles(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,C1.WPF.FlexGrid.CellRange,System.Windows.Controls.Border)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.ApplyCellStyles.html#C1_WPF_FlexGrid_CellFactory_ApplyCellStyles_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_System_Windows_Controls_Border_">ApplyCellStyles(C1FlexGrid, CellType, CellRange, Border)</a>
        </td>
        <td class="markdown level1 summary"><p>Allows derived classes to finish customizing cells after they have been
created and all styles have been applied.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_ApplyHoverStyle_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_System_Windows_Controls_Border_C1_WPF_FlexGrid_GridMouseOverMode_" data-uid="C1.WPF.FlexGrid.CellFactory.ApplyHoverStyle(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,C1.WPF.FlexGrid.CellRange,System.Windows.Controls.Border,C1.WPF.FlexGrid.GridMouseOverMode)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.ApplyHoverStyle.html#C1_WPF_FlexGrid_CellFactory_ApplyHoverStyle_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_System_Windows_Controls_Border_C1_WPF_FlexGrid_GridMouseOverMode_">ApplyHoverStyle(C1FlexGrid, CellType, CellRange, Border, GridMouseOverMode)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_CreateBottomLeftContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateBottomLeftContent(C1.WPF.FlexGrid.C1FlexGrid,System.Windows.Controls.Border,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateBottomLeftContent.html#C1_WPF_FlexGrid_CellFactory_CreateBottomLeftContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_">CreateBottomLeftContent(C1FlexGrid, Border, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the content of a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element used to display the value of the bottom left cells.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_CreateCell_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateCell(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateCell.html#C1_WPF_FlexGrid_CellFactory_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_CellFactory_CreateCellBorder_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateCellBorder(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateCellBorder.html#C1_WPF_FlexGrid_CellFactory_CreateCellBorder_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_">CreateCellBorder(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.controls.border">Border</a> element that represents the background and
border of a grid cell and contains the cell data.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_CreateCellContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateCellContent(C1.WPF.FlexGrid.C1FlexGrid,System.Windows.Controls.Border,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateCellContent.html#C1_WPF_FlexGrid_CellFactory_CreateCellContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_">CreateCellContent(C1FlexGrid, Border, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the content of a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element used to display the value of a data cell.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_CreateCellContentEditor_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateCellContentEditor(C1.WPF.FlexGrid.C1FlexGrid,System.Windows.Controls.Border,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateCellContentEditor.html#C1_WPF_FlexGrid_CellFactory_CreateCellContentEditor_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_">CreateCellContentEditor(C1FlexGrid, Border, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the content of a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element used to display the value of a data cell.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_CreateCellEditor_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateCellEditor(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateCellEditor.html#C1_WPF_FlexGrid_CellFactory_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_CellFactory_CreateColumnFooterContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateColumnFooterContent(C1.WPF.FlexGrid.C1FlexGrid,System.Windows.Controls.Border,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateColumnFooterContent.html#C1_WPF_FlexGrid_CellFactory_CreateColumnFooterContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_">CreateColumnFooterContent(C1FlexGrid, Border, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the content of a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element used to display the value of a column footer cell.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_CreateColumnHeaderContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateColumnHeaderContent(C1.WPF.FlexGrid.C1FlexGrid,System.Windows.Controls.Border,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateColumnHeaderContent.html#C1_WPF_FlexGrid_CellFactory_CreateColumnHeaderContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_">CreateColumnHeaderContent(C1FlexGrid, Border, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the content of a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element used to display the value of a column header cell.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_CreateRowHeaderContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateRowHeaderContent(C1.WPF.FlexGrid.C1FlexGrid,System.Windows.Controls.Border,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateRowHeaderContent.html#C1_WPF_FlexGrid_CellFactory_CreateRowHeaderContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_">CreateRowHeaderContent(C1FlexGrid, Border, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the content of a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element used to display the value of a row header cell.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_CreateTopLeftContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.CreateTopLeftContent(C1.WPF.FlexGrid.C1FlexGrid,System.Windows.Controls.Border,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.CreateTopLeftContent.html#C1_WPF_FlexGrid_CellFactory_CreateTopLeftContent_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_C1_WPF_FlexGrid_CellRange_">CreateTopLeftContent(C1FlexGrid, Border, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the content of a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element used to display the value of a row header cell.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_DisposeCell_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellType_System_Windows_FrameworkElement_" data-uid="C1.WPF.FlexGrid.CellFactory.DisposeCell(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellType,System.Windows.FrameworkElement)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.DisposeCell.html#C1_WPF_FlexGrid_CellFactory_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>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_GetBorderThickness_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.GetBorderThickness(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.GetBorderThickness.html#C1_WPF_FlexGrid_CellFactory_GetBorderThickness_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellRange_">GetBorderThickness(C1FlexGrid, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.thickness">Thickness</a> value that represents the thickness of the cell borders.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_GetCellPadding_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_GridPanel_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.GetCellPadding(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.GridPanel,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.GetCellPadding.html#C1_WPF_FlexGrid_CellFactory_GetCellPadding_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_GridPanel_C1_WPF_FlexGrid_CellRange_">GetCellPadding(C1FlexGrid, GridPanel, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.thickness">Thickness</a> value that specifies the padding applied between
the edge of the cell and its content area.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_GetErrorImage" data-uid="C1.WPF.FlexGrid.CellFactory.GetErrorImage">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.GetErrorImage.html#C1_WPF_FlexGrid_CellFactory_GetErrorImage">GetErrorImage()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.imaging.bitmapimage">BitmapImage</a> used to indicate that a data item has
one or more errors.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_GetSortDirection_C1_WPF_FlexGrid_CellRange__C1_WPF_FlexGrid_C1FlexGrid_" data-uid="C1.WPF.FlexGrid.CellFactory.GetSortDirection(C1.WPF.FlexGrid.CellRange@,C1.WPF.FlexGrid.C1FlexGrid)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.GetSortDirection.html#C1_WPF_FlexGrid_CellFactory_GetSortDirection_C1_WPF_FlexGrid_CellRange__C1_WPF_FlexGrid_C1FlexGrid_">GetSortDirection(ref CellRange, C1FlexGrid)</a>
        </td>
        <td class="markdown level1 summary"><p>Get column sort direction</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_IsSortSymbolRow_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellRange_" data-uid="C1.WPF.FlexGrid.CellFactory.IsSortSymbolRow(C1.WPF.FlexGrid.C1FlexGrid,C1.WPF.FlexGrid.CellRange)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.IsSortSymbolRow.html#C1_WPF_FlexGrid_CellFactory_IsSortSymbolRow_C1_WPF_FlexGrid_C1FlexGrid_C1_WPF_FlexGrid_CellRange_">IsSortSymbolRow(C1FlexGrid, CellRange)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value that determines whether to display sort symbols on a given a column header row.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_RequireMeasureByLayout" data-uid="C1.WPF.FlexGrid.CellFactory.RequireMeasureByLayout">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.RequireMeasureByLayout.html#C1_WPF_FlexGrid_CellFactory_RequireMeasureByLayout">RequireMeasureByLayout()</a>
        </td>
        <td class="markdown level1 summary"><p>This method will be used to check the cell content is customized or not.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_CellFactory_SetErrorTip_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_System_String_" data-uid="C1.WPF.FlexGrid.CellFactory.SetErrorTip(C1.WPF.FlexGrid.C1FlexGrid,System.Windows.Controls.Border,System.String)">
          <a class="xref" href="C1.WPF.FlexGrid.CellFactory.SetErrorTip.html#C1_WPF_FlexGrid_CellFactory_SetErrorTip_C1_WPF_FlexGrid_C1FlexGrid_System_Windows_Controls_Border_System_String_">SetErrorTip(C1FlexGrid, Border, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets an error tooltip on a cell, honoring the grid's ErrorStyle property.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
