CustomAppointmentBackgroundEventArgs.Background Property

Gets or sets a background color for the appointment.

Namespace: DevExpress.Xpf.Scheduling

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

Declaration

public Brush Background { get; set; }
Public Property Background As Brush

Property Value

Type Description
Brush

A Brush descendant used to paint the appointment background.

Examples

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