10 writes to Color
System.Drawing.Common.Tests (10)
System\Drawing\BrushesTests.cs (2)
168
brush.
Color
= Color.Red;
173
brush.
Color
= color;
System\Drawing\Drawing2D\HatchBrushTests.cs (1)
74
clone.
Color
= SystemColors.AppWorkspace;
System\Drawing\PenTests.cs (1)
69
brush.
Color
= Color.Blue;
System\Drawing\SolidBrushTests.cs (5)
35
brush.
Color
= Color.PapayaWhip;
45
clone.
Color
= SystemColors.AppWorkspace;
80
SolidBrush brush = new(Color.Goldenrod) {
Color
= Color.GhostWhite };
90
AssertExtensions.Throws<ArgumentException>(null, () => brush.
Color
= Color.WhiteSmoke);
97
AssertExtensions.Throws<ArgumentException>(null, () => brush.
Color
= Color.AntiqueWhite);
System\Drawing\SystemBrushesTests.cs (1)
53
AssertExtensions.Throws<ArgumentException>(null, () => brush.
Color
= Color.Red);
35 references to Color
System.Drawing.Common.Tests (19)
System\Drawing\BrushesTests.cs (3)
160
Assert.Equal(expectedColor, brush.
Color
);
165
Color color = brush.
Color
;
169
Assert.Equal(Color.Red, brush.
Color
);
System\Drawing\Drawing2D\HatchBrushTests.cs (2)
75
Assert.Equal(SystemColors.AppWorkspace, clone.
Color
);
76
Assert.Equal(Color.Bisque, brush.
Color
);
System\Drawing\PenTests.cs (3)
71
Assert.Equal(pen.Color, Assert.IsType<SolidBrush>(pen.Brush).
Color
);
215
Assert.Equal(((SolidBrush)pen.Brush).
Color
, ((SolidBrush)clone.Brush).
Color
);
System\Drawing\SolidBrushTests.cs (10)
19
Assert.Equal(expectedColor, brush.
Color
);
29
Assert.Equal(brush.
Color
.ToArgb(), clone.
Color
.ToArgb());
32
Assert.NotEqual(Color.PeachPuff, clone.
Color
);
36
Assert.NotEqual(Color.PapayaWhip, clone.
Color
);
46
Assert.Equal(SystemColors.AppWorkspace, clone.
Color
);
47
Assert.Equal(Color.Bisque, brush.
Color
);
65
AssertExtensions.Throws<ArgumentException>(null, () => brush.
Color
);
74
Assert.Equal(Color.Aquamarine, brush.
Color
);
81
Assert.Equal(Color.GhostWhite, brush.
Color
);
System\Drawing\SystemBrushesTests.cs (1)
52
Assert.Equal(expectedColor, brush.
Color
);
System.Windows.Forms (16)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (14)
1541
BackColor = DefaultHeadersBackBrush.
Color
,
1542
ForeColor = DefaultForeBrush.
Color
,
1543
SelectionBackColor = DefaultSelectionBackBrush.
Color
,
1544
SelectionForeColor = DefaultSelectionForeBrush.
Color
,
1990
defaultCellStyleTmp.ForeColor = SystemInformation.HighContrast ? DefaultForeBrush.
Color
: base.ForeColor;
1996
defaultCellStyleTmp.SelectionBackColor = DefaultSelectionBackBrush.
Color
;
2001
defaultCellStyleTmp.SelectionForeColor = DefaultSelectionForeBrush.
Color
;
2054
ForeColor = SystemInformation.HighContrast ? DefaultForeBrush.
Color
: base.ForeColor,
2055
SelectionBackColor = DefaultSelectionBackBrush.
Color
,
2056
SelectionForeColor = DefaultSelectionForeBrush.
Color
,
2090
BackColor = DefaultHeadersBackBrush.
Color
,
2091
ForeColor = DefaultForeBrush.
Color
,
2092
SelectionBackColor = DefaultSelectionBackBrush.
Color
,
2093
SelectionForeColor = DefaultSelectionForeBrush.
Color
,
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
1287
brushColor = linkBrush.
Color
;
1361
(int)PInvoke.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(foreBrush.
Color
)).Value);