回复 2楼 wangnannan
我用下面的代码实现了背景颜色的更改,但是数字变成了左对齐,与原本的日历对不齐了,怎么改能和原来的日期都对齐呢?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;
}
}