Back to Devexpress

TimeCellsControlBase.AppointmentViewInfoCustomizing Event

windowsforms-devexpress-dot-xtrascheduler-dot-reporting-dot-timecellscontrolbase.md

latest3.1 KB
Original Source

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.v25.2.Reporting.dll

NuGet Package : DevExpress.Win.SchedulerReporting

Declaration

csharp
public event AppointmentViewInfoCustomizingEventHandler AppointmentViewInfoCustomizing
vb
Public Event AppointmentViewInfoCustomizing As AppointmentViewInfoCustomizingEventHandler

Event Data

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

PropertyDescription
ViewInfoProvides 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:

csharp
private void dayViewTimeCells1_AppointmentViewInfoCustomizing(object sender, 
            AppointmentViewInfoCustomizingEventArgs e) {
        SchedulerColorSchema schema = GetResourceColorSchema(e.ViewInfo.Resource);
        e.ViewInfo.Appearance.BackColor = schema.Cell;
}
vb
Private Sub dayViewTimeCells1_AppointmentViewInfoCustomizing(ByVal sender As Object, _
        ByVal e As AppointmentViewInfoCustomizingEventArgs) _
        Handles dayViewTimeCells1.AppointmentViewInfoCustomizing
    Dim schema As SchedulerColorSchema = GetResourceColorSchema(e.ViewInfo.Resource)
    e.ViewInfo.Appearance.BackColor = schema.Cell
End Sub

See Also

AppointmentViewInfoCustomizing

TimeCellsControlBase Class

TimeCellsControlBase Members

DevExpress.XtraScheduler.Reporting Namespace