59 writes to ForeColor
System.Windows.Forms (32)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (4)
1542
ForeColor
= DefaultForeBrush.Color,
1991
defaultCellStyleTmp.
ForeColor
= SystemInformation.HighContrast ? DefaultForeBrush.Color : base.ForeColor;
2055
ForeColor
= SystemInformation.HighContrast ? DefaultForeBrush.Color : base.ForeColor,
2092
ForeColor
= DefaultForeBrush.Color,
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (4)
2822
inheritedCellStyle.
ForeColor
= cellStyle.ForeColor;
2826
inheritedCellStyle.
ForeColor
= columnHeadersStyle.ForeColor;
2830
inheritedCellStyle.
ForeColor
= dataGridViewStyle.ForeColor;
15124
DefaultCellStyle.
ForeColor
= base.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (7)
1894
inheritedCellStyleTmp.
ForeColor
= Color.Empty;
1958
inheritedCellStyleTmp.
ForeColor
= cellStyle.ForeColor;
1962
inheritedCellStyleTmp.
ForeColor
= rowStyle.ForeColor;
1967
inheritedCellStyleTmp.
ForeColor
= DataGridView.RowsDefaultCellStyle.ForeColor;
1971
inheritedCellStyleTmp.
ForeColor
= DataGridView.AlternatingRowsDefaultCellStyle.ForeColor;
1975
inheritedCellStyleTmp.
ForeColor
= columnStyle.ForeColor;
1979
inheritedCellStyleTmp.
ForeColor
= dataGridViewStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (2)
46
ForeColor
= dataGridViewCellStyle.ForeColor;
385
ForeColor
= dataGridViewCellStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
456
inheritedCellStyleTmp.
ForeColor
= columnStyle.ForeColor;
460
inheritedCellStyleTmp.
ForeColor
= dataGridViewStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
316
inheritedCellStyleTmp.
ForeColor
= cellStyle.ForeColor;
320
inheritedCellStyleTmp.
ForeColor
= columnHeadersStyle.ForeColor;
324
inheritedCellStyleTmp.
ForeColor
= dataGridViewStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (7)
630
inheritedCellStyle.
ForeColor
= cellStyle.ForeColor;
634
inheritedCellStyle.
ForeColor
= rowHeadersStyle.ForeColor;
638
inheritedCellStyle.
ForeColor
= dataGridViewStyle.ForeColor;
832
inheritedRowStyle.
ForeColor
= rowStyle.ForeColor;
836
inheritedRowStyle.
ForeColor
= rowsDefaultCellStyle.ForeColor;
840
inheritedRowStyle.
ForeColor
= alternatingRowsDefaultCellStyle.ForeColor;
844
inheritedRowStyle.
ForeColor
= dataGridViewStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
341
inheritedCellStyleTmp.
ForeColor
= cellStyle.ForeColor;
345
inheritedCellStyleTmp.
ForeColor
= rowHeadersStyle.ForeColor;
349
inheritedCellStyleTmp.
ForeColor
= dataGridViewStyle.ForeColor;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
385
destColumn.DefaultCellStyle.
ForeColor
= srcColumn.DefaultCellStyle.ForeColor;
System.Windows.Forms.Tests (24)
System\Windows\Forms\DataGridViewCellStyleTests.cs (15)
48
ForeColor
= Color.Blue,
297
ForeColor
= value
302
style.
ForeColor
= value;
311
ForeColor
= Color.Red
313
style.
ForeColor
= Color.Empty;
625
ForeColor
= Color.Blue,
668
ForeColor
= Color.Blue,
716
ForeColor
= Color.Blue,
782
ForeColor
= Color.Blue,
895
new DataGridViewCellStyle {
ForeColor
= Color.Red },
896
new DataGridViewCellStyle {
ForeColor
= Color.Red },
901
new DataGridViewCellStyle {
ForeColor
= Color.Red },
902
new DataGridViewCellStyle {
ForeColor
= Color.Blue },
1067
new DataGridViewCellStyle {
ForeColor
= Color.Red },
1130
ForeColor
= Color.Blue,
System\Windows\Forms\DataGridViewRowTests.cs (2)
2069
ForeColor
= Color.Blue,
2085
ForeColor
= Color.Green,
System\Windows\Forms\DataGridViewTests.cs (2)
796
yield return new object[] { new DataGridViewCellStyle {
ForeColor
= Color.Empty } };
2341
ForeColor
= Color.Maroon,
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
126
ForeColor
= Color.Maroon,
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (4)
555
ForeColor
= Color.Green
563
ForeColor
= Color.FromArgb(0x23, 0x45, 0x67, 0x80)
764
ForeColor
= Color.Green
772
ForeColor
= Color.FromArgb(0x23, 0x45, 0x67, 0x80)
WinFormsControlsTest (2)
DataGridViewTest.Designer.cs (2)
59
dataGridViewCellStyle1.
ForeColor
= System.Drawing.SystemColors.WindowText;
77
dataGridViewCellStyle3.
ForeColor
= System.Drawing.Color.Maroon;
99 references to ForeColor
System.Windows.Forms (84)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
1973
|| _defaultCellStyle.
ForeColor
== Color.Empty
1989
if (_defaultCellStyle.
ForeColor
== Color.Empty)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
2820
if (cellStyle is not null && !cellStyle.
ForeColor
.IsEmpty)
2822
inheritedCellStyle.ForeColor = cellStyle.
ForeColor
;
2824
else if (!columnHeadersStyle.
ForeColor
.IsEmpty)
2826
inheritedCellStyle.ForeColor = columnHeadersStyle.
ForeColor
;
2830
inheritedCellStyle.ForeColor = dataGridViewStyle.
ForeColor
;
15122
if (_dataGridViewState1[State1_AmbientForeColor] && DefaultCellStyle.
ForeColor
!= base.ForeColor)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (8)
668
Color foreBrushColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
772
cellStyle.
ForeColor
,
804
cellStyle.
ForeColor
,
825
cellStyle.
ForeColor
,
840
cellStyle.
ForeColor
,
887
ControlPaint.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1), Color.Empty, cellStyle.
ForeColor
);
896
cellStyle.
ForeColor
,
951
cellStyle.
ForeColor
);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
215
!defaultCellStyle.
ForeColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (12)
1956
if (cellStyle is not null && !cellStyle.
ForeColor
.IsEmpty)
1958
inheritedCellStyleTmp.ForeColor = cellStyle.
ForeColor
;
1960
else if (rowStyle is not null && !rowStyle.
ForeColor
.IsEmpty)
1962
inheritedCellStyleTmp.ForeColor = rowStyle.
ForeColor
;
1964
else if (!DataGridView.RowsDefaultCellStyle.
ForeColor
.IsEmpty &&
1965
(rowIndex % 2 == 0 || DataGridView.AlternatingRowsDefaultCellStyle.
ForeColor
.IsEmpty))
1967
inheritedCellStyleTmp.ForeColor = DataGridView.RowsDefaultCellStyle.
ForeColor
;
1969
else if (rowIndex % 2 == 1 && !DataGridView.AlternatingRowsDefaultCellStyle.
ForeColor
.IsEmpty)
1971
inheritedCellStyleTmp.ForeColor = DataGridView.AlternatingRowsDefaultCellStyle.
ForeColor
;
1973
else if (columnStyle is not null && !columnStyle.
ForeColor
.IsEmpty)
1975
inheritedCellStyleTmp.ForeColor = columnStyle.
ForeColor
;
1979
inheritedCellStyleTmp.ForeColor = dataGridViewStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (8)
46
ForeColor = dataGridViewCellStyle.
ForeColor
;
383
if (!dataGridViewCellStyle.
ForeColor
.IsEmpty)
385
ForeColor = dataGridViewCellStyle.
ForeColor
;
466
dgvcs.
ForeColor
!=
ForeColor
||
492
hash.Add(
ForeColor
);
544
if (
ForeColor
!= Color.Empty)
551
sb.Append($" ForeColor={
ForeColor
}");
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (5)
1151
ControlPaint.DrawFocusRectangle(g, valBounds, cellStyle.BackColor, cellStyle.
ForeColor
);
1294
foreBrushColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
1419
cellStyle.
ForeColor
,
1468
cellStyle.
ForeColor
,
1515
cellStyle.
ForeColor
,
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
301
!defaultCellStyle.
ForeColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (4)
214
!defaultCellStyle.
ForeColor
.IsEmpty ||
454
if (columnStyle is not null && !columnStyle.
ForeColor
.IsEmpty)
456
inheritedCellStyleTmp.ForeColor = columnStyle.
ForeColor
;
460
inheritedCellStyleTmp.ForeColor = dataGridViewStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (6)
314
if (cellStyle is not null && !cellStyle.
ForeColor
.IsEmpty)
316
inheritedCellStyleTmp.ForeColor = cellStyle.
ForeColor
;
318
else if (!columnHeadersStyle.
ForeColor
.IsEmpty)
320
inheritedCellStyleTmp.ForeColor = columnHeadersStyle.
ForeColor
;
324
inheritedCellStyleTmp.ForeColor = dataGridViewStyle.
ForeColor
;
915
textColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
2263
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.Empty, cellStyle.
ForeColor
);
2274
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.Empty, cellStyle.
ForeColor
);
2279
ControlPaint.DrawFocusRectangle(g, textBounds, Color.Empty, cellStyle.
ForeColor
);
2329
textColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (1)
86
ForeColor = dataGridViewCellStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
277
!defaultCellStyle.
ForeColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (13)
628
if (cellStyle is not null && !cellStyle.
ForeColor
.IsEmpty)
630
inheritedCellStyle.ForeColor = cellStyle.
ForeColor
;
632
else if (!rowHeadersStyle.
ForeColor
.IsEmpty)
634
inheritedCellStyle.ForeColor = rowHeadersStyle.
ForeColor
;
638
inheritedCellStyle.ForeColor = dataGridViewStyle.
ForeColor
;
830
if (rowStyle is not null && !rowStyle.
ForeColor
.IsEmpty)
832
inheritedRowStyle.ForeColor = rowStyle.
ForeColor
;
834
else if (!rowsDefaultCellStyle.
ForeColor
.IsEmpty && (rowIndex % 2 == 0 || alternatingRowsDefaultCellStyle.
ForeColor
.IsEmpty))
836
inheritedRowStyle.ForeColor = rowsDefaultCellStyle.
ForeColor
;
838
else if (rowIndex % 2 == 1 && !alternatingRowsDefaultCellStyle.
ForeColor
.IsEmpty)
840
inheritedRowStyle.ForeColor = alternatingRowsDefaultCellStyle.
ForeColor
;
844
inheritedRowStyle.ForeColor = dataGridViewStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (8)
339
if (cellStyle is not null && !cellStyle.
ForeColor
.IsEmpty)
341
inheritedCellStyleTmp.ForeColor = cellStyle.
ForeColor
;
343
else if (!rowHeadersStyle.
ForeColor
.IsEmpty)
345
inheritedCellStyleTmp.ForeColor = rowHeadersStyle.
ForeColor
;
349
inheritedCellStyleTmp.ForeColor = dataGridViewStyle.
ForeColor
;
824
iconColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
884
textColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
982
iconColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
713
ControlPaint.DrawFocusRectangle(graphics, valBounds, Color.Empty, cellStyle.
ForeColor
);
749
cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
,
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (1)
112
ForeColor = dataGridViewCellStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
315
textColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
383
if (defaultSrcColumn is null || !defaultSrcColumn.DefaultCellStyle.
ForeColor
.Equals(srcColumn.DefaultCellStyle.
ForeColor
))
385
destColumn.DefaultCellStyle.ForeColor = srcColumn.DefaultCellStyle.
ForeColor
;
System.Windows.Forms.Tests (12)
System\Windows\Forms\DataGridViewCellStyleTests.cs (12)
24
Assert.Equal(Color.Empty, style.
ForeColor
);
65
Assert.Equal(Color.Blue, style.
ForeColor
);
90
Assert.Equal(Color.Empty, style.
ForeColor
);
299
Assert.Equal(value, style.
ForeColor
);
303
Assert.Equal(value, style.
ForeColor
);
314
Assert.Equal(Color.Empty, style.
ForeColor
);
643
Assert.Equal(Color.Blue, style.
ForeColor
);
685
Assert.Equal(Color.Blue, style.
ForeColor
);
733
Assert.Equal(Color.Blue, style.
ForeColor
);
758
Assert.Equal(Color.Empty, style.
ForeColor
);
799
Assert.Equal(Color.Blue, style.
ForeColor
);
824
Assert.Equal(Color.Empty, style.
ForeColor
);