Defines whether the check box is checked.
Class: SftDate
Namespace: Softelvdm.SftDateNET
Assembly: Softelvdm.SftDateNET
public bool Checked { get; set; }
Public Property Checked As BooleanThe default value is True.
Defines whether the check box is checked.
}
// Special dates repeat every year, month or week, and can be bold, colored, disabled or show a tooltip.
private void checkHolidays_CheckedChanged(object sender, EventArgs e) {
int year = DateTime.Today.Year;
DateTime monday = DateTime.Today.AddDays(-(((int)DateTime.Today.DayOfWeek + 6) % 7));
ForEachCalendar(delegate (CalendarClass calendar) {
calendar.SpecialDates.Clear();
if (!checkHolidays.Checked)
return;
SpecialDateClass day = calendar.SpecialDates.Add(new DateTime(year, 1, 1), RecurrenceEnum.Annually);
day.Bold = true;
day.ForeColor = Color.Firebrick;
day.ToolTip = "New Year's Day";
day = calendar.SpecialDates.Add(new DateTime(year, 7, 4), RecurrenceEnum.Annually);
day.Bold = true;
Private Sub ComboFirstDay_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ComboFirstDay.SelectedIndexChanged
For Each calendar As CalendarClass In AllCalendars()
calendar.FirstDayOfWeek = CType(ComboFirstDay.SelectedItem, FirstDayOfWeekEnum)
Next
End Sub
Private Sub CheckTrailing_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles CheckTrailing.CheckedChanged
For Each calendar As CalendarClass In AllCalendars()
calendar.ShowTrailingDates = CheckTrailing.Checked
Next
End Sub
Private Sub CheckToday_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles CheckToday.CheckedChanged
For Each calendar As CalendarClass In AllCalendars()
calendar.ShowTodayButton = CheckToday.Checked
NextSee Also SftDate Class | Classes | SftDate/NET 3.0