CustomAppointmentBackgroundEventArgs.Background Property

Gets or sets a background color for the appointment.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v21.1.dll


public Brush Background { get; set; }

Property Value

Type Description

A Brush descendant used to paint the appointment background.


View Example

Private Sub SchedulerControl_CustomAppointmentBackground(ByVal sender As Object, ByVal e As CustomAppointmentBackgroundEventArgs)
    'Change the recurrent appointments' background to blanched almond color,
    'and other appointments - to rosy brown 
    e.Background = If(e.AppointmentItem.Type = AppointmentType.Occurrence, New SolidColorBrush(Colors.BlanchedAlmond), New SolidColorBrush(Colors.RosyBrown))

    'Change all-day appointments' background:
    e.Background = If(e.AppointmentItem.AllDay = True, New SolidColorBrush(Colors.Tomato), e.Background)
End Sub
See Also