Returns whether the date falls on a Saturday or Sunday.
Class: DayFormattingEventArgs
Namespace: Softelvdm.SftDateNET
Assembly: Softelvdm.SftDateNET
public bool IsWeekend { get; }
Public ReadOnly Property IsWeekend As BooleanReturns whether the date falls on a Saturday or Sunday.
day.Bold = false;
day.ForeColor = Color.RoyalBlue;
day.ToolTip = "Team meeting";
});
}
// The DayFormatting event can change any day; here weekends without a special date are colored.
private void AnyControl_DayFormatting(object sender, DayFormattingEventArgs e) {
if (checkWeekends.Checked && e.IsWeekend && e.SpecialDate == null)
e.ForeColor = Color.IndianRed;
}
private void checkWeekends_CheckedChanged(object sender, EventArgs e) {
sftCalendar1.RefreshDays();
}
day.ForeColor = Color.RoyalBlue
day.ToolTip = "Team meeting"
End If
Next
End Sub
' The DayFormatting event can change any day; here weekends without a special date are colored.
Private Sub AnyControl_DayFormatting(ByVal sender As Object, ByVal e As DayFormattingEventArgs) Handles SftDate1.DayFormatting, SftDate2.DayFormatting, SftDate5.DayFormatting, SftDate6.DayFormatting, SftDate7.DayFormatting, SftDate8.DayFormatting, SftDate9.DayFormatting, SftCalendar1.DayFormatting
If CheckWeekends.Checked AndAlso e.IsWeekend AndAlso e.SpecialDate Is Nothing Then
e.ForeColor = Color.IndianRed
End If
End Sub
Private Sub CheckWeekends_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles CheckWeekends.CheckedChanged
SftCalendar1.RefreshDays()
End SubSee Also DayFormattingEventArgs Class | Classes | SftDate/NET 3.0