# Formatting Appointments

Appointments appearance in **RadScheduler** can be customized using the **AppointmentFormatting** event.

> note Appointment elements are created only for the currently visible cells and are being reused when scrolling or navigating backwards/forwards in the **RadScheduler** . In order to prevent applying the formatting to other appointment elements, all styles should be reset for the rest of the appointment elements.

The code snippet below demonstrates how to change the font, fore color, border color and text alignment for the selected appointment element:

#### Formatting Appointments

```C#
Font font = new Font("Verdana", 10f, FontStyle.Bold);
    
private void radScheduler1_AppointmentFormatting(object sender, Telerik.WinControls.UI.SchedulerAppointmentEventArgs e)
{
    if (e.AppointmentElement.Selected)
    {
        e.AppointmentElement.Font = font;
        e.AppointmentElement.ForeColor = Color.Fuchsia;
        e.AppointmentElement.TextAlignment = ContentAlignment.MiddleCenter;
        e.AppointmentElement.UseDefaultPaint = true;
        e.AppointmentElement.BorderColor = Color.Aqua;
        e.AppointmentElement.BorderBoxStyle = BorderBoxStyle.SingleBorder;
        e.AppointmentElement.BorderWidth = 3;
    }
    else
    {
        e.AppointmentElement.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local); 
        e.AppointmentElement.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local);
        e.AppointmentElement.ResetValue(LightVisualElement.TextAlignmentProperty, ValueResetFlags.Local);
        e.AppointmentElement.UseDefaultPaint = false;
        e.AppointmentElement.ResetValue(LightVisualElement.BorderColorProperty, ValueResetFlags.Local);
        e.AppointmentElement.ResetValue(LightVisualElement.BorderWidthProperty, ValueResetFlags.Local);
        e.AppointmentElement.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local);
    }
}

```

```VB.NET
Private font As New Font("Verdana", 10.0F, FontStyle.Bold)

Private Sub RadScheduler1_AppointmentFormatting(sender As Object, e As Telerik.WinControls.UI.SchedulerAppointmentEventArgs) Handles RadScheduler1.AppointmentFormatting
    If e.AppointmentElement.Selected Then
        e.AppointmentElement.Font = font
        e.AppointmentElement.ForeColor = Color.Fuchsia
        e.AppointmentElement.TextAlignment = ContentAlignment.MiddleCenter
        e.AppointmentElement.UseDefaultPaint = True
        e.AppointmentElement.BorderColor = Color.Aqua
        e.AppointmentElement.BorderBoxStyle = BorderBoxStyle.SingleBorder
        e.AppointmentElement.BorderWidth = 3
    Else
        e.AppointmentElement.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local)
        e.AppointmentElement.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local)
        e.AppointmentElement.ResetValue(LightVisualElement.TextAlignmentProperty, ValueResetFlags.Local)
        e.AppointmentElement.UseDefaultPaint = False
        e.AppointmentElement.ResetValue(LightVisualElement.BorderColorProperty, ValueResetFlags.Local)
        e.AppointmentElement.ResetValue(LightVisualElement.BorderWidthProperty, ValueResetFlags.Local)
        e.AppointmentElement.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local)
    End If
End Sub
```

> caption Figure 1: Formatting Appointments

![WinForms RadScheduler Formatting Appointments](https://www.telerik.com/products/winforms/documentation/assets/50521f57d90c6e33d90cddec67e4bb7c/scheduler-appearance-formatting-appointments001.png)

It is possible to change the appointments’ shape setting the SchedulerElement.**AppointmentShape** property to the desired shape. Changing the **AppointmentShape** will also change the shape of the shadow and the appointment type indicator (tentative/busy).#\_\[C#] \_

```C#
 this.radScheduler1.SchedulerElement.AppointmentShape = new HeartShape();

```

```VB.NET
Me.RadScheduler1.SchedulerElement.AppointmentShape = New HeartShape()
```

> caption Figure 2: Custom Shapes

![WinForms RadScheduler Custom Shapes](https://www.telerik.com/products/winforms/documentation/assets/93d110189747be99034af5af4acb92c8/scheduler-appearance-formatting-appointments002.png)

## See Also

* [Visual Style Builder](https://www.telerik.com/products/winforms/documentation/styling-and-appearance/visual-style-builder)
* [Using Default Themes](https://www.telerik.com/products/winforms/documentation/styling-and-appearance/using-default-themes)
* [Views](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/overview-and-structure)
* [Working with Appointments](https://www.telerik.com/products/winforms/documentation/controls/scheduler/appointments-and-dialogs/working-with-appointments)
