windowsforms-devexpress-dot-xtrascheduler-dot-schedulercontrol-b1a9adae.md
Allows you to hide specific HTML elements at runtime, or change their CSS style properties.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.dll
NuGet Package : DevExpress.Win.Scheduler
public event CustomizeAppointmentTemplateEventHandler CustomizeAppointmentTemplate
Public Event CustomizeAppointmentTemplate As CustomizeAppointmentTemplateEventHandler
The CustomizeAppointmentTemplate event's data class is DevExpress.XtraScheduler.CustomizeAppointmentTemplateEventArgs.
Use the e.HtmlElement 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.HtmlElement.FindElementById("dinner_icon");
if (...)
templateImage.Hidden = true; // Hide the HTML element
templateImage.Style.SetProperty("height", "32px"); // Modify the CSS property
}
Private Sub OnCustomizeAppointmentTemplate(ByVal sender As Object, ByVal e As CustomizeAppointmentTemplateEventArgs)
Dim templateImage = e.HtmlElement.FindElementById("dinner_icon")
If ... Then
templateImage.Hidden = True ' Hide the HTML element
End If
templateImage.Style.SetProperty("height", "32px") ' Modify the CSS property
End Sub
Refer to the following help article for more information: HTML Templates in Scheduler.
See Also