Back to Devexpress

DXCalendar.CustomYearCellAppearance Event

maui-devexpress-dot-maui-dot-editors-dot-dxcalendar-3b65c187.md

latest2.1 KB
Original Source

DXCalendar.CustomYearCellAppearance Event

Allows you to customize years.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public event EventHandler<CustomSelectableCellAppearanceEventArgs> CustomYearCellAppearance

Event Data

The CustomYearCellAppearance 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:DXCalendar CustomYearCellAppearance="CustomYearCellAppearance"/>

See Also

DXCalendar Class

DXCalendar Members

DevExpress.Maui.Editors Namespace