Skip to main content

ASPxScheduler.InitAppointmentImages Event

Enables you to display custom images within appointments.

Namespace: DevExpress.Web.ASPxScheduler

Assembly: DevExpress.Web.ASPxScheduler.v24.2.dll

NuGet Package: DevExpress.Web.Scheduler

#Declaration

public event AppointmentImagesEventHandler InitAppointmentImages

#Event Data

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

Property Description
Appointment Gets the appointment related to the ASPxScheduler.InitAppointmentImages event.
ImageInfoList Provides access to a collection of images used to paint an appointment in a scheduler’s View.
ViewInfo Provides access to the view information for an appointment when the ASPxScheduler.InitAppointmentImages event occurs.

#Remarks

The InitAppointmentImages event occurs before an appointment is rendered when its images are initialized. This event lets you display custom images within appointments. The event parameter properties allow identification of the current appointment and specify the images to be displayed within the appointment.

protected void ASPxScheduler1_InitAppointmentImages(object sender, AppointmentImagesEventArgs e) {
    ImageProperties imageProperties = new ImageProperties("~/ImageHandler.ashx?imgId=" + e.Appointment.LabelKey.ToString());

    imageProperties.Width = 24;
    imageProperties.Height = 24;

    AppointmentImageInfo info = new AppointmentImageInfo();
    info.ImageProperties = imageProperties;

    e.ImageInfoList.Add(info);
}
See Also