DataFormDateItem.PickerCustomDayOfWeekCellAppearance Event
Allows you to customize the appearance of day of the week cells in the default picker.
Namespace: DevExpress.Maui.DataForm
Assembly: DevExpress.Maui.Editors.dll
NuGet Package: DevExpress.Maui.Editors
Declaration
public event EventHandler<CustomDayOfWeekCellAppearanceEventArgs> PickerCustomDayOfWeekCellAppearance
Event Data
The PickerCustomDayOfWeekCellAppearance 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).
using DevExpress.Maui.DataForm;
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");
}
<dxdf:DataFormDateItem PickerCustomDayCellAppearance="CustomDayCellAppearance"
PickerCustomDayOfWeekCellAppearance="CustomDayOfWeekCellAppearance"/>
See Also