54 writes to SelectionForeColor
System.Windows.Forms (31)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (4)
1544
SelectionForeColor
= DefaultSelectionForeBrush.Color,
2002
defaultCellStyleTmp.
SelectionForeColor
= DefaultSelectionForeBrush.Color;
2057
SelectionForeColor
= DefaultSelectionForeBrush.Color,
2094
SelectionForeColor
= DefaultSelectionForeBrush.Color,
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
2848
inheritedCellStyle.
SelectionForeColor
= cellStyle.SelectionForeColor;
2852
inheritedCellStyle.
SelectionForeColor
= columnHeadersStyle.SelectionForeColor;
2856
inheritedCellStyle.
SelectionForeColor
= dataGridViewStyle.SelectionForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (7)
1896
inheritedCellStyleTmp.
SelectionForeColor
= Color.Empty;
2010
inheritedCellStyleTmp.
SelectionForeColor
= cellStyle.SelectionForeColor;
2014
inheritedCellStyleTmp.
SelectionForeColor
= rowStyle.SelectionForeColor;
2019
inheritedCellStyleTmp.
SelectionForeColor
= DataGridView.RowsDefaultCellStyle.SelectionForeColor;
2023
inheritedCellStyleTmp.
SelectionForeColor
= DataGridView.AlternatingRowsDefaultCellStyle.SelectionForeColor;
2027
inheritedCellStyleTmp.
SelectionForeColor
= columnStyle.SelectionForeColor;
2031
inheritedCellStyleTmp.
SelectionForeColor
= dataGridViewStyle.SelectionForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (2)
48
SelectionForeColor
= dataGridViewCellStyle.SelectionForeColor;
395
SelectionForeColor
= dataGridViewCellStyle.SelectionForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
474
inheritedCellStyleTmp.
SelectionForeColor
= columnStyle.SelectionForeColor;
478
inheritedCellStyleTmp.
SelectionForeColor
= dataGridViewStyle.SelectionForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
342
inheritedCellStyleTmp.
SelectionForeColor
= cellStyle.SelectionForeColor;
346
inheritedCellStyleTmp.
SelectionForeColor
= columnHeadersStyle.SelectionForeColor;
350
inheritedCellStyleTmp.
SelectionForeColor
= dataGridViewStyle.SelectionForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (7)
656
inheritedCellStyle.
SelectionForeColor
= cellStyle.SelectionForeColor;
660
inheritedCellStyle.
SelectionForeColor
= rowHeadersStyle.SelectionForeColor;
664
inheritedCellStyle.
SelectionForeColor
= dataGridViewStyle.SelectionForeColor;
866
inheritedRowStyle.
SelectionForeColor
= rowStyle.SelectionForeColor;
870
inheritedRowStyle.
SelectionForeColor
= rowsDefaultCellStyle.SelectionForeColor;
874
inheritedRowStyle.
SelectionForeColor
= alternatingRowsDefaultCellStyle.SelectionForeColor;
878
inheritedRowStyle.
SelectionForeColor
= dataGridViewStyle.SelectionForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
367
inheritedCellStyleTmp.
SelectionForeColor
= cellStyle.SelectionForeColor;
371
inheritedCellStyleTmp.
SelectionForeColor
= rowHeadersStyle.SelectionForeColor;
375
inheritedCellStyleTmp.
SelectionForeColor
= dataGridViewStyle.SelectionForeColor;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
405
destColumn.DefaultCellStyle.
SelectionForeColor
= srcColumn.DefaultCellStyle.SelectionForeColor;
System.Windows.Forms.Tests (20)
System\Windows\Forms\DataGridViewCellStyleTests.cs (15)
54
SelectionForeColor
= Color.Yellow,
541
SelectionForeColor
= value
546
style.
SelectionForeColor
= value;
555
SelectionForeColor
= Color.Red
557
style.
SelectionForeColor
= Color.Empty;
631
SelectionForeColor
= Color.Yellow,
674
SelectionForeColor
= Color.Yellow,
722
SelectionForeColor
= Color.Yellow,
788
SelectionForeColor
= Color.Yellow,
991
new DataGridViewCellStyle {
SelectionForeColor
= Color.Red },
992
new DataGridViewCellStyle {
SelectionForeColor
= Color.Red },
997
new DataGridViewCellStyle {
SelectionForeColor
= Color.Red },
998
new DataGridViewCellStyle {
SelectionForeColor
= Color.Blue },
1107
new DataGridViewCellStyle {
SelectionForeColor
= Color.Red },
1136
SelectionForeColor
= Color.Yellow,
System\Windows\Forms\DataGridViewRowTests.cs (2)
2074
SelectionForeColor
= Color.Red,
2090
SelectionForeColor
= Color.Yellow,
System\Windows\Forms\DataGridViewTests.cs (2)
798
yield return new object[] { new DataGridViewCellStyle {
SelectionForeColor
= Color.Empty } };
2343
SelectionForeColor
= SystemColors.HighlightText,
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
128
SelectionForeColor
= SystemColors.HighlightText,
WinFormsControlsTest (2)
DataGridViewTest.Designer.cs (2)
61
dataGridViewCellStyle1.
SelectionForeColor
= System.Drawing.SystemColors.HighlightText;
79
dataGridViewCellStyle3.
SelectionForeColor
= System.Drawing.SystemColors.HighlightText;
81 references to SelectionForeColor
System.Windows.Forms (66)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
1975
|| _defaultCellStyle.
SelectionForeColor
== Color.Empty
2000
if (_defaultCellStyle.
SelectionForeColor
== Color.Empty)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
2846
if (cellStyle is not null && !cellStyle.
SelectionForeColor
.IsEmpty)
2848
inheritedCellStyle.SelectionForeColor = cellStyle.
SelectionForeColor
;
2850
else if (!columnHeadersStyle.
SelectionForeColor
.IsEmpty)
2852
inheritedCellStyle.SelectionForeColor = columnHeadersStyle.
SelectionForeColor
;
2856
inheritedCellStyle.SelectionForeColor = dataGridViewStyle.
SelectionForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
668
Color foreBrushColor = cellSelected ? cellStyle.
SelectionForeColor
: cellStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
217
!defaultCellStyle.
SelectionForeColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (12)
2008
if (cellStyle is not null && !cellStyle.
SelectionForeColor
.IsEmpty)
2010
inheritedCellStyleTmp.SelectionForeColor = cellStyle.
SelectionForeColor
;
2012
else if (rowStyle is not null && !rowStyle.
SelectionForeColor
.IsEmpty)
2014
inheritedCellStyleTmp.SelectionForeColor = rowStyle.
SelectionForeColor
;
2016
else if (!DataGridView.RowsDefaultCellStyle.
SelectionForeColor
.IsEmpty &&
2017
(rowIndex % 2 == 0 || DataGridView.AlternatingRowsDefaultCellStyle.
SelectionForeColor
.IsEmpty))
2019
inheritedCellStyleTmp.SelectionForeColor = DataGridView.RowsDefaultCellStyle.
SelectionForeColor
;
2021
else if (rowIndex % 2 == 1 && !DataGridView.AlternatingRowsDefaultCellStyle.
SelectionForeColor
.IsEmpty)
2023
inheritedCellStyleTmp.SelectionForeColor = DataGridView.AlternatingRowsDefaultCellStyle.
SelectionForeColor
;
2025
else if (columnStyle is not null && !columnStyle.
SelectionForeColor
.IsEmpty)
2027
inheritedCellStyleTmp.SelectionForeColor = columnStyle.
SelectionForeColor
;
2031
inheritedCellStyleTmp.SelectionForeColor = dataGridViewStyle.
SelectionForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (8)
48
SelectionForeColor = dataGridViewCellStyle.
SelectionForeColor
;
393
if (!dataGridViewCellStyle.
SelectionForeColor
.IsEmpty)
395
SelectionForeColor = dataGridViewCellStyle.
SelectionForeColor
;
468
dgvcs.
SelectionForeColor
!=
SelectionForeColor
);
494
hash.Add(
SelectionForeColor
);
566
if (
SelectionForeColor
!= Color.Empty)
573
sb.Append($" SelectionForeColor={
SelectionForeColor
}");
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1294
foreBrushColor = cellSelected ? cellStyle.
SelectionForeColor
: cellStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
303
!defaultCellStyle.
SelectionForeColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (4)
216
!defaultCellStyle.
SelectionForeColor
.IsEmpty ||
472
if (columnStyle is not null && !columnStyle.
SelectionForeColor
.IsEmpty)
474
inheritedCellStyleTmp.SelectionForeColor = columnStyle.
SelectionForeColor
;
478
inheritedCellStyleTmp.SelectionForeColor = dataGridViewStyle.
SelectionForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (6)
340
if (cellStyle is not null && !cellStyle.
SelectionForeColor
.IsEmpty)
342
inheritedCellStyleTmp.SelectionForeColor = cellStyle.
SelectionForeColor
;
344
else if (!columnHeadersStyle.
SelectionForeColor
.IsEmpty)
346
inheritedCellStyleTmp.SelectionForeColor = columnHeadersStyle.
SelectionForeColor
;
350
inheritedCellStyleTmp.SelectionForeColor = dataGridViewStyle.
SelectionForeColor
;
915
textColor = cellSelected ? cellStyle.
SelectionForeColor
: cellStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
2329
textColor = cellSelected ? cellStyle.
SelectionForeColor
: cellStyle.ForeColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
279
!defaultCellStyle.
SelectionForeColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (13)
654
if (cellStyle is not null && !cellStyle.
SelectionForeColor
.IsEmpty)
656
inheritedCellStyle.SelectionForeColor = cellStyle.
SelectionForeColor
;
658
else if (!rowHeadersStyle.
SelectionForeColor
.IsEmpty)
660
inheritedCellStyle.SelectionForeColor = rowHeadersStyle.
SelectionForeColor
;
664
inheritedCellStyle.SelectionForeColor = dataGridViewStyle.
SelectionForeColor
;
864
if (rowStyle is not null && !rowStyle.
SelectionForeColor
.IsEmpty)
866
inheritedRowStyle.SelectionForeColor = rowStyle.
SelectionForeColor
;
868
else if (!rowsDefaultCellStyle.
SelectionForeColor
.IsEmpty && (rowIndex % 2 == 0 || alternatingRowsDefaultCellStyle.
SelectionForeColor
.IsEmpty))
870
inheritedRowStyle.SelectionForeColor = rowsDefaultCellStyle.
SelectionForeColor
;
872
else if (rowIndex % 2 == 1 && !alternatingRowsDefaultCellStyle.
SelectionForeColor
.IsEmpty)
874
inheritedRowStyle.SelectionForeColor = alternatingRowsDefaultCellStyle.
SelectionForeColor
;
878
inheritedRowStyle.SelectionForeColor = dataGridViewStyle.
SelectionForeColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (8)
365
if (cellStyle is not null && !cellStyle.
SelectionForeColor
.IsEmpty)
367
inheritedCellStyleTmp.SelectionForeColor = cellStyle.
SelectionForeColor
;
369
else if (!rowHeadersStyle.
SelectionForeColor
.IsEmpty)
371
inheritedCellStyleTmp.SelectionForeColor = rowHeadersStyle.
SelectionForeColor
;
375
inheritedCellStyleTmp.SelectionForeColor = dataGridViewStyle.
SelectionForeColor
;
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 (1)
749
cellSelected ? cellStyle.
SelectionForeColor
: cellStyle.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)
403
if (defaultSrcColumn is null || !defaultSrcColumn.DefaultCellStyle.
SelectionForeColor
.Equals(srcColumn.DefaultCellStyle.
SelectionForeColor
))
405
destColumn.DefaultCellStyle.SelectionForeColor = srcColumn.DefaultCellStyle.
SelectionForeColor
;
System.Windows.Forms.Tests (12)
System\Windows\Forms\DataGridViewCellStyleTests.cs (12)
33
Assert.Equal(Color.Empty, style.
SelectionForeColor
);
74
Assert.Equal(Color.Yellow, style.
SelectionForeColor
);
99
Assert.Equal(Color.Empty, style.
SelectionForeColor
);
543
Assert.Equal(value, style.
SelectionForeColor
);
547
Assert.Equal(value, style.
SelectionForeColor
);
558
Assert.Equal(Color.Empty, style.
SelectionForeColor
);
652
Assert.Equal(Color.Yellow, style.
SelectionForeColor
);
694
Assert.Equal(Color.Yellow, style.
SelectionForeColor
);
742
Assert.Equal(Color.Yellow, style.
SelectionForeColor
);
767
Assert.Equal(Color.Empty, style.
SelectionForeColor
);
808
Assert.Equal(Color.Yellow, style.
SelectionForeColor
);
833
Assert.Equal(Color.Empty, style.
SelectionForeColor
);