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