184 references to WindowText
System.Drawing.Common.Tests (4)
System\Drawing\ColorTranslatorTests.cs (2)
41
yield return (unchecked((int)0x80000008), SystemColors.
WindowText
);
133
yield return ("windowtext", SystemColors.
WindowText
);
System\Drawing\SystemBrushesTests.cs (1)
42
yield return Brush(() => SystemBrushes.WindowText, SystemColors.
WindowText
);
System\Drawing\SystemPensTest.cs (1)
44
yield return Pen(() => SystemPens.WindowText, SystemColors.
WindowText
);
System.Windows.Forms (22)
System\Windows\Forms\ActiveX\AxHost.cs (1)
3335
qaContainer.colorFore = GetOleColorFromColor(SystemColors.
WindowText
);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
538
get => ShouldSerializeForeColor() ? base.ForeColor : SystemColors.
WindowText
;
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
495
: SystemColors.
WindowText
;
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (3)
116
int r = (SystemColors.Window.R + SystemColors.
WindowText
.R + 1) / 2;
117
int g = SystemColors.
WindowText
.G;
118
int b = (SystemColors.Window.B + SystemColors.
WindowText
.B + 1) / 2;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
456
return SystemColors.
WindowText
;
System\Windows\Forms\Controls\ListView\ListView.cs (3)
106
private Color _odCacheForeColor = SystemColors.
WindowText
;
833
get => ShouldSerializeForeColor() ? base.ForeColor : SystemColors.
WindowText
;
4946
if (c != SystemColors.
WindowText
|| Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
422
return SystemColors.
WindowText
;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (1)
173
return _owner?._listView?.ForeColor ?? SystemColors.
WindowText
;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
421
return SystemColors.
WindowText
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
139
ForeColor = SystemColors.
WindowText
;
360
if (ForeColor.ToArgb() == SystemColors.
WindowText
.ToArgb())
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
506
return SystemColors.
WindowText
;
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (1)
380
Color windowText = SystemColors.
WindowText
;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
239
get => SystemColors.
WindowText
;
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
442
get => ShouldSerializeForeColor() ? base.ForeColor : SystemColors.
WindowText
;
1892
if (c != SystemColors.
WindowText
|| Application.IsDarkModeEnabled)
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (2)
32
: this(graphics, font, rect, index, state, SystemColors.
WindowText
, SystemColors.Window)
62
: this(hdc, font, rect, index, state, SystemColors.
WindowText
, SystemColors.Window)
System.Windows.Forms.Design (17)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
580
Color textColor = SystemColors.
WindowText
;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
131
(Color OldColor, Color NewColor) map = new(Color.Black, SystemColors.
WindowText
);
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (2)
35
ForeColor = SystemColors.
WindowText
,
171
_readOnlyTextBoxLabel.ForeColor = SystemColors.
WindowText
;
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
394
Color ct = SystemColors.
WindowText
;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (1)
178
ForeColor = SystemColors.
WindowText
;
System\Windows\Forms\Design\DesignBindingPicker.cs (8)
152
ForeColor = SystemColors.
WindowText
,
172
ForeColor = SystemColors.
WindowText
,
191
ForeColor = SystemColors.
WindowText
238
ForeColor = SystemColors.
WindowText
,
279
ForeColor = SystemColors.
WindowText
,
297
ForeColor = SystemColors.
WindowText
,
323
ForeColor = SystemColors.
WindowText
1592
_helpTextCtrl.ForeColor = SystemColors.
WindowText
;
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (2)
777
textColor = SystemColors.
WindowText
;
910
TextRenderer.DrawText(e.Graphics, itemName, _selectedItemName.Font, textRect, SystemColors.
WindowText
, flags);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
879
ForeColor = SystemColors.
WindowText
System.Windows.Forms.Tests (139)
System\Windows\Forms\ComboBoxTests.cs (6)
83
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1049
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1075
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1136
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1158
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1174
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (39)
80
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
548
yield return new object[] { new DataGridViewCellStyle(), null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false };
574
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
583
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, true
592
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
601
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, true
610
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
619
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, true
629
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
638
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, true
647
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
656
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, true
665
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
674
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, true
684
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
693
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, false
702
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
711
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, false
720
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
729
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, false
757
yield return new object[] { new DataGridViewCellStyle(), null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false };
783
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
792
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, true
801
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
810
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, true
819
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
828
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, true
838
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
847
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, true
856
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
865
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, true
874
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
883
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, true
893
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
902
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, false
911
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
920
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, false
929
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
938
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, false
System\Windows\Forms\DateTimePickerTests.cs (1)
80
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\DomainUpDownTests.cs (1)
102
_sub.ForeColor.Should().Be(SystemColors.
WindowText
);
System\Windows\Forms\DrawItemEventArgsTests.cs (3)
16
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, SystemColors.
WindowText
, SystemColors.Window };
18
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, SystemColors.
WindowText
, SystemColors.Window };
19
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, SystemColors.
WindowText
, SystemColors.Window };
System\Windows\Forms\ListBoxTests.cs (9)
75
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1242
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1268
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1329
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1351
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1367
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
5999
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
6004
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
6008
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\ListViewItemTests.cs (32)
23
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
46
yield return new object[] { null, null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
47
yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
48
yield return new object[] { new string[] { null }, string.Empty, Color.Empty, Color.Empty, null, new ListViewGroup(), string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
84
yield return new object[] { null, -1, Color.Empty, Color.Empty, null, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
85
yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
86
yield return new object[] { new string[] { null }, 1, Color.Empty, Color.Empty, null, new ListViewGroup(), SystemColors.
WindowText
, SystemColors.Window, string.Empty };
122
yield return new object[] { null, null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
123
yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
124
yield return new object[] { new string[] { null }, string.Empty, Color.Empty, Color.Empty, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
160
yield return new object[] { null, -1, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
161
yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
162
yield return new object[] { new string[] { null }, 1, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
213
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
250
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
288
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
326
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
363
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
401
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
439
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
476
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
514
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
552
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
590
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
627
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
665
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
703
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
740
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
779
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
809
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
906
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
927
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (2)
259
yield return new object[] { null, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
389
yield return new object[] { Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window };
System\Windows\Forms\ListViewSubItemTests.cs (12)
22
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
48
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
56
yield return new object[] { null, null, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
344
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
355
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
359
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
380
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
385
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
546
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
551
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
563
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
568
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
System\Windows\Forms\ListViewTests.cs (4)
83
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1310
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1336
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1407
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\MonthCalendarTests.cs (4)
85
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
923
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
949
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1010
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\PropertyGridTests.cs (3)
166
Assert.Equal(SystemColors.
WindowText
, control.ViewForeColor);
3432
Assert.Equal(SystemColors.
WindowText
, control.ViewForeColor);
3448
Assert.Equal(SystemColors.
WindowText
, control.ViewForeColor);
System\Windows\Forms\RichTextBoxTests.cs (4)
84
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1679
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1705
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1805
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\TreeViewTests.cs (3)
69
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1461
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1523
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\UpDownBaseTests.cs (3)
89
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
937
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1015
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
TextBoxBaseTests.cs (3)
1163
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1189
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1250
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
TextBoxTests.cs (1)
74
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
TrackBarTests.cs (9)
67
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
701
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
706
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
724
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
732
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
754
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
759
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
764
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
770
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System.Windows.Forms.UI.IntegrationTests (1)
PropertyGridTests.cs (1)
356
_propertyGrid.ViewForeColor.Should().Be(SystemColors.
WindowText
);
WinFormsControlsTest (1)
DataGridViewTest.Designer.cs (1)
59
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.
WindowText
;