# Calendar Templates

## Content

To provide a custom look for the C1Calendar control:

1. To define a general layout model for a calendar, the **C1Calendar.Template** property should be assigned; this is usually done through a Setter of a Style. The template may contain any UI elements, for example, grids with StackPanels and borders with anything, but in some area of the template tree, the following placeholder elements of the calendar should be placed:
    * [C1CalendarPresenter](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.C1CalendarPresenter.html) \- to designate a place where a days pane will appear;
    * [DaysOfWeekPresenter](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.DayOfWeekSlotPresenter.html) \- to designate a place where a days of week pane will appear;

    Note that each of the placeholders enumerated above is optional.
2. To define the Days pane UI, assign templates to the following properties:
    * C1Calendar [CalendarBase.DaysPanel](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.CalendarBase.DaysPanel.html) – defines a panel for the layout of day items;
    * C1Calendar [C1CalendarResources.DaySlotTemplate](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.C1CalendarResources.DaySlotTemplate.html) – defines a UI that represents each day. Bind the UI of this template using the "{Binding Path=DaySlot_Property}" markup extension, where DaySlot_Property is any property name of the DaySlot class;
    * C1Calendar [C1CalendarResources.DaySlotStyle](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.C1CalendarResources.DaySlotStyle.html) – allows you to define the properties of a root object of the UI tree representing a separate day. This root object is of the DaySlotPresenter type.
3. To define the Days of Week pane UI, assign templates to the following properties:
    * C1Calendar [CalendarBase.DaysOfWeekPanel](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.CalendarBase.DaysOfWeekPanel.html) – defines a panel for the layout of days of week items;
    * C1Calendar [CalendarBase.DayOfWeekSlotTemplate](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.CalendarBase.DayOfWeekSlotTemplate.html) – defines a UI that represents each day of the week. Bind the UI of this template using the "{Binding Path=DayOfWeekSlot_Property}" markup extension, where [DayOfWeek](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.DayOfWeekSlot.DayOfWeek.html) Property is any property of the [DayOfWeekSlot](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.DayOfWeekSlot.html) class;
    * C1Calendar [CalendarBase.DayOfWeekSlotStyle](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.CalendarBase.DayOfWeekSlotStyle.html) – allows you to define the properties of a root object of the UI tree representing a separate day. This object is of the [DayOfWeekSlotPresenter](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.DayOfWeekSlotPresenter.html) type.