# C1.WPF.Schedule.AutoDistributionGrid.ColumnCount

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Schedule_AutoDistributionGrid_ColumnCount_" data-uid="C1.WPF.Schedule.AutoDistributionGrid.ColumnCount*">ColumnCount Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Schedule_AutoDistributionGrid_ColumnCount_" data-uid="C1.WPF.Schedule.AutoDistributionGrid.ColumnCount*"></a>
<h4 id="C1_WPF_Schedule_AutoDistributionGrid_ColumnCount" data-uid="C1.WPF.Schedule.AutoDistributionGrid.ColumnCount">ColumnCount</h4>
<div class="markdown level1 summary"><p>Gets or sets a value that determines a number of columns in the
<a class="xref" href="C1.WPF.Schedule.AutoDistributionGrid.html">AutoDistributionGrid</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 int ColumnCount { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property ColumnCount As Integer</code></pre>
</div>
<h5 id="C1_WPF_Schedule_AutoDistributionGrid_ColumnCount_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Use this property to specify a number of grid columns numerically.</p>
<p>
This property
value is being kept in sync with a number of items in the 
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.grid.columndefinitions">ColumnDefinitions</a> collection.
</p>
<p>
If a number of items in the 
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.grid.columndefinitions">ColumnDefinitions</a> collection has been changed
then the value of the <a class="xref" href="C1.WPF.Schedule.AutoDistributionGrid.ColumnCount.html#C1_WPF_Schedule_AutoDistributionGrid_ColumnCount">ColumnCount</a> property is updated automatically.
</p>
<p>
If a value of the <a class="xref" href="C1.WPF.Schedule.AutoDistributionGrid.ColumnCount.html#C1_WPF_Schedule_AutoDistributionGrid_ColumnCount">ColumnCount</a> property is changed directly, 
then items will be added or removed to/from the end of
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.grid.columndefinitions">ColumnDefinitions</a> collection until its number
becomes equal to the new <a class="xref" href="C1.WPF.Schedule.AutoDistributionGrid.ColumnCount.html#C1_WPF_Schedule_AutoDistributionGrid_ColumnCount">ColumnCount</a> value. 
</p>
</div>
</div>
