internal static Color DisabledTextColor(Color backColor) { Color controlDark = SystemColors.ControlDark; if (ControlPaint.IsDarker(backColor, SystemColors.Control)) { controlDark = ControlPaint.Dark(backColor); } return(controlDark); }
internal static Color DisabledTextColor(Color backColor) { //Theme specs -- if the backcolor is darker than Control, we use // ControlPaint.Dark(backcolor). Otherwise we use ControlDark. // see VS#357226 Color disabledTextForeColor = SystemColors.ControlDark; if (ControlPaint.IsDarker(backColor, SystemColors.Control)) { disabledTextForeColor = ControlPaint.Dark(backColor); } return(disabledTextForeColor); }
internal static Color DisabledTextColor(Color backColor) { if (SystemInformation.HighContrast) { return(SystemColors.GrayText); } // If the color is darker than SystemColors.Control make it slightly darker, // otherwise use the standard control dark color. return(ControlPaint.IsDarker(backColor, SystemColors.Control) ? ControlPaint.Dark(backColor) : SystemColors.ControlDark); }
internal static Color DisabledTextColor(Color backColor) { if (SystemInformation.HighContrast) { return(SystemColors.GrayText); } //Theme specs -- if the backcolor is darker than Control, we use // ControlPaint.Dark(backcolor). Otherwise we use ControlDark. Color disabledTextForeColor = SystemColors.ControlDark; if (ControlPaint.IsDarker(backColor, SystemColors.Control)) { disabledTextForeColor = ControlPaint.Dark(backColor); } return(disabledTextForeColor); }
internal static Color DisabledTextColor(Color backColor) { if (SystemInformation.HighContrast && AccessibilityImprovements.Level1) { return(SystemColors.GrayText); } //Theme specs -- if the backcolor is darker than Control, we use // ControlPaint.Dark(backcolor). Otherwise we use ControlDark. // see VS#357226 Color disabledTextForeColor = SystemColors.ControlDark; if (ControlPaint.IsDarker(backColor, SystemColors.Control)) { disabledTextForeColor = ControlPaint.Dark(backColor); } return(disabledTextForeColor); }
internal static Color DisabledTextColor(Color backColor) { if (SystemInformation.HighContrast && !LocalAppContextSwitches.UseLegacyAccessibilityFeatures) { return(SystemColors.GrayText); } //Theme specs -- if the backcolor is darker than Control, we use // ControlPaint.Dark(backcolor). Otherwise we use ControlDark. // see VS#357226 Color disabledTextForeColor = SystemColors.ControlDark; if (ControlPaint.IsDarker(backColor, SystemColors.Control)) { disabledTextForeColor = ControlPaint.Dark(backColor); } return(disabledTextForeColor); }