Defines the high contrast setting (off, on, or following the Windows setting).
Get
| C# | SftDateHighContrastConstants Mode = object.HighContrastMode; |
| VB.NET | Mode = object.HighContrastMode As SftDateHighContrastConstants |
| C++ | enum SftDateHighContrastConstants Mode = object->HighContrastMode; enum SftDateHighContrastConstants Mode = object->GetHighContrastMode(); |
| C | HRESULT object->get_HighContrastMode(enum SftDateHighContrastConstants* Mode); |
Put
| C# | SftDateHighContrastConstants object.HighContrastMode = Mode; |
| VB.NET | object.HighContrastMode = Mode As SftDateHighContrastConstants |
| C++ | enum SftDateHighContrastConstants object->HighContrastMode = Mode; void object->PutHighContrastMode(enum SftDateHighContrastConstants Mode); |
| C | HRESULT object->put_HighContrastMode(enum SftDateHighContrastConstants Mode); |
object
Mode
Defines the high contrast setting (off, on, or following the Windows setting).
| Name | Value | Description |
|---|---|---|
| highContrastSftDateOff | 0 | Off (ignore Windows high contrast) |
| highContrastSftDateOn | 1 | On (always use the system palette) |
| highContrastSftDateAuto | 2 | Automatic (follow Windows setting) |
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.
// 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;
' 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 - 1See Also SftCalendar Object | Object Hierarchy | High Contrast