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