36 writes to ForeColor
System.Windows.Forms (35)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (4)
1553
ForeColor
= DefaultForeBrush.Color,
2002
defaultCellStyleTmp.
ForeColor
= SystemInformation.HighContrast ? DefaultForeBrush.Color : base.ForeColor;
2066
ForeColor
= SystemInformation.HighContrast ? DefaultForeBrush.Color : base.ForeColor,
2103
ForeColor
= DefaultForeBrush.Color,
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (7)
44
DefaultCellStyle.
ForeColor
= onSurface;
48
ColumnHeadersDefaultCellStyle.
ForeColor
= headerFg;
55
RowHeadersDefaultCellStyle.
ForeColor
= headerFg;
2864
inheritedCellStyle.
ForeColor
= cellStyle.ForeColor;
2868
inheritedCellStyle.
ForeColor
= columnHeadersStyle.ForeColor;
2872
inheritedCellStyle.
ForeColor
= dataGridViewStyle.ForeColor;
15180
DefaultCellStyle.
ForeColor
= base.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (7)
1895
inheritedCellStyleTmp.
ForeColor
= Color.Empty;
1959
inheritedCellStyleTmp.
ForeColor
= cellStyle.ForeColor;
1963
inheritedCellStyleTmp.
ForeColor
= rowStyle.ForeColor;
1968
inheritedCellStyleTmp.
ForeColor
= DataGridView.RowsDefaultCellStyle.ForeColor;
1972
inheritedCellStyleTmp.
ForeColor
= DataGridView.AlternatingRowsDefaultCellStyle.ForeColor;
1976
inheritedCellStyleTmp.
ForeColor
= columnStyle.ForeColor;
1980
inheritedCellStyleTmp.
ForeColor
= dataGridViewStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (2)
47
ForeColor
= dataGridViewCellStyle.ForeColor;
406
ForeColor
= dataGridViewCellStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
458
inheritedCellStyleTmp.
ForeColor
= columnStyle.ForeColor;
462
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;
87 references to ForeColor
System.Windows.Forms (84)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
1984
|| _defaultCellStyle.
ForeColor
== Color.Empty
2000
if (_defaultCellStyle.
ForeColor
== Color.Empty)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
2862
if (cellStyle is not null && !cellStyle.
ForeColor
.IsEmpty)
2864
inheritedCellStyle.ForeColor = cellStyle.
ForeColor
;
2866
else if (!columnHeadersStyle.
ForeColor
.IsEmpty)
2868
inheritedCellStyle.ForeColor = columnHeadersStyle.
ForeColor
;
2872
inheritedCellStyle.ForeColor = dataGridViewStyle.
ForeColor
;
15178
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)
1957
if (cellStyle is not null && !cellStyle.
ForeColor
.IsEmpty)
1959
inheritedCellStyleTmp.ForeColor = cellStyle.
ForeColor
;
1961
else if (rowStyle is not null && !rowStyle.
ForeColor
.IsEmpty)
1963
inheritedCellStyleTmp.ForeColor = rowStyle.
ForeColor
;
1965
else if (!DataGridView.RowsDefaultCellStyle.
ForeColor
.IsEmpty &&
1966
(rowIndex % 2 == 0 || DataGridView.AlternatingRowsDefaultCellStyle.
ForeColor
.IsEmpty))
1968
inheritedCellStyleTmp.ForeColor = DataGridView.RowsDefaultCellStyle.
ForeColor
;
1970
else if (rowIndex % 2 == 1 && !DataGridView.AlternatingRowsDefaultCellStyle.
ForeColor
.IsEmpty)
1972
inheritedCellStyleTmp.ForeColor = DataGridView.AlternatingRowsDefaultCellStyle.
ForeColor
;
1974
else if (columnStyle is not null && !columnStyle.
ForeColor
.IsEmpty)
1976
inheritedCellStyleTmp.ForeColor = columnStyle.
ForeColor
;
1980
inheritedCellStyleTmp.ForeColor = dataGridViewStyle.
ForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (8)
47
ForeColor = dataGridViewCellStyle.
ForeColor
;
404
if (!dataGridViewCellStyle.
ForeColor
.IsEmpty)
406
ForeColor = dataGridViewCellStyle.
ForeColor
;
492
dgvcs.
ForeColor
!=
ForeColor
||
519
hash.Add(
ForeColor
);
574
if (
ForeColor
!= Color.Empty)
581
sb.Append($" ForeColor={
ForeColor
}");
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (5)
1151
ControlPaint.DrawFocusRectangle(g, valBounds, cellStyle.BackColor, cellStyle.
ForeColor
);
1295
foreBrushColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.
ForeColor
;
1417
cellStyle.
ForeColor
,
1466
cellStyle.
ForeColor
,
1513
cellStyle.
ForeColor
,
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
301
!defaultCellStyle.
ForeColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (4)
216
!defaultCellStyle.
ForeColor
.IsEmpty ||
456
if (columnStyle is not null && !columnStyle.
ForeColor
.IsEmpty)
458
inheritedCellStyleTmp.ForeColor = columnStyle.
ForeColor
;
462
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
;