HeaderPane
Main
Hide
Share Link
Print

Checked Property, SftDate Class

Defines whether the check box is checked.

Class: SftDate
Namespace: Softelvdm.SftDateNET
Assembly: Softelvdm.SftDateNET

Syntax

public bool Checked { get; set; }
Public Property Checked As Boolean

Value

The default value is True.

Comments

Defines whether the check box is checked.

Examples

C# View entire sample code

        }

        // 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;

VB.NET View entire sample code

    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
        Next

See Also SftDate Class | Classes | SftDate/NET 3.0