Skip to main content

DataFormDateItem.PickerCustomYearCellAppearance Event

Allows you to customize the appearance of the year cells in the default picker.

Namespace: DevExpress.Maui.DataForm

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

Declaration

public event EventHandler<CustomSelectableCellAppearanceEventArgs> PickerCustomYearCellAppearance

Event Data

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

Property Description
Date Gets the processed day.
EllipseBackgroundColor Gets or sets the color of the processed day’s selection ellipse.
IsSelected Gets whether the processed day is selected.
IsTrailing Gets whether the processed day belongs to the previous or next month.

Example

The example below shows how to apply a custom appearance to the current year.

Custom Year Appearance in Calendar

using DevExpress.Maui.DataForm;

private void CustomYearCellAppearance(object sender, CustomSelectableCellAppearanceEventArgs e) {
    if(e.Date.Year == DateTime.Now.Year)
        e.TextColor = Color.FromHex("F44848");
}
<dxdf:DataFormDateItem PickerCustomYearCellAppearance="CustomYearCellAppearance"/>
See Also