Back to Devexpress

DateColumn.PickerCustomYearCellAppearance Event

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

latest2.1 KB
Original Source

DateColumn.PickerCustomYearCellAppearance Event

Allows you to customize years in the default picker.

Namespace : DevExpress.Maui.DataGrid

Assembly : DevExpress.Maui.DataGrid.dll

NuGet Package : DevExpress.Maui.DataGrid

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 style to the current year.

cs
using DevExpress.Maui.DataForm;

private void CustomYearCellStyle(object sender, CustomSelectableCellStyleEventArgs e) {
    if(e.Date.Year == DateTime.Now.Year)
        e.TextColor = Color.FromHex("F44848");
}
xml
<dxg:DateColumn PickerCustomYearCellStyle="CustomYearCellStyle"/>

See Also

DateColumn Class

DateColumn Members

DevExpress.Maui.DataGrid Namespace