HeaderPane
Main
Hide
Share Link
Print

SftDateDarkModeConstants

Dark mode constants.

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

Examples

C# View entire sample code

            fields = new AxSftDate[] {
                fieldDate, fieldLongDate, fieldTimeList, fieldTimeClock, fieldDateTime,
                fieldRange, fieldOptional, fieldEmpty, fieldFreeForm, fieldCustom,
            };

            // the fields' formats and buttons were set at design time; these follow Windows
            DateTime now = DateTime.Now;
            ForEachControl(f => {
                f.DarkMode = SftDateDarkModeConstants.darkSftDateAuto;
                f.HighContrastMode = SftDateHighContrastConstants.highContrastSftDateAuto;
                f.ImageScaling = SftDateScalingConstants.scalingSftDateStretch;
                if (f != fieldEmpty && f != fieldRange)
                    f.Value = now;
            }, c => {
                c.DarkMode = SftDateDarkModeConstants.darkSftDateAuto;
                c.HighContrastMode = SftDateHighContrastConstants.highContrastSftDateAuto;

VB.NET View entire sample code

        fields = New AxSftDate() {
            fieldDate, fieldLongDate, fieldTimeList, fieldTimeClock, fieldDateTime,
            fieldRange, fieldOptional, fieldEmpty, fieldFreeForm, fieldCustom
        }

        ' the fields' formats and buttons were set at design time; these follow Windows
        Dim current As Date = Date.Now
        ForEachControl(Sub(f)
                           f.DarkMode = SftDateDarkModeConstants.darkSftDateAuto
                           f.HighContrastMode = SftDateHighContrastConstants.highContrastSftDateAuto
                           f.ImageScaling = SftDateScalingConstants.scalingSftDateStretch
                           If f IsNot fieldEmpty AndAlso f IsNot fieldRange Then f.Value = current
                       End Sub,
                       Sub(c)
                           c.DarkMode = SftDateDarkModeConstants.darkSftDateAuto
                           c.HighContrastMode = SftDateHighContrastConstants.highContrastSftDateAuto

C++ View entire sample code

{
    for (int i = 0; i < FIELDS; ++i)
        m_Fields[i] = GetDlgItem(g_fieldIds[i])->GetControlUnknown();
    m_Calendar = GetDlgItem(IDC_CALENDAR)->GetControlUnknown();

    // the fields' formats and buttons were set at design time (in the dialog resource); these follow Windows
    DATE now = Now();
    ForEachControl([&](auto& ctl) {
        ctl->DarkMode = darkSftDateAuto;
        ctl->HighContrastMode = highContrastSftDateAuto;
        ctl->ImageScaling = scalingSftDateStretch;
    });
    for (int i = 0; i < FIELDS; ++i)
        if (g_fieldIds[i] != IDC_EMPTY && g_fieldIds[i] != IDC_RANGE)
            m_Fields[i]->Value = _variant_t(now, VT_DATE);
    m_Calendar->Value = _variant_t(now, VT_DATE);

See Also Object Hierarchy | DarkMode | Dark Mode


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