HeaderPane
Main
Hide
Share Link
Print

DarkMode Property, SftDate Object

Defines the dark mode setting (off, on, or following the Windows setting).

Syntax

Get

C#SftDateDarkModeConstants Mode = object.DarkMode;
VB.NETMode = object.DarkMode As SftDateDarkModeConstants
C++enum SftDateDarkModeConstants Mode = object->DarkMode;
enum SftDateDarkModeConstants Mode = object->GetDarkMode();
CHRESULT object->get_DarkMode(enum SftDateDarkModeConstants* Mode);

Put

C#SftDateDarkModeConstants object.DarkMode = Mode;
VB.NETobject.DarkMode = Mode As SftDateDarkModeConstants
C++enum SftDateDarkModeConstants object->DarkMode = Mode;
void object->PutDarkMode(enum SftDateDarkModeConstants Mode);
CHRESULT object->put_DarkMode(enum SftDateDarkModeConstants Mode);

object

A SftDate object.

Mode

Defines the dark mode setting (off, on, or following the Windows setting).

NameValueDescription
darkSftDateOff0Off (always light)
darkSftDateOn1On (always dark)
darkSftDateAuto2Automatic (follow Windows setting)

Comments

The DarkMode property defines the dark mode setting of the control (off, on, or following the Windows setting). The default is darkSftDateOff. Dark mode applies to all parts of the control, including the dropdown of a date field control. p When set to darkSftDateAuto, the control follows the Windows "Choose your mode" setting and re-renders automatically when it changes; the DarkModeChange event is raised when the effective state changes. Use DarkModeActive to determine whether dark mode is currently active. p Colors defined by the application (color properties, special dates, the DayFormatting event) are used as given in dark mode too; only the default colors and system colors follow the mode. High contrast mode takes precedence over dark mode (HighContrastMode).

See Also SftDate Object | Object Hierarchy | Dark Mode


Last Updated 11/29/2026 - (email)
© 2026 Softel vdm, Inc.