Skip to main content
A newer version of this page is available. .
All docs
V21.2

SchedulerControl.CustomizeAppointmentTemplate Event

Allows you to hide specific HTML elements at runtime, or change their CSS style properties.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Scheduler

Declaration

public event CustomizeAppointmentTemplateEventHandler CustomizeAppointmentTemplate

Event Data

The CustomizeAppointmentTemplate event's data class is DevExpress.XtraScheduler.CustomizeAppointmentTemplateEventArgs.

Remarks

Use the e.HtmlElementInfo method to obtain a required HTML element. Once the element is located, change its Hidden property to control the element’s visibility, or call the Style.SetProperty method to modify CSS style properties.

private void OnCustomizeAppointmentTemplate(object sender, CustomizeAppointmentTemplateEventArgs e) {
    var templateImage = e.HtmlElementInfo.FindElementById("dinner_icon");
    if (...)
        templateImage.Hidden = true; // Hide the HTML element
    templateImage.Style.SetProperty("height", "32px"); // Modify the CSS property
}

Refer to the following help article for more information: HTML Templates in Scheduler.

See Also