Back to Devexpress

DataFormDateItem.PickerCustomYearCellAppearance Event

maui-devexpress-dot-maui-dot-dataform-dot-dataformdateitem-63794927.md

latest2.2 KB
Original Source

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

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.DataForm;

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

See Also

DataFormDateItem Class

DataFormDateItem Members

DevExpress.Maui.DataForm Namespace