Skip to main content

DXCalendar.CustomMonthCellStyle Event

Allows you to customize months.

Namespace: DevExpress.XamarinForms.Editors

Assembly: DevExpress.XamarinForms.Editors.dll

NuGet Package: DevExpress.XamarinForms.Editors

Declaration

public event EventHandler<CustomSelectableCellStyleEventArgs> CustomMonthCellStyle

Event Data

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

Property Description
Date Gets or sets 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 style to the current month in the calendar.

Custom Month Style in Calendar

using DevExpress.XamarinForms.Editors;

private void CustomMonthCellStyle(object sender, CustomSelectableCellStyleEventArgs e) {
    if(e.Date.Month == DateTime.Now.Month)
        e.TextColor = Color.FromHex("F44848");
}
See Also