Skip to main content

SchedulerControl.AppointmentViewInfoCustomizing Event

Use this event to customize the appointment’s appearance by modifying the style elements when it is painted. If the multi-threading is on, this event does not raise in the UI thread.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.1.dll

NuGet Package: DevExpress.Win.Scheduler

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

To implement conditional styling based on the appointment data, handle the AppointmentViewInfoCustomizing event use the appointment’s data as a condition to modify appearance properties. The following code snippet makes the same text bold in every appointment’s 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;
}

Important

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. Also, if the UseAsyncMode property is enabled, the AppointmentViewInfoCustomizing event raises in the non-UI thread. In this case, performing non-thread-safe operations may cause a deadlock.

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

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