58 writes to SelectionBackColor
System.Windows.Forms (31)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (4)
1543
SelectionBackColor
= DefaultSelectionBackBrush.Color,
1997
defaultCellStyleTmp.
SelectionBackColor
= DefaultSelectionBackBrush.Color;
2056
SelectionBackColor
= DefaultSelectionBackBrush.Color,
2093
SelectionBackColor
= DefaultSelectionBackBrush.Color,
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
2835
inheritedCellStyle.
SelectionBackColor
= cellStyle.SelectionBackColor;
2839
inheritedCellStyle.
SelectionBackColor
= columnHeadersStyle.SelectionBackColor;
2843
inheritedCellStyle.
SelectionBackColor
= dataGridViewStyle.SelectionBackColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (7)
1895
inheritedCellStyleTmp.
SelectionBackColor
= Color.Empty;
1984
inheritedCellStyleTmp.
SelectionBackColor
= cellStyle.SelectionBackColor;
1988
inheritedCellStyleTmp.
SelectionBackColor
= rowStyle.SelectionBackColor;
1993
inheritedCellStyleTmp.
SelectionBackColor
= DataGridView.RowsDefaultCellStyle.SelectionBackColor;
1997
inheritedCellStyleTmp.
SelectionBackColor
= DataGridView.AlternatingRowsDefaultCellStyle.SelectionBackColor;
2001
inheritedCellStyleTmp.
SelectionBackColor
= columnStyle.SelectionBackColor;
2005
inheritedCellStyleTmp.
SelectionBackColor
= dataGridViewStyle.SelectionBackColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (2)
47
SelectionBackColor
= dataGridViewCellStyle.SelectionBackColor;
390
SelectionBackColor
= dataGridViewCellStyle.SelectionBackColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
465
inheritedCellStyleTmp.
SelectionBackColor
= columnStyle.SelectionBackColor;
469
inheritedCellStyleTmp.
SelectionBackColor
= dataGridViewStyle.SelectionBackColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
329
inheritedCellStyleTmp.
SelectionBackColor
= cellStyle.SelectionBackColor;
333
inheritedCellStyleTmp.
SelectionBackColor
= columnHeadersStyle.SelectionBackColor;
337
inheritedCellStyleTmp.
SelectionBackColor
= dataGridViewStyle.SelectionBackColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (7)
643
inheritedCellStyle.
SelectionBackColor
= cellStyle.SelectionBackColor;
647
inheritedCellStyle.
SelectionBackColor
= rowHeadersStyle.SelectionBackColor;
651
inheritedCellStyle.
SelectionBackColor
= dataGridViewStyle.SelectionBackColor;
849
inheritedRowStyle.
SelectionBackColor
= rowStyle.SelectionBackColor;
853
inheritedRowStyle.
SelectionBackColor
= rowsDefaultCellStyle.SelectionBackColor;
857
inheritedRowStyle.
SelectionBackColor
= alternatingRowsDefaultCellStyle.SelectionBackColor;
861
inheritedRowStyle.
SelectionBackColor
= dataGridViewStyle.SelectionBackColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
354
inheritedCellStyleTmp.
SelectionBackColor
= cellStyle.SelectionBackColor;
358
inheritedCellStyleTmp.
SelectionBackColor
= rowHeadersStyle.SelectionBackColor;
362
inheritedCellStyleTmp.
SelectionBackColor
= dataGridViewStyle.SelectionBackColor;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
400
destColumn.DefaultCellStyle.
SelectionBackColor
= srcColumn.DefaultCellStyle.SelectionBackColor;
System.Windows.Forms.Tests (24)
System\Windows\Forms\DataGridViewCellStyleTests.cs (15)
53
SelectionBackColor
= Color.Green,
515
SelectionBackColor
= value
520
style.
SelectionBackColor
= value;
529
SelectionBackColor
= Color.Red
531
style.
SelectionBackColor
= Color.Empty;
630
SelectionBackColor
= Color.Green,
673
SelectionBackColor
= Color.Green,
721
SelectionBackColor
= Color.Green,
787
SelectionBackColor
= Color.Green,
979
new DataGridViewCellStyle {
SelectionBackColor
= Color.Red },
980
new DataGridViewCellStyle {
SelectionBackColor
= Color.Red },
985
new DataGridViewCellStyle {
SelectionBackColor
= Color.Red },
986
new DataGridViewCellStyle {
SelectionBackColor
= Color.Blue },
1102
new DataGridViewCellStyle {
SelectionBackColor
= Color.Red },
1135
SelectionBackColor
= Color.Green,
System\Windows\Forms\DataGridViewRowTests.cs (6)
2075
SelectionBackColor
= Color.Yellow,
2091
SelectionBackColor
= Color.Red,
4188
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.Selected, new DataGridViewCellStyle { BackColor = Color.Blue,
SelectionBackColor
= Color.Red }, true };
4189
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.Selected, new DataGridViewCellStyle { BackColor = Color.Blue,
SelectionBackColor
= Color.Red }, true };
4190
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.None, new DataGridViewCellStyle { BackColor = Color.Blue,
SelectionBackColor
= Color.Red }, true };
4191
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.None, new DataGridViewCellStyle { BackColor = Color.Blue,
SelectionBackColor
= Color.Red }, false };
System\Windows\Forms\DataGridViewTests.cs (2)
797
yield return new object[] { new DataGridViewCellStyle {
SelectionBackColor
= Color.Empty } };
2342
SelectionBackColor
= SystemColors.Highlight,
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
127
SelectionBackColor
= SystemColors.Highlight,
WinFormsControlsTest (2)
DataGridViewTest.Designer.cs (2)
60
dataGridViewCellStyle1.
SelectionBackColor
= System.Drawing.SystemColors.Highlight;
78
dataGridViewCellStyle3.
SelectionBackColor
= System.Drawing.SystemColors.Highlight;
86 references to SelectionBackColor
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
1016
(this.Selected) ? cellStyle.
SelectionBackColor
: cellStyle.BackColor);
System.Windows.Forms (70)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
1974
|| _defaultCellStyle.
SelectionBackColor
== Color.Empty
1995
if (_defaultCellStyle.
SelectionBackColor
== Color.Empty)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
2833
if (cellStyle is not null && !cellStyle.
SelectionBackColor
.IsEmpty)
2835
inheritedCellStyle.SelectionBackColor = cellStyle.
SelectionBackColor
;
2837
else if (!columnHeadersStyle.
SelectionBackColor
.IsEmpty)
2839
inheritedCellStyle.SelectionBackColor = columnHeadersStyle.
SelectionBackColor
;
2843
inheritedCellStyle.SelectionBackColor = dataGridViewStyle.
SelectionBackColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
666
? cellStyle.
SelectionBackColor
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
216
!defaultCellStyle.
SelectionBackColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (12)
1982
if (cellStyle is not null && !cellStyle.
SelectionBackColor
.IsEmpty)
1984
inheritedCellStyleTmp.SelectionBackColor = cellStyle.
SelectionBackColor
;
1986
else if (rowStyle is not null && !rowStyle.
SelectionBackColor
.IsEmpty)
1988
inheritedCellStyleTmp.SelectionBackColor = rowStyle.
SelectionBackColor
;
1990
else if (!DataGridView.RowsDefaultCellStyle.
SelectionBackColor
.IsEmpty &&
1991
(rowIndex % 2 == 0 || DataGridView.AlternatingRowsDefaultCellStyle.
SelectionBackColor
.IsEmpty))
1993
inheritedCellStyleTmp.SelectionBackColor = DataGridView.RowsDefaultCellStyle.
SelectionBackColor
;
1995
else if (rowIndex % 2 == 1 && !DataGridView.AlternatingRowsDefaultCellStyle.
SelectionBackColor
.IsEmpty)
1997
inheritedCellStyleTmp.SelectionBackColor = DataGridView.AlternatingRowsDefaultCellStyle.
SelectionBackColor
;
1999
else if (columnStyle is not null && !columnStyle.
SelectionBackColor
.IsEmpty)
2001
inheritedCellStyleTmp.SelectionBackColor = columnStyle.
SelectionBackColor
;
2005
inheritedCellStyleTmp.SelectionBackColor = dataGridViewStyle.
SelectionBackColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (8)
47
SelectionBackColor = dataGridViewCellStyle.
SelectionBackColor
;
388
if (!dataGridViewCellStyle.
SelectionBackColor
.IsEmpty)
390
SelectionBackColor = dataGridViewCellStyle.
SelectionBackColor
;
467
dgvcs.
SelectionBackColor
!=
SelectionBackColor
||
493
hash.Add(
SelectionBackColor
);
555
if (
SelectionBackColor
!= Color.Empty)
562
sb.Append($" SelectionBackColor={
SelectionBackColor
}");
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (2)
1119
? cellStyle.
SelectionBackColor
1296
? cellStyle.
SelectionBackColor
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
302
!defaultCellStyle.
SelectionBackColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (4)
215
!defaultCellStyle.
SelectionBackColor
.IsEmpty ||
463
if (columnStyle is not null && !columnStyle.
SelectionBackColor
.IsEmpty)
465
inheritedCellStyleTmp.SelectionBackColor = columnStyle.
SelectionBackColor
;
469
inheritedCellStyleTmp.SelectionBackColor = dataGridViewStyle.
SelectionBackColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (6)
327
if (cellStyle is not null && !cellStyle.
SelectionBackColor
.IsEmpty)
329
inheritedCellStyleTmp.SelectionBackColor = cellStyle.
SelectionBackColor
;
331
else if (!columnHeadersStyle.
SelectionBackColor
.IsEmpty)
333
inheritedCellStyleTmp.SelectionBackColor = columnHeadersStyle.
SelectionBackColor
;
337
inheritedCellStyleTmp.SelectionBackColor = dataGridViewStyle.
SelectionBackColor
;
868
? cellStyle.
SelectionBackColor
: cellStyle.BackColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
1259
DataGridView.EditingPanel.BackColor = dataGridViewCellStyle.
SelectionBackColor
;
1925
? cellStyle.
SelectionBackColor
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
545
? cellStyle.
SelectionBackColor
: cellStyle.BackColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
777
? cellStyle.
SelectionBackColor
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
278
!defaultCellStyle.
SelectionBackColor
.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
911
? cellStyle.
SelectionBackColor
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (14)
641
if (cellStyle is not null && !cellStyle.
SelectionBackColor
.IsEmpty)
643
inheritedCellStyle.SelectionBackColor = cellStyle.
SelectionBackColor
;
645
else if (!rowHeadersStyle.
SelectionBackColor
.IsEmpty)
647
inheritedCellStyle.SelectionBackColor = rowHeadersStyle.
SelectionBackColor
;
651
inheritedCellStyle.SelectionBackColor = dataGridViewStyle.
SelectionBackColor
;
847
if (rowStyle is not null && !rowStyle.
SelectionBackColor
.IsEmpty)
849
inheritedRowStyle.SelectionBackColor = rowStyle.
SelectionBackColor
;
851
else if (!rowsDefaultCellStyle.
SelectionBackColor
.IsEmpty && (rowIndex % 2 == 0 || alternatingRowsDefaultCellStyle.
SelectionBackColor
.IsEmpty))
853
inheritedRowStyle.SelectionBackColor = rowsDefaultCellStyle.
SelectionBackColor
;
855
else if (rowIndex % 2 == 1 && !alternatingRowsDefaultCellStyle.
SelectionBackColor
.IsEmpty)
857
inheritedRowStyle.SelectionBackColor = alternatingRowsDefaultCellStyle.
SelectionBackColor
;
861
inheritedRowStyle.SelectionBackColor = dataGridViewStyle.
SelectionBackColor
;
1194
backColor = cellStyle.
SelectionBackColor
;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (6)
352
if (cellStyle is not null && !cellStyle.
SelectionBackColor
.IsEmpty)
354
inheritedCellStyleTmp.SelectionBackColor = cellStyle.
SelectionBackColor
;
356
else if (!rowHeadersStyle.
SelectionBackColor
.IsEmpty)
358
inheritedCellStyleTmp.SelectionBackColor = rowHeadersStyle.
SelectionBackColor
;
362
inheritedCellStyleTmp.SelectionBackColor = dataGridViewStyle.
SelectionBackColor
;
736
? cellStyle.
SelectionBackColor
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
684
? cellStyle.
SelectionBackColor
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
265
? cellStyle.
SelectionBackColor
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
398
if (defaultSrcColumn is null || !defaultSrcColumn.DefaultCellStyle.
SelectionBackColor
.Equals(srcColumn.DefaultCellStyle.
SelectionBackColor
))
400
destColumn.DefaultCellStyle.SelectionBackColor = srcColumn.DefaultCellStyle.
SelectionBackColor
;
System.Windows.Forms.Tests (12)
System\Windows\Forms\DataGridViewCellStyleTests.cs (12)
32
Assert.Equal(Color.Empty, style.
SelectionBackColor
);
73
Assert.Equal(Color.Green, style.
SelectionBackColor
);
98
Assert.Equal(Color.Empty, style.
SelectionBackColor
);
517
Assert.Equal(value, style.
SelectionBackColor
);
521
Assert.Equal(value, style.
SelectionBackColor
);
532
Assert.Equal(Color.Empty, style.
SelectionBackColor
);
651
Assert.Equal(Color.Green, style.
SelectionBackColor
);
693
Assert.Equal(Color.Green, style.
SelectionBackColor
);
741
Assert.Equal(Color.Green, style.
SelectionBackColor
);
766
Assert.Equal(Color.Empty, style.
SelectionBackColor
);
807
Assert.Equal(Color.Green, style.
SelectionBackColor
);
832
Assert.Equal(Color.Empty, style.
SelectionBackColor
);