CustomAppointmentBackgroundEventArgs.Background Property
Gets or sets a background color for the appointment.
Namespace: DevExpress.Xpf.Scheduling
Assembly: DevExpress.Xpf.Scheduling.v26.1.dll
NuGet Package: DevExpress.Wpf.Scheduling
Declaration
Property Value
| Type | Description |
|---|---|
| Brush | A Brush descendant used to paint the appointment background. |
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