Back to Devexpress

DateEdit.PickerCustomYearCellAppearance Event

maui-devexpress-dot-maui-dot-editors-dot-dateedit-4634f7f3.md

latest2.1 KB
Original Source

DateEdit.PickerCustomYearCellAppearance Event

Allows you to customize years in the default picker.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public event EventHandler<CustomSelectableCellAppearanceEventArgs> PickerCustomYearCellAppearance

Event Data

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

PropertyDescription
DateGets the processed day.
EllipseBackgroundColorGets or sets the color of the processed day’s selection ellipse.
IsSelectedGets whether the processed day is selected.
IsTrailingGets 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.

cs
using DevExpress.Maui.Editors;

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

See Also

DateEdit Class

DateEdit Members

DevExpress.Maui.Editors Namespace