Windows表单应用程序日历

时间:2015-04-09 07:42:27

标签: .net winforms calendar

如何在Windows窗体应用程序中的月历控件中添加假日列表?

1 个答案:

答案 0 :(得分:3)

您可以将假日天数设为粗体,例如在c#:

DateTime myVacation1 = new DateTime(2001, 6, 10);
DateTime myVacation2 = new DateTime(2001, 6, 17);

monthCalendar1.AddBoldedDate(myVacation1);
monthCalendar1.AddBoldedDate(myVacation2);

// or if it is every year:
monthCalendar1.AddAnnuallyBoldedDate(myVacation2);

有关详情,请查看此链接: https://msdn.microsoft.com/en-us/library/aa983564%28v=vs.71%29.aspx