# C1.WPF.Schedule.AutoDistributionGrid.FitCellsOfWidth

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Schedule_AutoDistributionGrid_FitCellsOfWidth_" data-uid="C1.WPF.Schedule.AutoDistributionGrid.FitCellsOfWidth*">FitCellsOfWidth Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Schedule_AutoDistributionGrid_FitCellsOfWidth_" data-uid="C1.WPF.Schedule.AutoDistributionGrid.FitCellsOfWidth*"></a>
<h4 id="C1_WPF_Schedule_AutoDistributionGrid_FitCellsOfWidth" data-uid="C1.WPF.Schedule.AutoDistributionGrid.FitCellsOfWidth">FitCellsOfWidth</h4>
<div class="markdown level1 summary"><p>Allows the forcing of the <a class="xref" href="C1.WPF.Schedule.AutoDistributionGrid.html">AutoDistributionGrid</a> to generate cells
of the specified width, where a number of columns will be automatically
adjusted so as to fully fit a maximum number of cells in a current grid
width. The default value is <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double.nan">NaN</a>.
This is a dependency property.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public double FitCellsOfWidth { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property FitCellsOfWidth As Double</code></pre>
</div>
<h5 id="C1_WPF_Schedule_AutoDistributionGrid_FitCellsOfWidth_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
Setting <a class="xref" href="C1.WPF.Schedule.AutoDistributionGrid.FitCellsOfWidth.html#C1_WPF_Schedule_AutoDistributionGrid_FitCellsOfWidth">FitCellsOfWidth</a> to non Double.NaN value directs
grid to automatically create as many columns of the width specified as the 
property value
that can fully fit in the grid's width (but at least one). When grid width 
is being changed the number of columns is adjusted automatically.
</p>
</div>
</div>
