Back to Devexpress

DateColumn.PickerCustomDayOfWeekCellAppearance Event

maui-devexpress-dot-maui-dot-datagrid-dot-datecolumn.md

latest2.2 KB
Original Source

DateColumn.PickerCustomDayOfWeekCellAppearance Event

Allows you to customize days of the week in the default picker.

Namespace : DevExpress.Maui.DataGrid

Assembly : DevExpress.Maui.DataGrid.dll

NuGet Package : DevExpress.Maui.DataGrid

Declaration

csharp
public event EventHandler<CustomDayOfWeekCellAppearanceEventArgs> PickerCustomDayOfWeekCellAppearance

Event Data

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

PropertyDescription
DayOfWeekGets the processed day of the week.

Example

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

cs
using DevExpress.Maui.DataGrid;

void CustomDayCellStyle(object sender, CustomSelectableCellStyleEventArgs 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 CustomDayOfWeekCellStyle(object sender, CustomDayOfWeekCellStyleEventArgs e) {
    if(e.DayOfWeek == DayOfWeek.Saturday || e.DayOfWeek == DayOfWeek.Sunday)
        e.TextColor = Color.FromHex("F44848");
}
xml
<dxg:DateColumn PickerCustomDayCellStyle="CustomDayCellStyle"
                PickerCustomDayOfWeekCellStyle="CustomDayOfWeekCellStyle"/>

See Also

DateColumn Class

DateColumn Members

DevExpress.Maui.DataGrid Namespace