A newer version of this page is available. Switch to the current version.

SchedulerControl.AppointmentViewInfoCustomizing Event

Use this event to customize the appointment's appearance by modifying the style elements when it is painted.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v19.1.dll

Declaration

public event AppointmentViewInfoCustomizingEventHandler AppointmentViewInfoCustomizing
Public Event AppointmentViewInfoCustomizing As AppointmentViewInfoCustomizingEventHandler

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 following code snippet illustrates how you can emphasize with bold font, all appointments containing a certain name in a subject.


Font myFont = new Font("Segoe UI",8.25F, FontStyle.Bold);
//. . .
private void schedulerControl1_AppointmentViewInfoCustomizing(object sender, 
    DevExpress.XtraScheduler.AppointmentViewInfoCustomizingEventArgs e)
{
    if (e.ViewInfo.Appointment.Subject.Contains("vacation"))
        e.ViewInfo.Appearance.Font = myFont;
        //or
        //e.ViewInfo.Appearance.FontStyleDelta = Bold;
}
NOTE

This event enables you to change how the appointment is visualized. Do not modify appointment properties, and do not add or remove appointments within this event handler. An attempt to do so may result in an unhandled exception.

See Also