85 references to HighContrast
System.Windows.Forms (75)
System\Windows\Forms\Application.cs (2)
397!SystemInformation.HighContrast && OsVersion.IsWindows11_OrGreater(); 405!SystemInformation.HighContrast
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorOptions.cs (1)
24HighContrast = SystemInformation.HighContrast;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (7)
69protected bool IsHighContrastHighlighted() => SystemInformation.HighContrast 105if (Control.BackColor != SystemColors.Control && SystemInformation.HighContrast) 132bool disabledHighContrast = (!Control.Enabled) && SystemInformation.HighContrast; 164? SystemInformation.HighContrast ? SystemColors.ControlLight : SystemColors.Control 165: SystemInformation.HighContrast ? colors.Highlight : colors.ButtonFace); 235bool disabledHighContrast = (!Control.Enabled) && SystemInformation.HighContrast; 273: SystemInformation.HighContrast ? SystemColors.ControlLight : SystemColors.Control);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (9)
28|| (SystemInformation.HighContrast ? state != CheckState.Indeterminate : state == CheckState.Unchecked), 29check: !hasCustomBorder && SystemInformation.HighContrast && state == CheckState.Checked, 99else if (state == CheckState.Checked && SystemInformation.HighContrast) 121|| (SystemInformation.HighContrast ? state != CheckState.Indeterminate : state == CheckState.Unchecked), 122!hasCustomBorder && SystemInformation.HighContrast && state == CheckState.Checked, 187else if (state == CheckState.Checked && SystemInformation.HighContrast) 204if (SystemInformation.HighContrast) 313layout.ShadowedText = SystemInformation.HighContrast; 325layout.ShadowedText = SystemInformation.HighContrast;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (5)
62LayoutData layout = PaintPopupLayout(state == CheckState.Unchecked, SystemInformation.HighContrast ? 2 : 1).Layout(); 86if (SystemInformation.HighContrast) 120LayoutData layout = PaintPopupLayout(up: false, SystemInformation.HighContrast ? 2 : 1).Layout(); 165layout.ShadowedText = SystemInformation.HighContrast; 181layout.ShadowedText = SystemInformation.HighContrast;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (2)
100Color comboColor = SystemInformation.HighContrast ? SystemColors.ControlDark : SystemColors.Control; 168checkColor = SystemInformation.HighContrast ? colors.Highlight : colors.ButtonShadow;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
66if (!SystemInformation.HighContrast)
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (1)
344if (SystemInformation.HighContrast
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (1)
322if (SystemInformation.HighContrast
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
3733&& !(SystemInformation.HighContrast && BackColor == SystemColors.Window))
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
1990defaultCellStyleTmp.ForeColor = SystemInformation.HighContrast ? DefaultForeBrush.Color : base.ForeColor; 2054ForeColor = SystemInformation.HighContrast ? DefaultForeBrush.Color : base.ForeColor,
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16697if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
907SystemInformation.HighContrast, 938SystemInformation.HighContrast ? 2 : 1,
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1439if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (3)
2072if (SystemInformation.HighContrast) 2094Pen pen = SystemInformation.HighContrast ? SystemPens.ControlLight : SystemPens.Control; 2330if (paintPostXPThemes && (drawDropDownButton || drawComboBox) && !SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (6)
51else if (SystemInformation.HighContrast) 94if (SystemInformation.HighContrast) 159else if (SystemInformation.HighContrast) 200private bool ShouldSerializeLinkColor() => SystemInformation.HighContrast 296else if (SystemInformation.HighContrast) 341if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (3)
68if (SystemInformation.HighContrast) 179if (SystemInformation.HighContrast) 359if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
1035if (SystemInformation.HighContrast &&
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
545if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (1)
361if (SystemInformation.HighContrast
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
238? SystemInformation.HighContrast ? SystemColors.HotTrack : IELinkColor 349? SystemInformation.HighContrast ? LinkUtilities.GetVisitedLinkColor() : IEVisitedLinkColor
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
73private Color _lineColor = SystemInformation.HighContrast ? SystemColors.ControlDarkDark : SystemColors.InactiveBorder; 3811if (DrawFlatToolbar || SystemInformation.HighContrast)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (1)
122if (SystemInformation.HighContrast && !OwnerGrid.HasCustomLineColor)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
18if (Control.BackColor != SystemColors.Control && SystemInformation.HighContrast)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
107=> SystemInformation.HighContrast && !OwnerGrid.HasCustomLineColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (1)
76if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
131brush = SystemInformation.HighContrast
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
201if (Selected && !Pressed && SystemInformation.HighContrast)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
833if (SystemInformation.HighContrast && image is Bitmap bitmap)
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (2)
581if (e.Item is ToolStripSplitButton item && !SystemInformation.HighContrast && 658if (!SystemInformation.HighContrast &&
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
245Color innerBorderColor = SystemInformation.HighContrast && !focused ? ColorTable.MenuBorder : BackColor;
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
344bool isHighContrast = SystemInformation.HighContrast; 596if (SystemInformation.HighContrast && Parent is Control parent)
System\Windows\Forms\Rendering\ControlPaint.cs (5)
140=> SystemInformation.HighContrast ? SystemColors.WindowFrame : SystemColors.ControlDark; 1121: SystemInformation.HighContrast 1327? (SystemInformation.HighContrast ? SystemColors.GrayText : SystemColors.ControlDark) 1954if (SystemInformation.HighContrast) 2002if (SystemInformation.HighContrast)
System\Windows\Forms\Rendering\DisplayInformation.cs (1)
75s_highContrast = SystemInformation.HighContrast;
System\Windows\Forms\Rendering\TextRenderer.cs (1)
550if (SystemInformation.HighContrast)
System\Windows\Forms\ToolTip\ToolTip.cs (1)
717if (SystemInformation.HighContrast)
System.Windows.Forms.Design (7)
System\Windows\Forms\Design\ComponentTray.cs (2)
1441if (SystemInformation.HighContrast) 1458if (SystemInformation.HighContrast)
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
141if (!SystemInformation.HighContrast)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
586s_highContrast = SystemInformation.HighContrast;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1815DrawArrow(new ToolStripArrowRenderEventArgs(g, null, bounds, SystemInformation.HighContrast ? Color.Black : SystemColors.ControlText, ArrowDirection.Down)); 2044if (item is not null && string.Equals(item.Name, CenterLabelName, StringComparison.InvariantCulture) && SystemInformation.HighContrast)
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (1)
282if (!SystemInformation.HighContrast)
System.Windows.Forms.Tests (3)
System\Windows\Forms\ApplicationTests.cs (1)
155if (SystemInformation.HighContrast)
System\Windows\Forms\SystemInformationTests.cs (2)
202Assert.Equal(SystemInformation.HighContrast, SystemInformation.HighContrast);