触发CustomDrawDayNumberCell事件
代码如下:
private void dateNavigator1_CustomDrawDayNumberCell(object sender, DevExpress.XtraEditors.Calendar.CustomDrawDayNumberCellEventArgs e) {
if(e.Date.DayOfWeek == DayOfWeek.Friday) {
e.Graphics.FillRectangle(Brushes.Red, e.Bounds);
e.Graphics.DrawString(e.Date.Day.ToString(), e.Style.Font, Brushes.White, e.Bounds);
e.Handled = true;
}
}
private void dateNavigator1_CustomDrawDayNumberCell(object sender, DevExpress.XtraEditors.Calendar.CustomDrawDayNumberCellEventArgs e) {
if(e.Date.DayOfWeek == DayOfWeek.Friday) {
e.Graphics.FillRectangle(Brushes.Red, e.Bounds);
e.Graphics.DrawString(e.Date.Day.ToString(), e.Style.Font, Brushes.White, e.Bounds);
e.Handled = true;
}
}