Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXCalendar.CustomDayOfWeekCellAppearance Event

Allows you to customize days of the week.

Namespace: DevExpress.Maui.Editors

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

#Declaration

C#
public event EventHandler<CustomDayOfWeekCellAppearanceEventArgs> CustomDayOfWeekCellAppearance

#Event Data

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

Property Description
DayOfWeek Gets the processed day of the week.

#Example

The example below shows how to apply a custom appearance to weekends (days in the calendar and days of the week).

Custom Day of Week Appearance

using DevExpress.Maui.Editors;

void CustomDayCellAppearance(object sender, CustomSelectableCellAppearanceEventArgs e) {
    if (e.Date.DayOfWeek == DayOfWeek.Saturday || e.Date.DayOfWeek == DayOfWeek.Sunday) {
        e.TextColor = Color.FromHex("F44848");
        if(e.IsTrailing)
            e.TextColor = Color.FromRgba(e.TextColor.Red, e.TextColor.Green, e.TextColor.Blue, 0.5);
    }
}

private void CustomDayOfWeekCellAppearance(object sender, CustomDayOfWeekCellAppearanceEventArgs e) {
    if(e.DayOfWeek == DayOfWeek.Saturday || e.DayOfWeek == DayOfWeek.Sunday)
        e.TextColor = Color.FromHex("F44848");
}
<dx:DXCalendar CustomDayCellAppearance="CustomDayCellAppearance"
               CustomDayOfWeekCellAppearance="CustomDayOfWeekCellAppearance"/>
See Also