# Using Templates

**RadCalendar** provides a collection of dynamic templates that customize the presentation of calendar days on a "per day" basis. The templates can contain any type of control or simple image and are particularly useful if you want to implement a scheduler-like interface with extra-information, such as images that illustrate events, links to additional sources, etc. This behavior is supported using the RadCalendar **SpecialDays** collection of **RadCalendarDay** objects. **RadCalendarDay** has a **TemplateItem** property of type **RadHostItem** that accepts a **Control** in the constructor.

In the example below a **PictureBox** control is created and assigned an image from an **ImageList**. A new instance of **RadHostItem** is created passing the picture box in its constructor.  Finally we set the **TemplateItem** property of the special day.  When the day is rendered the associated image is displayed in the cell for that day. The example assumes that you have an instance of `ImageList` on the form populated with at least one image and at least one special day added to the **SpecialDays** collection of **RadCalendar**.

> caption Figure 1: RadCalendar with a picture box added to a cell.

![WinForms RadCalendar With a Picture Box Added to a Cell](https://www.telerik.com/products/winforms/documentation/assets/44539c4761a224eaca30f320391ceee4/calendar-customizing-appearance-using-templates001.png)

#### Assigning a TemplateItem

```C#
System.Windows.Forms.PictureBox pictureBox = new System.Windows.Forms.PictureBox();
pictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
pictureBox.Image = imageList1.Images[0];
RadHostItem hostItem = new RadHostItem(pictureBox);
radCalendar1.SpecialDays[0].TemplateItem = hostItem;
```

```VB.NET
Dim pictureBox As New PictureBox()
pictureBox.SizeMode = PictureBoxSizeMode.StretchImage
pictureBox.Image = ImageList1.Images(0)
Dim hostItem As New RadHostItem(pictureBox)
RadCalendar1.SpecialDays(0).TemplateItem = hostItem
```

## See Also

* [Themes](https://www.telerik.com/products/winforms/documentation/controls/calendar/customizing-appearance/styling)

* [Formatting Items](https://www.telerik.com/products/winforms/documentation/controls/calendar/customizing-appearance/formatting-items)
