# C1.WPF.FlexGrid.CellStyle.Apply

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_FlexGrid_CellStyle_Apply_" data-uid="C1.WPF.FlexGrid.CellStyle.Apply*">Apply Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_FlexGrid_CellStyle_Apply_" data-uid="C1.WPF.FlexGrid.CellStyle.Apply*"></a>
<h4 id="C1_WPF_FlexGrid_CellStyle_Apply_System_Windows_Controls_Border_C1_WPF_FlexGrid_SelectedState_" data-uid="C1.WPF.FlexGrid.CellStyle.Apply(System.Windows.Controls.Border,C1.WPF.FlexGrid.SelectedState)">Apply(Border, SelectedState)</h4>
<div class="markdown level1 summary"><p>Applies the attributes defined by this <a class="xref" href="C1.WPF.FlexGrid.CellStyle.html">CellStyle</a> to a cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;Please use Apply(Border) instead.&quot;)]
public virtual void Apply(Border bdr, SelectedState selState)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Please use Apply(Border) instead.&quot;)&gt;
Public Overridable Sub Apply(bdr As Border, selState As SelectedState)</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.controls.border">Border</a></td>
      <td><span class="parametername">bdr</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element that represents a cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.SelectedState.html">SelectedState</a></td>
      <td><span class="parametername">selState</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.SelectedState.html">SelectedState</a> value that reflects the cell's current selected state.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_FlexGrid_CellStyle_Apply_" data-uid="C1.WPF.FlexGrid.CellStyle.Apply*"></a>
<h4 id="C1_WPF_FlexGrid_CellStyle_Apply_System_Windows_Controls_Border_" data-uid="C1.WPF.FlexGrid.CellStyle.Apply(System.Windows.Controls.Border)">Apply(Border)</h4>
<div class="markdown level1 summary"><p>Applies the attributes defined by this <a class="xref" href="C1.WPF.FlexGrid.CellStyle.html">CellStyle</a> to a cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual void Apply(Border bdr)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Sub Apply(bdr As Border)</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.controls.border">Border</a></td>
      <td><span class="parametername">bdr</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.border">Border</a> element that represents a cell.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
