ComponentOne Scheduler for WPF and Silverlight
Using the C1Calendar Control / C1Calendar Themes / Calendar Templates
In This Topic
    Calendar Templates
    In This Topic

    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:

      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 – defines a panel for the layout of day items;
      • C1Calendar C1CalendarResources.DaySlotTemplate – 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 – 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: