CustomizeElementStyleEventArgs.IsAlternate Property
Gets a value that indicates whether an element is highlighted within the scheduler control.
Namespace: DevExpress.Web.ASPxScheduler
Assembly: DevExpress.Web.ASPxScheduler.v24.1.dll
NuGet Package: DevExpress.Web.Scheduler
Declaration
Property Value
Type | Description |
---|---|
Boolean |
|
Remarks
If the IsAlternate property is set to true
, a visual element can have a specific appearance. For example, a date header and date cell corresponding to today’s date can be highlighted within the scheduler control.
Example
This example demonstrates how to set a specific font color for a date header corresponding to today’s date. To do this, handle the ASPxScheduler.CustomizeElementStyle event. Use the CustomizeElementStyleEventArgs.ElementType property to obtain whether the processed element is a date header and the CustomizeElementStyleEventArgs.IsAlternate
property to determine whether the date header shows today’s date.
Assign the required font color to the corresponding property of the Style object returned by the CustomizeElementStyleEventArgs.Style property.
using DevExpress.Web.ASPxScheduler;
using System.Drawing;
// ...
protected void ASPxScheduler1_CustomizeElementStyle(object sender, CustomizeElementStyleEventArgs e) {
if (e.ElementType == WebElementType.DateHeader && e.IsAlternate == true) {
e.Style.ForeColor = Color.Coral;
}
}