182 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)
3366
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
;
4942
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)
240
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 (15)
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
1590
_helpTextCtrl.ForeColor = SystemColors.
WindowText
;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
879
ForeColor = SystemColors.
WindowText
System.Windows.Forms.Tests (139)
System\Windows\Forms\ComboBoxTests.cs (6)
81
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1047
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1073
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1134
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1156
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1172
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (39)
78
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
546
yield return new object[] { new DataGridViewCellStyle(), null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false };
572
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
581
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, true
590
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
599
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, true
608
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
617
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, true
627
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
636
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, true
645
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
654
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, true
663
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
672
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, true
682
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
691
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, false
700
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
709
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, false
718
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
727
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, false
755
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 };
781
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
790
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, true
799
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
808
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, true
817
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
826
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, true
836
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
845
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, true
854
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
863
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, true
872
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
881
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Right, true
891
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Center, false
900
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Center, false
909
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Left, false
918
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, true, HorizontalAlignment.Left, false
927
null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.
WindowText
, false, HorizontalAlignment.Right, false
936
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)
78
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\DomainUpDownTests.cs (1)
100
_sub.ForeColor.Should().Be(SystemColors.
WindowText
);
System\Windows\Forms\DrawItemEventArgsTests.cs (3)
14
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, SystemColors.
WindowText
, SystemColors.Window };
16
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, SystemColors.
WindowText
, SystemColors.Window };
17
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)
73
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1240
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1266
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1327
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1349
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1365
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
5997
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
6002
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
6006
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\ListViewItemTests.cs (32)
21
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
44
yield return new object[] { null, null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
45
yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
46
yield return new object[] { new string[] { null }, string.Empty, Color.Empty, Color.Empty, null, new ListViewGroup(), string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
82
yield return new object[] { null, -1, Color.Empty, Color.Empty, null, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
83
yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
84
yield return new object[] { new string[] { null }, 1, Color.Empty, Color.Empty, null, new ListViewGroup(), SystemColors.
WindowText
, SystemColors.Window, string.Empty };
120
yield return new object[] { null, null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
121
yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
122
yield return new object[] { new string[] { null }, string.Empty, Color.Empty, Color.Empty, null, string.Empty, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
158
yield return new object[] { null, -1, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
159
yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
160
yield return new object[] { new string[] { null }, 1, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
211
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
248
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
286
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
324
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
361
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
399
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
437
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
474
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
512
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
550
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
588
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
625
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
663
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
701
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
738
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
777
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
807
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
904
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
925
Assert.Equal(SystemColors.
WindowText
, item.ForeColor);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (2)
258
yield return new object[] { null, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
388
yield return new object[] { Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window };
System\Windows\Forms\ListViewSubItemTests.cs (12)
20
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
47
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
55
yield return new object[] { null, null, Color.Empty, Color.Empty, null, SystemColors.
WindowText
, SystemColors.Window, string.Empty };
343
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
354
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
358
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
379
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
384
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
545
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
550
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
562
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
567
Assert.Equal(SystemColors.
WindowText
, subItem.ForeColor);
System\Windows\Forms\ListViewTests.cs (4)
81
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1308
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1334
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1405
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\MonthCalendarTests.cs (4)
83
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
921
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
947
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1008
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\PropertyGridTests.cs (3)
164
Assert.Equal(SystemColors.
WindowText
, control.ViewForeColor);
3430
Assert.Equal(SystemColors.
WindowText
, control.ViewForeColor);
3446
Assert.Equal(SystemColors.
WindowText
, control.ViewForeColor);
System\Windows\Forms\RichTextBoxTests.cs (4)
82
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1677
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1703
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1803
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\TreeViewTests.cs (3)
67
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
1459
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1521
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
System\Windows\Forms\UpDownBaseTests.cs (3)
87
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
935
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1013
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
TextBoxBaseTests.cs (3)
1161
yield return new object[] { Color.Empty, SystemColors.
WindowText
};
1187
yield return new object[] { Color.Empty, SystemColors.
WindowText
, 0 };
1248
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
TextBoxTests.cs (1)
72
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
TrackBarTests.cs (9)
65
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
699
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
704
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
722
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
730
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
752
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
757
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
762
Assert.Equal(SystemColors.
WindowText
, control.ForeColor);
768
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
;