HeaderPane
Main
Hide
Share Link
Print

HighContrastMode Property, SftCalendar Object

Defines the high contrast setting (off, on, or following the Windows setting).

Syntax

Get

C#SftDateHighContrastConstants Mode = object.HighContrastMode;
VB.NETMode = object.HighContrastMode As SftDateHighContrastConstants
C++enum SftDateHighContrastConstants Mode = object->HighContrastMode;
enum SftDateHighContrastConstants Mode = object->GetHighContrastMode();
CHRESULT object->get_HighContrastMode(enum SftDateHighContrastConstants* Mode);

Put

C#SftDateHighContrastConstants object.HighContrastMode = Mode;
VB.NETobject.HighContrastMode = Mode As SftDateHighContrastConstants
C++enum SftDateHighContrastConstants object->HighContrastMode = Mode;
void object->PutHighContrastMode(enum SftDateHighContrastConstants Mode);
CHRESULT object->put_HighContrastMode(enum SftDateHighContrastConstants Mode);

object

A SftCalendar object.

Mode

Defines the high contrast setting (off, on, or following the Windows setting).

NameValueDescription
highContrastSftDateOff0Off (ignore Windows high contrast)
highContrastSftDateOn1On (always use the system palette)
highContrastSftDateAuto2Automatic (follow Windows setting)

Comments

The HighContrastMode property defines the high contrast setting of the control (off, on, or following the Windows setting). The default is highContrastSftDateOff. p While high contrast mode is active, the control ignores the colors defined by the application and dark mode, and uses the system colors of the contrast theme. Themes are not used. p When set to highContrastSftDateAuto, the control follows the Windows High Contrast accessibility setting and re-renders automatically; the HighContrastChange event is raised when the effective state changes. Use HighContrastActive to determine whether high contrast is currently active.

Examples

C# View entire sample code

            // the options start out with the controls' settings
            SftDateCalendar cal = sftCalendar.Calendar;
            comboCulture.Items.AddRange(cultures);
            comboCulture.SelectedIndex = 0;
            comboDarkMode.Items.AddRange(new object[] { "Off", "On", "Auto" });
            comboDarkMode.SelectedIndex = (int)sftCalendar.DarkMode;
            comboHighContrast.Items.AddRange(new object[] { "Off", "On", "Auto" });
            comboHighContrast.SelectedIndex = (int)sftCalendar.HighContrastMode;
            comboButtons.Items.AddRange(new object[] { "Dropdown", "Up/down", "Dropdown, up/down", "None" });
            comboButtons.SelectedIndex = (int)fieldDate.Buttons;
            comboBorder.Items.AddRange(new object[] { "Single", "3D", "None" });
            comboBorder.SelectedIndex = Math.Max(0, Array.IndexOf(borderStyles, fieldDate.BorderStyle));
            comboAlignment.Items.AddRange(new object[] { "Near", "Far" });
            comboAlignment.SelectedIndex = (int)fieldDate.DropDownAlignment;
            comboAcross.Items.AddRange(new object[] { "1", "2", "3" });
            comboAcross.SelectedIndex = cal.MonthsAcross - 1;

VB.NET View entire sample code

        ' the options start out with the controls' settings
        Dim cal As SftDateCalendar = sftCalendar.Calendar
        comboCulture.Items.AddRange(cultures)
        comboCulture.SelectedIndex = 0
        comboDarkMode.Items.AddRange(New Object() {"Off", "On", "Auto"})
        comboDarkMode.SelectedIndex = CInt(sftCalendar.DarkMode)
        comboHighContrast.Items.AddRange(New Object() {"Off", "On", "Auto"})
        comboHighContrast.SelectedIndex = CInt(sftCalendar.HighContrastMode)
        comboButtons.Items.AddRange(New Object() {"Dropdown", "Up/down", "Dropdown, up/down", "None"})
        comboButtons.SelectedIndex = CInt(fieldDate.Buttons)
        comboBorder.Items.AddRange(New Object() {"Single", "3D", "None"})
        comboBorder.SelectedIndex = Math.Max(0, Array.IndexOf(borderStyles, fieldDate.BorderStyle))
        comboAlignment.Items.AddRange(New Object() {"Near", "Far"})
        comboAlignment.SelectedIndex = CInt(fieldDate.DropDownAlignment)
        comboAcross.Items.AddRange(New Object() {"1", "2", "3"})
        comboAcross.SelectedIndex = cal.MonthsAcross - 1

See Also SftCalendar Object | Object Hierarchy | High Contrast


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