Gets or sets a number of months currently represented by the calendar. The default value is 1. This is a dependency property.

Namespace:  C1.WPF.C1Schedule
Assembly:  C1.WPF.C1Schedule (in C1.WPF.C1Schedule.dll)

Syntax

C#
public int MonthCount { get; set; }
Visual Basic (Declaration)
Public Property MonthCount As Integer
	Get
	Set

Remarks

A default UI of the control is designed so as to fit as many child C1MonthCalendar controls as can fit in current control size, taking into account the size of each single month calendar which is determined by the MonthWidth and MonthHeight properties. As a result, when control is resized, a value of the MonthCount is changed automatically. This behavior is accomplished by using the AutoDistributionGrid panel as a part of the MonthsPanel template, which is set up as follows:

Examples

Copy CodeC#
<ItemsPanelTemplate> 
  <local:AutoDistributionGrid 
    FitCellsOfWidth="{Binding Path=MonthWidth, RelativeSource={RelativeSource 
      AncestorType={x:Type local:C1MultiMonthCalendar}}}" 
    FitCellsOfHeight="{Binding Path=MonthHeight, RelativeSource={RelativeSource 
      AncestorType={x:Type local:C1MultiMonthCalendar}}}"
    CellCount="{Binding Mode=OneWayToSource, Path=MonthCount, 
    RelativeSource={RelativeSource 
      AncestorType={x:Type local:C1MultiMonthCalendar}}}"/>
</ItemsPanelTemplate>

This is a dependency property.

See Also