Skip to main content

CustomAppointmentBackgroundEventArgs.Background Property

Gets or sets a background color for the appointment.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v23.2.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

public Brush Background { get; set; }

Property Value

Type Description
Brush

A Brush descendant used to paint the appointment background.

Example

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Background property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also