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