Back to Devexpress

SchedulerControl.CustomizeAppointmentFlyoutTemplate Event

windowsforms-devexpress-dot-xtrascheduler-dot-schedulercontrol-f4a13cac.md

latest2.8 KB
Original Source

SchedulerControl.CustomizeAppointmentFlyoutTemplate Event

Allows you to dynamically customize elements of appointment flyout rendered from HTML-CSS templates.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public event EventHandler<CustomizeAppointmentFlyoutTemplateEventArgs> CustomizeAppointmentFlyoutTemplate
vb
Public Event CustomizeAppointmentFlyoutTemplate As EventHandler(Of CustomizeAppointmentFlyoutTemplateEventArgs)

Event Data

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

PropertyDescription
AppointmentGets an appointment for which the flyout is invoked.
HtmlElementGets an HTML Element whose properties you need to customize.
Resource

Remarks

The following code snippet applies a custom CSS style to an appointment within the HTML-CSS template:

csharp
private void schedulerControl1_CustomizeAppointmentFlyoutTemplate(object sender, DevExpress.XtraScheduler.CustomizeAppointmentFlyoutTemplateEventArgs args) {
    if ("Gym Training".Equals(args.Appointment.Subject)) {
        args.HtmlElement.FindElementById("content").ClassName = "Red";
    }
}
vb
Private Sub schedulerControl1_CustomizeAppointmentFlyoutTemplate(sender As Object, args As DevExpress.XtraScheduler.CustomizeAppointmentFlyoutTemplateEventArgs) Handles schedulerControl1.CustomizeAppointmentFlyoutTemplate
    If "Gym Training".Equals(args.Appointment.Subject) Then
        args.HtmlElement.FindElementById("content").ClassName = "Red"
    End If
End Sub

See Also

SchedulerControl Class

SchedulerControl Members

DevExpress.XtraScheduler Namespace