Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TimeCellsControlBase.AppointmentViewInfoCustomizing Event

Enables you to customize the appointment’s appearance by modifying the style elements when it is printed.

Namespace: DevExpress.XtraScheduler.Reporting

Assembly: DevExpress.XtraScheduler.v24.2.Reporting.dll

NuGet Package: DevExpress.Win.SchedulerReporting

#Declaration

public event AppointmentViewInfoCustomizingEventHandler AppointmentViewInfoCustomizing

#Event Data

The AppointmentViewInfoCustomizing event's data class is AppointmentViewInfoCustomizingEventArgs. The following properties provide information specific to this event:

Property Description
ViewInfo Provides access to the object which contains the information used to render the appointment.

#Remarks

If you need to implement conditional styling based on the appointment data, handle the AppointmentViewInfoCustomizing event, and modify any appearance property using the appointment’s data as a condition. The event is analogous to the SchedulerControl.AppointmentViewInfoCustomizing event of the Scheduler control.

The following code snippet paints the appointment with a color obtained from the color schema of the associated resource:

private void dayViewTimeCells1_AppointmentViewInfoCustomizing(object sender, 
            AppointmentViewInfoCustomizingEventArgs e) {
        SchedulerColorSchema schema = GetResourceColorSchema(e.ViewInfo.Resource);
        e.ViewInfo.Appearance.BackColor = schema.Cell;
}
See Also