195 references to Brushes
Accessibility_Core_App (1)
PrintingControls.cs (1)
23
Brush brush =
Brushes
.Blue;
BinaryFormatTests (1)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
161
BinaryFormatWriter.TryWriteDrawingPrimitivesObject(stream,
Brushes
.AliceBlue).Should().BeFalse();
PresentationCore.Tests (1)
BinaryFormat\DataObjectTests.cs (1)
52
new System.Drawing.Pen(System.Drawing.
Brushes
.DeepSkyBlue, 1),
System.Drawing (1)
System.Drawing.cs (1)
8
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
Brushes
))]
System.Drawing.Common.Tests (164)
mono\System.Drawing\GraphicsTests.cs (13)
1151
Assert.Throws<ArgumentNullException>(() => g.FillRectangles(
Brushes
.Red, (Rectangle[])null));
1159
Assert.Throws<ArgumentException>(() => g.FillRectangles(
Brushes
.Red, Array.Empty<Rectangle>()));
1175
Assert.Throws<ArgumentNullException>(() => g.FillRectangles(
Brushes
.Red, (RectangleF[])null));
1183
Assert.Throws<ArgumentException>(() => g.FillRectangles(
Brushes
.Red, Array.Empty<RectangleF>()));
1195
g.FillRectangle(
Brushes
.Red, rect);
1215
g.FillRectangle(
Brushes
.Green, rect);
1389
g.FillRectangle(
Brushes
.Green, rect);
2093
g.DrawString("Test String", _font,
Brushes
.Black, rect, fmt);
2094
g.DrawString("Test String".AsSpan(), _font,
Brushes
.Black, rect, fmt);
2109
g.DrawString("Test String", _font,
Brushes
.Black, rect, fmt);
2110
g.DrawString("Test String".AsSpan(), _font,
Brushes
.Black, rect, fmt);
2907
Assert.Throws<ArgumentNullException>(() => g.FillPath(
Brushes
.Black, null));
2929
g.FillPath(
Brushes
.SteelBlue, path);
System\Drawing\BrushesTests.cs (141)
10
yield return Brush(() =>
Brushes
.AliceBlue, Color.AliceBlue);
11
yield return Brush(() =>
Brushes
.AntiqueWhite, Color.AntiqueWhite);
12
yield return Brush(() =>
Brushes
.Aqua, Color.Aqua);
13
yield return Brush(() =>
Brushes
.Aquamarine, Color.Aquamarine);
14
yield return Brush(() =>
Brushes
.Azure, Color.Azure);
15
yield return Brush(() =>
Brushes
.Beige, Color.Beige);
16
yield return Brush(() =>
Brushes
.Bisque, Color.Bisque);
17
yield return Brush(() =>
Brushes
.Black, Color.Black);
18
yield return Brush(() =>
Brushes
.BlanchedAlmond, Color.BlanchedAlmond);
19
yield return Brush(() =>
Brushes
.Blue, Color.Blue);
20
yield return Brush(() =>
Brushes
.BlueViolet, Color.BlueViolet);
21
yield return Brush(() =>
Brushes
.Brown, Color.Brown);
22
yield return Brush(() =>
Brushes
.BurlyWood, Color.BurlyWood);
23
yield return Brush(() =>
Brushes
.CadetBlue, Color.CadetBlue);
24
yield return Brush(() =>
Brushes
.Chartreuse, Color.Chartreuse);
25
yield return Brush(() =>
Brushes
.Chocolate, Color.Chocolate);
26
yield return Brush(() =>
Brushes
.Coral, Color.Coral);
27
yield return Brush(() =>
Brushes
.CornflowerBlue, Color.CornflowerBlue);
28
yield return Brush(() =>
Brushes
.Cornsilk, Color.Cornsilk);
29
yield return Brush(() =>
Brushes
.Crimson, Color.Crimson);
30
yield return Brush(() =>
Brushes
.Cyan, Color.Cyan);
31
yield return Brush(() =>
Brushes
.DarkBlue, Color.DarkBlue);
32
yield return Brush(() =>
Brushes
.DarkCyan, Color.DarkCyan);
33
yield return Brush(() =>
Brushes
.DarkGoldenrod, Color.DarkGoldenrod);
34
yield return Brush(() =>
Brushes
.DarkGray, Color.DarkGray);
35
yield return Brush(() =>
Brushes
.DarkGreen, Color.DarkGreen);
36
yield return Brush(() =>
Brushes
.DarkKhaki, Color.DarkKhaki);
37
yield return Brush(() =>
Brushes
.DarkMagenta, Color.DarkMagenta);
38
yield return Brush(() =>
Brushes
.DarkOliveGreen, Color.DarkOliveGreen);
39
yield return Brush(() =>
Brushes
.DarkOrange, Color.DarkOrange);
40
yield return Brush(() =>
Brushes
.DarkOrchid, Color.DarkOrchid);
41
yield return Brush(() =>
Brushes
.DarkRed, Color.DarkRed);
42
yield return Brush(() =>
Brushes
.DarkSalmon, Color.DarkSalmon);
43
yield return Brush(() =>
Brushes
.DarkSeaGreen, Color.DarkSeaGreen);
44
yield return Brush(() =>
Brushes
.DarkSlateBlue, Color.DarkSlateBlue);
45
yield return Brush(() =>
Brushes
.DarkSlateGray, Color.DarkSlateGray);
46
yield return Brush(() =>
Brushes
.DarkTurquoise, Color.DarkTurquoise);
47
yield return Brush(() =>
Brushes
.DarkViolet, Color.DarkViolet);
48
yield return Brush(() =>
Brushes
.DeepPink, Color.DeepPink);
49
yield return Brush(() =>
Brushes
.DeepSkyBlue, Color.DeepSkyBlue);
50
yield return Brush(() =>
Brushes
.DimGray, Color.DimGray);
51
yield return Brush(() =>
Brushes
.DodgerBlue, Color.DodgerBlue);
52
yield return Brush(() =>
Brushes
.Firebrick, Color.Firebrick);
53
yield return Brush(() =>
Brushes
.FloralWhite, Color.FloralWhite);
54
yield return Brush(() =>
Brushes
.ForestGreen, Color.ForestGreen);
55
yield return Brush(() =>
Brushes
.Fuchsia, Color.Fuchsia);
56
yield return Brush(() =>
Brushes
.Gainsboro, Color.Gainsboro);
57
yield return Brush(() =>
Brushes
.GhostWhite, Color.GhostWhite);
58
yield return Brush(() =>
Brushes
.Gold, Color.Gold);
59
yield return Brush(() =>
Brushes
.Goldenrod, Color.Goldenrod);
60
yield return Brush(() =>
Brushes
.Gray, Color.Gray);
61
yield return Brush(() =>
Brushes
.Green, Color.Green);
62
yield return Brush(() =>
Brushes
.GreenYellow, Color.GreenYellow);
63
yield return Brush(() =>
Brushes
.Honeydew, Color.Honeydew);
64
yield return Brush(() =>
Brushes
.HotPink, Color.HotPink);
65
yield return Brush(() =>
Brushes
.IndianRed, Color.IndianRed);
66
yield return Brush(() =>
Brushes
.Indigo, Color.Indigo);
67
yield return Brush(() =>
Brushes
.Ivory, Color.Ivory);
68
yield return Brush(() =>
Brushes
.Khaki, Color.Khaki);
69
yield return Brush(() =>
Brushes
.Lavender, Color.Lavender);
70
yield return Brush(() =>
Brushes
.LavenderBlush, Color.LavenderBlush);
71
yield return Brush(() =>
Brushes
.LawnGreen, Color.LawnGreen);
72
yield return Brush(() =>
Brushes
.LemonChiffon, Color.LemonChiffon);
73
yield return Brush(() =>
Brushes
.LightBlue, Color.LightBlue);
74
yield return Brush(() =>
Brushes
.LightCoral, Color.LightCoral);
75
yield return Brush(() =>
Brushes
.LightCyan, Color.LightCyan);
76
yield return Brush(() =>
Brushes
.LightGoldenrodYellow, Color.LightGoldenrodYellow);
77
yield return Brush(() =>
Brushes
.LightGray, Color.LightGray);
78
yield return Brush(() =>
Brushes
.LightGreen, Color.LightGreen);
79
yield return Brush(() =>
Brushes
.LightPink, Color.LightPink);
80
yield return Brush(() =>
Brushes
.LightSalmon, Color.LightSalmon);
81
yield return Brush(() =>
Brushes
.LightSeaGreen, Color.LightSeaGreen);
82
yield return Brush(() =>
Brushes
.LightSkyBlue, Color.LightSkyBlue);
83
yield return Brush(() =>
Brushes
.LightSlateGray, Color.LightSlateGray);
84
yield return Brush(() =>
Brushes
.LightSteelBlue, Color.LightSteelBlue);
85
yield return Brush(() =>
Brushes
.LightYellow, Color.LightYellow);
86
yield return Brush(() =>
Brushes
.Lime, Color.Lime);
87
yield return Brush(() =>
Brushes
.LimeGreen, Color.LimeGreen);
88
yield return Brush(() =>
Brushes
.Linen, Color.Linen);
89
yield return Brush(() =>
Brushes
.Magenta, Color.Magenta);
90
yield return Brush(() =>
Brushes
.Maroon, Color.Maroon);
91
yield return Brush(() =>
Brushes
.MediumAquamarine, Color.MediumAquamarine);
92
yield return Brush(() =>
Brushes
.MediumBlue, Color.MediumBlue);
93
yield return Brush(() =>
Brushes
.MediumOrchid, Color.MediumOrchid);
94
yield return Brush(() =>
Brushes
.MediumPurple, Color.MediumPurple);
95
yield return Brush(() =>
Brushes
.MediumSeaGreen, Color.MediumSeaGreen);
96
yield return Brush(() =>
Brushes
.MediumSlateBlue, Color.MediumSlateBlue);
97
yield return Brush(() =>
Brushes
.MediumSpringGreen, Color.MediumSpringGreen);
98
yield return Brush(() =>
Brushes
.MediumTurquoise, Color.MediumTurquoise);
99
yield return Brush(() =>
Brushes
.MediumVioletRed, Color.MediumVioletRed);
100
yield return Brush(() =>
Brushes
.MidnightBlue, Color.MidnightBlue);
101
yield return Brush(() =>
Brushes
.MintCream, Color.MintCream);
102
yield return Brush(() =>
Brushes
.MistyRose, Color.MistyRose);
103
yield return Brush(() =>
Brushes
.Moccasin, Color.Moccasin);
104
yield return Brush(() =>
Brushes
.NavajoWhite, Color.NavajoWhite);
105
yield return Brush(() =>
Brushes
.Navy, Color.Navy);
106
yield return Brush(() =>
Brushes
.OldLace, Color.OldLace);
107
yield return Brush(() =>
Brushes
.Olive, Color.Olive);
108
yield return Brush(() =>
Brushes
.OliveDrab, Color.OliveDrab);
109
yield return Brush(() =>
Brushes
.Orange, Color.Orange);
110
yield return Brush(() =>
Brushes
.OrangeRed, Color.OrangeRed);
111
yield return Brush(() =>
Brushes
.Orchid, Color.Orchid);
112
yield return Brush(() =>
Brushes
.PaleGoldenrod, Color.PaleGoldenrod);
113
yield return Brush(() =>
Brushes
.PaleGreen, Color.PaleGreen);
114
yield return Brush(() =>
Brushes
.PaleTurquoise, Color.PaleTurquoise);
115
yield return Brush(() =>
Brushes
.PaleVioletRed, Color.PaleVioletRed);
116
yield return Brush(() =>
Brushes
.PapayaWhip, Color.PapayaWhip);
117
yield return Brush(() =>
Brushes
.PeachPuff, Color.PeachPuff);
118
yield return Brush(() =>
Brushes
.Peru, Color.Peru);
119
yield return Brush(() =>
Brushes
.Pink, Color.Pink);
120
yield return Brush(() =>
Brushes
.Plum, Color.Plum);
121
yield return Brush(() =>
Brushes
.PowderBlue, Color.PowderBlue);
122
yield return Brush(() =>
Brushes
.Purple, Color.Purple);
123
yield return Brush(() =>
Brushes
.Red, Color.Red);
124
yield return Brush(() =>
Brushes
.RosyBrown, Color.RosyBrown);
125
yield return Brush(() =>
Brushes
.RoyalBlue, Color.RoyalBlue);
126
yield return Brush(() =>
Brushes
.SaddleBrown, Color.SaddleBrown);
127
yield return Brush(() =>
Brushes
.Salmon, Color.Salmon);
128
yield return Brush(() =>
Brushes
.SandyBrown, Color.SandyBrown);
129
yield return Brush(() =>
Brushes
.SeaGreen, Color.SeaGreen);
130
yield return Brush(() =>
Brushes
.SeaShell, Color.SeaShell);
131
yield return Brush(() =>
Brushes
.Sienna, Color.Sienna);
132
yield return Brush(() =>
Brushes
.Silver, Color.Silver);
133
yield return Brush(() =>
Brushes
.SkyBlue, Color.SkyBlue);
134
yield return Brush(() =>
Brushes
.SlateBlue, Color.SlateBlue);
135
yield return Brush(() =>
Brushes
.SlateGray, Color.SlateGray);
136
yield return Brush(() =>
Brushes
.Snow, Color.Snow);
137
yield return Brush(() =>
Brushes
.SpringGreen, Color.SpringGreen);
138
yield return Brush(() =>
Brushes
.SteelBlue, Color.SteelBlue);
139
yield return Brush(() =>
Brushes
.Tan, Color.Tan);
140
yield return Brush(() =>
Brushes
.Teal, Color.Teal);
141
yield return Brush(() =>
Brushes
.Thistle, Color.Thistle);
142
yield return Brush(() =>
Brushes
.Tomato, Color.Tomato);
143
yield return Brush(() =>
Brushes
.Transparent, Color.Transparent);
144
yield return Brush(() =>
Brushes
.Turquoise, Color.Turquoise);
145
yield return Brush(() =>
Brushes
.Violet, Color.Violet);
146
yield return Brush(() =>
Brushes
.Wheat, Color.Wheat);
147
yield return Brush(() =>
Brushes
.White, Color.White);
148
yield return Brush(() =>
Brushes
.WhiteSmoke, Color.WhiteSmoke);
149
yield return Brush(() =>
Brushes
.Yellow, Color.Yellow);
150
yield return Brush(() =>
Brushes
.YellowGreen, Color.YellowGreen);
System\Drawing\Drawing2D\HatchBrushTests.cs (1)
71
SolidBrush brush = Assert.IsType<SolidBrush>(
Brushes
.Bisque);
System\Drawing\GraphicsTests.cs (4)
2784
graphics.DrawString("Test text", SystemFonts.DefaultFont,
Brushes
.White, default(Point));
2796
() => graphics.DrawString("Test text", SystemFonts.DefaultFont,
Brushes
.White, default(Point)));
2953
graphics.FillRoundedRectangle(
Brushes
.Green, new(0, 0, 10, 10), new(2, 2));
2962
graphics.FillRoundedRectangle(
Brushes
.Green, new RectangleF(0, 0, 10, 10), new(2, 2));
System\Drawing\Imaging\Effects\EffectsTests.cs (1)
13
graphics.FillRectangle(
Brushes
.White, new(default, bitmap.Size));
System\Drawing\Imaging\ImageAttributesTests.cs (2)
132
graphicsSmallBitmap.FillRectangle(
Brushes
.White, 0, 0, 100, 100);
134
graphicsBigBitmap.FillRectangle(
Brushes
.White, 0, 0, 200, 100);
System\Drawing\RegionTests.cs (1)
486
graphics.FillRegion(
Brushes
.Blue, region1);
System\Drawing\SolidBrushTests.cs (1)
42
SolidBrush brush = Assert.IsType<SolidBrush>(
Brushes
.Bisque);
System.Windows.Forms (5)
System\Windows\Forms\Control.cs (2)
8126
e.Graphics.FillRectangle(
Brushes
.White, rectangle);
11741
bufferedGraphics2.Graphics.FillRectangle(
Brushes
.Red, band);
System\Windows\Forms\Rendering\ControlPaint.cs (3)
1277
Brush brush =
Brushes
.White;
1492
? enabled ? (s_grabBrushPrimary ??=
Brushes
.White) : SystemBrushes.Control
1493
: enabled ? (s_grabBrushSecondary ??=
Brushes
.Black) : SystemBrushes.Control;
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\ControlDesigner.cs (3)
2273
e.Graphics.FillRectangle(
Brushes
.White, clientRectangle);
2286
e.Graphics.FillRectangle(
Brushes
.White, imageRect);
2293
e.Graphics.FillRectangle(
Brushes
.White, textRect);
System.Windows.Forms.Primitives (17)
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (17)
85
KnownColor.Black =>
Brushes
.Black,
86
KnownColor.White =>
Brushes
.White,
87
KnownColor.Gray =>
Brushes
.Gray,
88
KnownColor.Red =>
Brushes
.Red,
89
KnownColor.Green =>
Brushes
.Green,
90
KnownColor.Blue =>
Brushes
.Blue,
91
KnownColor.Yellow =>
Brushes
.Yellow,
92
KnownColor.Brown =>
Brushes
.Brown,
93
KnownColor.LightGray =>
Brushes
.LightGray,
94
KnownColor.LightGreen =>
Brushes
.LightGreen,
95
KnownColor.LightBlue =>
Brushes
.LightBlue,
96
KnownColor.LightYellow =>
Brushes
.LightYellow,
97
KnownColor.DarkGray =>
Brushes
.DarkGray,
98
KnownColor.DarkRed =>
Brushes
.DarkRed,
99
KnownColor.DarkGreen =>
Brushes
.DarkGreen,
100
KnownColor.DarkBlue =>
Brushes
.DarkBlue,
101
KnownColor.Transparent =>
Brushes
.Transparent,
WinFormsControlsTest (2)
ListBoxes.cs (2)
39
customBrush =
Brushes
.Green;
43
customBrush =
Brushes
.Red;