Back to Devexpress

DateColumn.PickerCustomMonthCellStyle Event

mobilecontrols-devexpress-dot-xamarinforms-dot-datagrid-dot-datecolumn-67f81694.md

latest2.4 KB
Original Source

DateColumn.PickerCustomMonthCellStyle Event

Allows you to customize months in the default picker.

Namespace : DevExpress.XamarinForms.DataGrid

Assembly : DevExpress.XamarinForms.Grid.dll

NuGet Package : DevExpress.XamarinForms.Grid

Declaration

csharp
public event EventHandler<CustomSelectableCellStyleEventArgs> PickerCustomMonthCellStyle

Event Data

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

PropertyDescription
DateGets or sets 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 month in the calendar.

cs
using DevExpress.XamarinForms.DataGrid;

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

See Also

UseNativePicker

DateColumn Class

DateColumn Members

DevExpress.XamarinForms.DataGrid Namespace