Skip to main content

AppointmentViewInfo Class

Contains information used for appointment visualization.

Namespace: DevExpress.Web.ASPxScheduler.Drawing

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

NuGet Package: DevExpress.Web.Scheduler

Declaration

public class AppointmentViewInfo :
    IAppointmentViewInfo,
    IAppointmentView

The following members return AppointmentViewInfo objects:

Remarks

The AppointmentViewInfo object is available using the AppointmentViewInfoCustomizingEventArgs.ViewInfo property in the ASPxScheduler.AppointmentViewInfoCustomizing event handler.

Example

The following code illustrates how to change the color of all appointments containing “Ind” substring in their Appointment.Subject and paint the status line differently for odd and even days.

AppointmentViewInfoCustomizing Event

using System.Drawing;
// ...

protected void ASPxScheduler1_AppointmentViewInfoCustomizing(object sender, DevExpress.Web.ASPxScheduler.AppointmentViewInfoCustomizingEventArgs e)
{
    if (e.ViewInfo.Appointment.Subject.Contains("Ind"))
        e.ViewInfo.AppointmentStyle.BackColor = Color.IndianRed; 
    Color color = (e.ViewInfo.Appointment.Start.Day % 2 == 0) ? Color.Red : Color.Green;
    Color statusColor = (e.ViewInfo.Appointment.Start.Day % 2 == 0) ? Color.Yellow : Color.Pink;
    e.ViewInfo.StatusBackgroundColor = color;
    e.ViewInfo.StatusColor = statusColor;
}

Implements

DevExpress.XtraScheduler.Drawing.IAppointmentView

Inheritance

Object
AppointmentViewInfo
See Also