# C1.WPF.FlexGrid.RowColCollection-1.Frozen

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_FlexGrid_RowColCollection_1_Frozen_" data-uid="C1.WPF.FlexGrid.RowColCollection`1.Frozen*">Frozen Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_FlexGrid_RowColCollection_1_Frozen_" data-uid="C1.WPF.FlexGrid.RowColCollection`1.Frozen*"></a>
<h4 id="C1_WPF_FlexGrid_RowColCollection_1_Frozen" data-uid="C1.WPF.FlexGrid.RowColCollection`1.Frozen">Frozen</h4>
<div class="markdown level1 summary"><p>Gets or sets the number of frozen rows or columns in the collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int Frozen { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property Frozen As Integer</code></pre>
</div>
<h5 id="C1_WPF_FlexGrid_RowColCollection_1_Frozen_examples">Examples</h5>
<p>The code below implements an event handler that toggles row and column
freezing based on the cursor position (similar to the 'freeze panes' command
in Excel).</p>
<pre><code class="lang-csharp">// handle the Click event on the _chkFreeze CheckBox to
// freeze/unfreeze rows/columns
void _chkFreeze_Click(object sender, RoutedEventArgs e)
{
  if (_chkFreeze.IsChecked.Value)
  {
    // freeze rows and columns above and to the left of the cursor
    _flex.Rows.Frozen = _flex.Selection.Row;
    _flex.Columns.Frozen = _flex.Selection.Column;
  }
  else
  {
    // unfreeze rows and columns
    _flex.Rows.Frozen = 0;
    _flex.Columns.Frozen = 0;
  }
}</code></pre>

</div>
