HeaderPane
Main
Hide
Share Link
Print

Colors

All colors of the controls can be defined by the application. A color left empty (Color.Empty, the default) uses the matching Windows system color, or the dark mode color while dark mode is active (see Dark Mode). While Windows High Contrast is active, the colors of the user's contrast theme are used instead (see High Contrast).

Field Colors

PropertyDescription
SftDate.BackColor, SftDate.ForeColorThe background and text colors of the field.
SftDate.SegmentHighlightBackColor, SftDate.SegmentHighlightForeColorThe colors of the part of the value being edited.
SftDate.PlaceholderForeColorThe color of the placeholder text of an empty field.
SftDate.BorderColorThe color of a BorderStyle.FixedSingle border.

Calendar Colors

The colors of a calendar are properties of its CalendarClass object (SftCalendar.Calendar property, or SftDate.Calendar for the dropdown calendar of a field):

PropertyDescription
CalendarClass.BackColor, CalendarClass.ForeColorThe background color and the color of the days.
CalendarClass.TitleBackColor, CalendarClass.TitleForeColorThe background color of the titles and the color of the titles and the previous and next buttons.
CalendarClass.DayOfWeekForeColor, CalendarClass.BorderColorThe color of the names of the days of the week and of the line below them.
CalendarClass.TrailingForeColorThe color of the days of the previous and next month.
CalendarClass.WeekendForeColorThe color of Saturdays and Sundays.
CalendarClass.SelectedBackColor, CalendarClass.SelectedForeColorThe colors of selected days.
CalendarClass.RangeBackColorThe background color of the days between the first and the last day of a range.
CalendarClass.HotBackColorThe background color of the day under the mouse.
CalendarClass.TodayColorThe color of the outline of today's date.
CalendarClass.DisabledForeColorThe color of days that cannot be selected.
CalendarClass.WeekNumberForeColor, CalendarClass.WeekNumberBackColorThe colors of the week numbers.

Special dates and the DayFormatting event define colors for individual days (see Special Dates and Day Formatting).

Windows Themes

With the UseThemes property set (the default) and the default colors, the controls are drawn with the Windows theme of date fields and calendars. Setting a calendar's background, selection, hot or today color draws the calendar without the theme.