Skip to main content

SchedulerSettings.InitAppointmentImages Property

Enables custom images to be displayed within appointments.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public AppointmentImagesEventHandler InitAppointmentImages { get; set; }

Property Value

Type Description
AppointmentImagesEventHandler

A method to which custom processing is delegated.

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.

@Html.DevExpress().Scheduler(
    settings => {
        settings.Name = "scheduler";
        ...
        settings.InitAppointmentImages = (sender, 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);
        };
}).Bind(Model.Appointments, Model.Resources).GetHtml()
See Also