145 instantiations of Color
System.Drawing.Primitives (145)
System\Drawing\Color.cs (145)
24
public static Color Transparent => new
Color
(KnownColor.Transparent);
26
public static Color AliceBlue => new
Color
(KnownColor.AliceBlue);
28
public static Color AntiqueWhite => new
Color
(KnownColor.AntiqueWhite);
30
public static Color Aqua => new
Color
(KnownColor.Aqua);
32
public static Color Aquamarine => new
Color
(KnownColor.Aquamarine);
34
public static Color Azure => new
Color
(KnownColor.Azure);
36
public static Color Beige => new
Color
(KnownColor.Beige);
38
public static Color Bisque => new
Color
(KnownColor.Bisque);
40
public static Color Black => new
Color
(KnownColor.Black);
42
public static Color BlanchedAlmond => new
Color
(KnownColor.BlanchedAlmond);
44
public static Color Blue => new
Color
(KnownColor.Blue);
46
public static Color BlueViolet => new
Color
(KnownColor.BlueViolet);
48
public static Color Brown => new
Color
(KnownColor.Brown);
50
public static Color BurlyWood => new
Color
(KnownColor.BurlyWood);
52
public static Color CadetBlue => new
Color
(KnownColor.CadetBlue);
54
public static Color Chartreuse => new
Color
(KnownColor.Chartreuse);
56
public static Color Chocolate => new
Color
(KnownColor.Chocolate);
58
public static Color Coral => new
Color
(KnownColor.Coral);
60
public static Color CornflowerBlue => new
Color
(KnownColor.CornflowerBlue);
62
public static Color Cornsilk => new
Color
(KnownColor.Cornsilk);
64
public static Color Crimson => new
Color
(KnownColor.Crimson);
66
public static Color Cyan => new
Color
(KnownColor.Cyan);
68
public static Color DarkBlue => new
Color
(KnownColor.DarkBlue);
70
public static Color DarkCyan => new
Color
(KnownColor.DarkCyan);
72
public static Color DarkGoldenrod => new
Color
(KnownColor.DarkGoldenrod);
74
public static Color DarkGray => new
Color
(KnownColor.DarkGray);
76
public static Color DarkGreen => new
Color
(KnownColor.DarkGreen);
78
public static Color DarkKhaki => new
Color
(KnownColor.DarkKhaki);
80
public static Color DarkMagenta => new
Color
(KnownColor.DarkMagenta);
82
public static Color DarkOliveGreen => new
Color
(KnownColor.DarkOliveGreen);
84
public static Color DarkOrange => new
Color
(KnownColor.DarkOrange);
86
public static Color DarkOrchid => new
Color
(KnownColor.DarkOrchid);
88
public static Color DarkRed => new
Color
(KnownColor.DarkRed);
90
public static Color DarkSalmon => new
Color
(KnownColor.DarkSalmon);
92
public static Color DarkSeaGreen => new
Color
(KnownColor.DarkSeaGreen);
94
public static Color DarkSlateBlue => new
Color
(KnownColor.DarkSlateBlue);
96
public static Color DarkSlateGray => new
Color
(KnownColor.DarkSlateGray);
98
public static Color DarkTurquoise => new
Color
(KnownColor.DarkTurquoise);
100
public static Color DarkViolet => new
Color
(KnownColor.DarkViolet);
102
public static Color DeepPink => new
Color
(KnownColor.DeepPink);
104
public static Color DeepSkyBlue => new
Color
(KnownColor.DeepSkyBlue);
106
public static Color DimGray => new
Color
(KnownColor.DimGray);
108
public static Color DodgerBlue => new
Color
(KnownColor.DodgerBlue);
110
public static Color Firebrick => new
Color
(KnownColor.Firebrick);
112
public static Color FloralWhite => new
Color
(KnownColor.FloralWhite);
114
public static Color ForestGreen => new
Color
(KnownColor.ForestGreen);
116
public static Color Fuchsia => new
Color
(KnownColor.Fuchsia);
118
public static Color Gainsboro => new
Color
(KnownColor.Gainsboro);
120
public static Color GhostWhite => new
Color
(KnownColor.GhostWhite);
122
public static Color Gold => new
Color
(KnownColor.Gold);
124
public static Color Goldenrod => new
Color
(KnownColor.Goldenrod);
126
public static Color Gray => new
Color
(KnownColor.Gray);
128
public static Color Green => new
Color
(KnownColor.Green);
130
public static Color GreenYellow => new
Color
(KnownColor.GreenYellow);
132
public static Color Honeydew => new
Color
(KnownColor.Honeydew);
134
public static Color HotPink => new
Color
(KnownColor.HotPink);
136
public static Color IndianRed => new
Color
(KnownColor.IndianRed);
138
public static Color Indigo => new
Color
(KnownColor.Indigo);
140
public static Color Ivory => new
Color
(KnownColor.Ivory);
142
public static Color Khaki => new
Color
(KnownColor.Khaki);
144
public static Color Lavender => new
Color
(KnownColor.Lavender);
146
public static Color LavenderBlush => new
Color
(KnownColor.LavenderBlush);
148
public static Color LawnGreen => new
Color
(KnownColor.LawnGreen);
150
public static Color LemonChiffon => new
Color
(KnownColor.LemonChiffon);
152
public static Color LightBlue => new
Color
(KnownColor.LightBlue);
154
public static Color LightCoral => new
Color
(KnownColor.LightCoral);
156
public static Color LightCyan => new
Color
(KnownColor.LightCyan);
158
public static Color LightGoldenrodYellow => new
Color
(KnownColor.LightGoldenrodYellow);
160
public static Color LightGreen => new
Color
(KnownColor.LightGreen);
162
public static Color LightGray => new
Color
(KnownColor.LightGray);
164
public static Color LightPink => new
Color
(KnownColor.LightPink);
166
public static Color LightSalmon => new
Color
(KnownColor.LightSalmon);
168
public static Color LightSeaGreen => new
Color
(KnownColor.LightSeaGreen);
170
public static Color LightSkyBlue => new
Color
(KnownColor.LightSkyBlue);
172
public static Color LightSlateGray => new
Color
(KnownColor.LightSlateGray);
174
public static Color LightSteelBlue => new
Color
(KnownColor.LightSteelBlue);
176
public static Color LightYellow => new
Color
(KnownColor.LightYellow);
178
public static Color Lime => new
Color
(KnownColor.Lime);
180
public static Color LimeGreen => new
Color
(KnownColor.LimeGreen);
182
public static Color Linen => new
Color
(KnownColor.Linen);
184
public static Color Magenta => new
Color
(KnownColor.Magenta);
186
public static Color Maroon => new
Color
(KnownColor.Maroon);
188
public static Color MediumAquamarine => new
Color
(KnownColor.MediumAquamarine);
190
public static Color MediumBlue => new
Color
(KnownColor.MediumBlue);
192
public static Color MediumOrchid => new
Color
(KnownColor.MediumOrchid);
194
public static Color MediumPurple => new
Color
(KnownColor.MediumPurple);
196
public static Color MediumSeaGreen => new
Color
(KnownColor.MediumSeaGreen);
198
public static Color MediumSlateBlue => new
Color
(KnownColor.MediumSlateBlue);
200
public static Color MediumSpringGreen => new
Color
(KnownColor.MediumSpringGreen);
202
public static Color MediumTurquoise => new
Color
(KnownColor.MediumTurquoise);
204
public static Color MediumVioletRed => new
Color
(KnownColor.MediumVioletRed);
206
public static Color MidnightBlue => new
Color
(KnownColor.MidnightBlue);
208
public static Color MintCream => new
Color
(KnownColor.MintCream);
210
public static Color MistyRose => new
Color
(KnownColor.MistyRose);
212
public static Color Moccasin => new
Color
(KnownColor.Moccasin);
214
public static Color NavajoWhite => new
Color
(KnownColor.NavajoWhite);
216
public static Color Navy => new
Color
(KnownColor.Navy);
218
public static Color OldLace => new
Color
(KnownColor.OldLace);
220
public static Color Olive => new
Color
(KnownColor.Olive);
222
public static Color OliveDrab => new
Color
(KnownColor.OliveDrab);
224
public static Color Orange => new
Color
(KnownColor.Orange);
226
public static Color OrangeRed => new
Color
(KnownColor.OrangeRed);
228
public static Color Orchid => new
Color
(KnownColor.Orchid);
230
public static Color PaleGoldenrod => new
Color
(KnownColor.PaleGoldenrod);
232
public static Color PaleGreen => new
Color
(KnownColor.PaleGreen);
234
public static Color PaleTurquoise => new
Color
(KnownColor.PaleTurquoise);
236
public static Color PaleVioletRed => new
Color
(KnownColor.PaleVioletRed);
238
public static Color PapayaWhip => new
Color
(KnownColor.PapayaWhip);
240
public static Color PeachPuff => new
Color
(KnownColor.PeachPuff);
242
public static Color Peru => new
Color
(KnownColor.Peru);
244
public static Color Pink => new
Color
(KnownColor.Pink);
246
public static Color Plum => new
Color
(KnownColor.Plum);
248
public static Color PowderBlue => new
Color
(KnownColor.PowderBlue);
250
public static Color Purple => new
Color
(KnownColor.Purple);
256
public static Color RebeccaPurple => new
Color
(KnownColor.RebeccaPurple);
258
public static Color Red => new
Color
(KnownColor.Red);
260
public static Color RosyBrown => new
Color
(KnownColor.RosyBrown);
262
public static Color RoyalBlue => new
Color
(KnownColor.RoyalBlue);
264
public static Color SaddleBrown => new
Color
(KnownColor.SaddleBrown);
266
public static Color Salmon => new
Color
(KnownColor.Salmon);
268
public static Color SandyBrown => new
Color
(KnownColor.SandyBrown);
270
public static Color SeaGreen => new
Color
(KnownColor.SeaGreen);
272
public static Color SeaShell => new
Color
(KnownColor.SeaShell);
274
public static Color Sienna => new
Color
(KnownColor.Sienna);
276
public static Color Silver => new
Color
(KnownColor.Silver);
278
public static Color SkyBlue => new
Color
(KnownColor.SkyBlue);
280
public static Color SlateBlue => new
Color
(KnownColor.SlateBlue);
282
public static Color SlateGray => new
Color
(KnownColor.SlateGray);
284
public static Color Snow => new
Color
(KnownColor.Snow);
286
public static Color SpringGreen => new
Color
(KnownColor.SpringGreen);
288
public static Color SteelBlue => new
Color
(KnownColor.SteelBlue);
290
public static Color Tan => new
Color
(KnownColor.Tan);
292
public static Color Teal => new
Color
(KnownColor.Teal);
294
public static Color Thistle => new
Color
(KnownColor.Thistle);
296
public static Color Tomato => new
Color
(KnownColor.Tomato);
298
public static Color Turquoise => new
Color
(KnownColor.Turquoise);
300
public static Color Violet => new
Color
(KnownColor.Violet);
302
public static Color Wheat => new
Color
(KnownColor.Wheat);
304
public static Color White => new
Color
(KnownColor.White);
306
public static Color WhiteSmoke => new
Color
(KnownColor.WhiteSmoke);
308
public static Color Yellow => new
Color
(KnownColor.Yellow);
310
public static Color YellowGreen => new
Color
(KnownColor.YellowGreen);
441
private static Color FromArgb(uint argb) => new
Color
(argb, StateARGBValueValid, null, (KnownColor)0);
473
color <= 0 || color > KnownColor.RebeccaPurple ? FromName(color.ToString()) : new
Color
(color);
482
return new
Color
(NotDefinedValue, StateNameValid, name, (KnownColor)0);
8761 references to Color
Accessibility_Core_App (60)
CommonControl1.Designer.cs (5)
665
this.dateTimePicker1.CalendarForeColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
666
this.dateTimePicker1.CalendarMonthBackground = System.Drawing.
Color
.Yellow;
667
this.dateTimePicker1.CalendarTitleBackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
668
this.dateTimePicker1.CalendarTitleForeColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
669
this.dateTimePicker1.CalendarTrailingForeColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
CommonControl2.Designer.cs (1)
99
this.progressBar1.BackColor = System.Drawing.
Color
.Lime;
ContainerControls.Designer.cs (3)
122
this.flowLayoutPanel2.BackColor = System.Drawing.
Color
.White;
521
this.flowLayoutPanel1.BackColor = System.Drawing.
Color
.White;
705
this.flowLayoutPanel3.BackColor = System.Drawing.
Color
.White;
ContainerControls2.Designer.cs (11)
90
this.splitContainer1.Panel1.BackColor = System.Drawing.
Color
.Silver;
96
this.splitContainer1.Panel2.BackColor = System.Drawing.
Color
.Red;
137
this.tableLayoutPanel1.BackColor = System.Drawing.
Color
.Red;
270
this.flowLayoutPanel4.BackColor = System.Drawing.
Color
.Green;
289
this.groupBox5.BackColor = System.Drawing.
Color
.Green;
312
this.panel4.BackColor = System.Drawing.
Color
.Green;
337
this.splitContainer2.Panel1.BackColor = System.Drawing.
Color
.Green;
341
this.splitContainer2.Panel2.BackColor = System.Drawing.
Color
.Red;
370
this.tabPage7.BackColor = System.Drawing.
Color
.Green;
381
this.tabPage8.BackColor = System.Drawing.
Color
.Red;
402
this.tableLayoutPanel2.BackColor = System.Drawing.
Color
.Green;
DataControls.Designer.cs (3)
199
this.toolStripButton1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
213
this.toolStripSplitButton1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
221
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
Menu_Toolbars_controls.Designer.cs (17)
165
newToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
174
openToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
188
saveToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
208
printToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
217
printPreviewToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
263
cutToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
272
copyToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
281
pasteToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
436
toolStripDropDownButton1.ImageTransparentColor =
Color
.Magenta;
462
toolStripSplitButton1.ImageTransparentColor =
Color
.Magenta;
515
newToolStripButton.ImageTransparentColor =
Color
.Magenta;
529
toolStripButton1.ImageTransparentColor =
Color
.Magenta;
539
toolStripButton2.ImageTransparentColor =
Color
.Magenta;
551
toolStripButton3.ImageTransparentColor =
Color
.Magenta;
562
toolStripButton4.ImageTransparentColor =
Color
.Magenta;
574
toolStripButton5.ImageTransparentColor =
Color
.Magenta;
585
toolStripButton6.ImageTransparentColor =
Color
.Magenta;
ToolStripContainer.Designer.cs (20)
154
this.toolStripButton1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
165
this.toolStripSplitButton1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
180
this.newToolStripButton.ImageTransparentColor = System.Drawing.
Color
.Magenta;
189
this.openToolStripButton.ImageTransparentColor = System.Drawing.
Color
.Magenta;
198
this.saveToolStripButton.ImageTransparentColor = System.Drawing.
Color
.Magenta;
207
this.printToolStripButton.ImageTransparentColor = System.Drawing.
Color
.Magenta;
221
this.cutToolStripButton.ImageTransparentColor = System.Drawing.
Color
.Magenta;
230
this.copyToolStripButton.ImageTransparentColor = System.Drawing.
Color
.Magenta;
239
this.pasteToolStripButton.ImageTransparentColor = System.Drawing.
Color
.Magenta;
253
this.helpToolStripButton.ImageTransparentColor = System.Drawing.
Color
.Magenta;
294
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
309
this.toolStripSplitButton2.ImageTransparentColor = System.Drawing.
Color
.Magenta;
383
this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.
Color
.Magenta;
391
this.openToolStripMenuItem.ImageTransparentColor = System.Drawing.
Color
.Magenta;
404
this.saveToolStripMenuItem.ImageTransparentColor = System.Drawing.
Color
.Magenta;
423
this.printToolStripMenuItem.ImageTransparentColor = System.Drawing.
Color
.Magenta;
431
this.printPreviewToolStripMenuItem.ImageTransparentColor = System.Drawing.
Color
.Magenta;
483
this.cutToolStripMenuItem.ImageTransparentColor = System.Drawing.
Color
.Magenta;
491
this.copyToolStripMenuItem.ImageTransparentColor = System.Drawing.
Color
.Magenta;
499
this.pasteToolStripMenuItem.ImageTransparentColor = System.Drawing.
Color
.Magenta;
BinaryFormatTests (14)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
57
typeof(
Color
)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (11)
82
if (value is
Color
color)
84
deserialized.Should().BeOfType<
Color
>().Which.Should().BeEquivalentTo(color);
138
if (value is
Color
color)
140
deserialized.Should().BeOfType<
Color
>().Which.Should().BeEquivalentTo(color);
200
Color
.Empty,
201
Color
.AliceBlue,
202
Color
.FromKnownColor(KnownColor.ActiveCaption),
203
Color
.FromArgb(1, 2, 3),
204
Color
.FromArgb(4,
Color
.Yellow),
205
Color
.FromName("Blue"),
SerializationRecordExtensionsTests.cs (2)
71
if (value is
Color
color)
73
deserialized.Should().BeOfType<
Color
>().Which.Should().BeEquivalentTo(color);
DesignSurface (32)
CustomControls\CustomButtonDesignerActionList.cs (7)
56
Color
backColor = (
Color
)dockProp.GetValue(Component);
57
if (backColor !=
Color
.Yellow)
79
Color
backColor = _control.BackColor;
80
_control.BackColor = backColor !=
Color
.Yellow ?
Color
.Yellow :
Color
.Blue;
MainForm.cs (20)
124
rootComponent.BackColor =
Color
.Gray;
133
b1.BackColor =
Color
.LightGray;
134
b2.BackColor =
Color
.LightGreen;
153
pnl.BackColor =
Color
.Aquamarine;
164
l1.BackColor =
Color
.Coral;
165
l2.BackColor =
Color
.LightGreen;
169
sct.BackColor =
Color
.White;
185
rootComponent.BackColor =
Color
.Yellow;
194
b1.BackColor =
Color
.Coral;
196
l1.BackColor =
Color
.Coral;
214
rootComponent.BackColor =
Color
.YellowGreen;
226
b3.BackColor =
Color
.LightGray;
236
rootComponent.BackColor =
Color
.Orange;
244
b1.BackColor =
Color
.Gold;
245
b2.BackColor =
Color
.LightGreen;
271
rootComponent.BackColor =
Color
.Orange;
293
rootComponent.BackColor =
Color
.Pink;
324
splitContainer.BackColor =
Color
.Red;
333
userControl.BackColor =
Color
.LightSkyBlue;
349
splitter.BackColor =
Color
.Green;
MainForm.Designer.cs (3)
214
this.ToolStripMenuItemCut.ImageTransparentColor = System.Drawing.
Color
.Magenta;
224
this.ToolStripMenuItemCopy.ImageTransparentColor = System.Drawing.
Color
.Magenta;
234
this.ToolStripMenuItemPaste.ImageTransparentColor = System.Drawing.
Color
.Magenta;
MainForm.MyScrollableControl.cs (1)
20
BackColor =
Color
.Red;
MainForm.MyUserControl.cs (1)
23
BackColor =
Color
.LightBlue;
DesignSurfaceExt (3)
DesignSurfaceExt.cs (3)
125
ctrl.BackColor =
Color
.LightGray;
135
ctrl.BackColor =
Color
.DarkGray;
145
ctrl.BackColor =
Color
.White;
Microsoft.VisualStudio.LanguageServices (1)
VSWpfThemeService.cs (1)
35
var
color = VSColorTheme.GetThemedColor(themeResourceKey);
netstandard (1)
netstandard.cs (1)
745
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
Color
))]
PresentationCore.Tests (2)
BinaryFormat\BinaryFormattedTypes.cs (1)
61
typeof(
Color
)
BinaryFormat\DataObjectTests.cs (1)
58
System.Drawing.
Color
.DeepSkyBlue, // Use a static property for Color
PresentationUI (8)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (3)
482
this._iconPictureBox.BackColor = System.Drawing.
Color
.Transparent;
522
this._documentDetailBox.BackColor = System.Drawing.
Color
.Transparent;
646
this._fileSystemBox.BackColor = System.Drawing.
Color
.Transparent;
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (1)
167
_pictureBox.BackColor = System.Drawing.
Color
.SeaGreen;
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (3)
127
this._pictureBox1.BackColor = System.Drawing.
Color
.SeaGreen;
180
this._pictureBox2.BackColor = System.Drawing.
Color
.SeaGreen;
199
this._pictureBox4.BackColor = System.Drawing.
Color
.SeaGreen;
MS\Internal\Documents\RMPublishingDialog.Designer.cs (1)
118
this.groupBoxMainContent.BackColor = System.Drawing.
Color
.Transparent;
System.ComponentModel.TypeConverter (32)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (11)
12
public static
Color
ConvertFromString(string strValue, CultureInfo culture)
20
return
Color
.Empty;
24
Color
c;
45
return
Color
.FromName(colorName);
52
return PossibleKnownColor(
Color
.FromArgb(unchecked((int)(0xFF000000 | (uint)IntFromString(text, culture)))));
64
1 => PossibleKnownColor(
Color
.FromArgb(IntFromString(textSpan[tokens[0]], culture))),
65
3 => PossibleKnownColor(
Color
.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture))),
66
4 => PossibleKnownColor(
Color
.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture), IntFromString(textSpan[tokens[3]], culture))),
71
private static
Color
PossibleKnownColor(
Color
color)
79
foreach (
Color
c in ColorTable.Colors.Values)
src\libraries\Common\src\System\Drawing\ColorTable.cs (10)
12
private static readonly Lazy<Dictionary<string,
Color
>> s_colorConstants = new Lazy<Dictionary<string,
Color
>>(GetColors);
14
private static Dictionary<string,
Color
> GetColors()
16
var colors = new Dictionary<string,
Color
>(StringComparer.OrdinalIgnoreCase);
17
FillWithProperties(colors, typeof(
Color
));
23
Dictionary<string,
Color
> dictionary,
28
if (prop.PropertyType == typeof(
Color
))
29
dictionary[prop.Name] = (
Color
)prop.GetValue(null, null)!;
33
internal static Dictionary<string,
Color
> Colors => s_colorConstants.Value;
35
internal static bool TryGetNamedColor(string name, out
Color
result) => Colors.TryGetValue(name, out result);
System\Drawing\ColorConverter.cs (11)
20
var set = new HashSet<
Color
>(ColorTable.Colors.Values);
52
if (value is
Color
c)
56
if (c ==
Color
.Empty)
103
member = typeof(
Color
).GetField("Empty");
107
member = typeof(
Color
).GetProperty(c.Name) ?? typeof(SystemColors).GetProperty(c.Name);
111
member = typeof(
Color
).GetMethod("FromArgb", new Type[] { typeof(int), typeof(int), typeof(int), typeof(int) });
116
member = typeof(
Color
).GetMethod("FromName", new Type[] { typeof(string) });
121
member = typeof(
Color
).GetMethod("FromArgb", new Type[] { typeof(int), typeof(int), typeof(int) });
147
private sealed class ColorComparer : IComparer<
Color
>
149
public int Compare(
Color
left,
Color
right) => string.CompareOrdinal(left.Name, right.Name);
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
174
typeof(
Color
),
System.Drawing (1)
System.Drawing.cs (1)
13
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
Color
))]
System.Drawing.Common (1)
Special\Forwards.cs (1)
6
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
Color
))]
System.Drawing.Common.Tests (1363)
Helpers.cs (11)
30
public static void VerifyBitmap(Bitmap bitmap,
Color
[][] colors)
36
Color
expectedColor =
Color
.FromArgb(colors[y][x].ToArgb());
37
Color
actualColor = bitmap.GetPixel(x, y);
47
private static EqualException GetBitmapEqualFailureException(Bitmap bitmap,
Color
[][] colors, int firstFailureX, int firstFailureY)
80
private static void PrintColor(StringBuilder stringBuilder,
Color
color)
85
public static
Color
EmptyColor =>
Color
.FromArgb(0, 0, 0, 0);
116
Color
emptyColor =
Color
.FromArgb(0);
121
Color
pixel = bmp.GetPixel(x, y);
mono\System.Drawing.Imaging\BmpCodecTests.cs (3)
432
using (Pen p = new(
Color
.BlueViolet, 2))
447
Color
color = bmpLoad.GetPixel(10, 10);
448
Assert.Equal(
Color
.FromArgb(255, 138, 43, 226), color);
mono\System.Drawing.Imaging\GifCodecTests.cs (4)
170
Color
c = bmp.GetPixel(0, i);
186
using (Pen p = new(
Color
.Red, 2))
199
Color
color = bmpLoad.GetPixel(10, 10);
202
Assert.Equal(
Color
.FromArgb(255, 255, 0, 0), color);
mono\System.Drawing.Imaging\IconCodecTests.cs (3)
1870
using (Pen p = new(
Color
.Red, 2))
1888
Color
color = bmpLoad.GetPixel(10, 10);
1889
Assert.Equal(
Color
.FromArgb(255, 255, 0, 0), color);
mono\System.Drawing.Imaging\JpegCodecTests.cs (3)
75
Color
c = cp.Entries[i];
351
using (Pen p = new(
Color
.Red, 2))
364
Color
color = bmpLoad.GetPixel(10, 10);
mono\System.Drawing.Imaging\PngCodecTests.cs (3)
572
using (Pen p = new(
Color
.BlueViolet, 2))
587
Color
color = bmpLoad.GetPixel(10, 10);
588
Assert.Equal(
Color
.FromArgb(255, 138, 43, 226), color);
mono\System.Drawing.Imaging\TiffCodecTests.cs (3)
243
using (Pen p = new(
Color
.BlueViolet, 2))
258
Color
color = bmpLoad.GetPixel(10, 10);
259
Assert.Equal(
Color
.FromArgb(255, 138, 43, 226), color);
mono\System.Drawing\BitmapTests.cs (43)
49
bmp.SetPixel(0, 0,
Color
.FromArgb(255, 128, 128, 128));
50
Color
color = bmp.GetPixel(0, 0);
52
Assert.Equal(
Color
.FromArgb(255, 128, 128, 128), color);
54
bmp.SetPixel(99, 99,
Color
.FromArgb(255, 255, 0, 155));
55
Color
color2 = bmp.GetPixel(99, 99);
56
Assert.Equal(
Color
.FromArgb(255, 255, 0, 155), color2);
126
Color
c = bmp.GetPixel(0, 0);
135
Color
c = bmp.GetPixel(0, 0);
144
Color
c = bmp.GetPixel(0, 0);
154
Color
a =
Color
.FromArgb(128, 64, 32, 16);
155
Color
b =
Color
.FromArgb(192, 96, 48, 24);
158
Color
c = bmp.GetPixel(0, 0);
159
Color
d = bmp.GetPixel(1, 0);
212
Assert.Equal(
Color
.FromArgb(255, 64, 32, 16), c);
213
Assert.Equal(
Color
.FromArgb(255, 96, 48, 24), d);
322
Color
colororg0 = bmp.GetPixel(0, 0);
323
Color
colororg50 = bmp.GetPixel(49, 49);
324
Color
colornew0 = bmpNew.GetPixel(0, 0);
325
Color
colornew50 = bmpNew.GetPixel(49, 49);
373
Color
clr;
462
Color
c =
Color
.FromArgb(255, 100, 200, 250);
493
Color
clr = bmp.GetPixel(x, y);
672
Color
pixel_colour;
674
Color
red =
Color
.FromArgb(
Color
.Red.A,
Color
.Red.R,
Color
.Red.G,
Color
.Red.B);
675
Color
blue =
Color
.FromArgb(
Color
.Blue.A,
Color
.Blue.R,
Color
.Blue.G,
Color
.Blue.B);
691
pixel_colour =
Color
.FromArgb(pixel_value);
693
pixel_colour =
Color
.FromArgb(red.A, pixel_colour.R, pixel_colour.G, pixel_colour.B);
707
pixel_colour =
Color
.FromArgb(red.A, pixel_colour.R, pixel_colour.G, pixel_colour.B);
726
pixel_colour =
Color
.FromArgb(blue.A, pixel_colour.R, pixel_colour.G, pixel_colour.B);
742
pixel_colour =
Color
.FromArgb(red.A, r, g, b);
mono\System.Drawing\GraphicsTests.cs (21)
63
int empty =
Color
.Empty.ToArgb();
834
using Pen pen = new(
Color
.Red);
849
using Pen pen = new(
Color
.Red);
871
using SolidBrush brush = new(
Color
.Red);
886
using SolidBrush brush = new(
Color
.Red);
1192
g.Clear(
Color
.Fuchsia);
1198
Assert.Equal(
Color
.Red.ToArgb(), bitmap.GetPixel(5, 5).ToArgb());
1199
Assert.Equal(
Color
.Red.ToArgb(), bitmap.GetPixel(14, 5).ToArgb());
1200
Assert.Equal(
Color
.Red.ToArgb(), bitmap.GetPixel(5, 14).ToArgb());
1201
Assert.Equal(
Color
.Red.ToArgb(), bitmap.GetPixel(14, 14).ToArgb());
1203
Assert.Equal(
Color
.Fuchsia.ToArgb(), bitmap.GetPixel(15, 5).ToArgb());
1204
Assert.Equal(
Color
.Fuchsia.ToArgb(), bitmap.GetPixel(5, 15).ToArgb());
1205
Assert.Equal(
Color
.Fuchsia.ToArgb(), bitmap.GetPixel(15, 15).ToArgb());
1213
g.Clear(
Color
.Red);
1218
using Pen pen = new(
Color
.Blue, width);
1377
g.Clear(
Color
.Red);
1381
using Pen pen = new(
Color
.Blue, width);
1523
g.Clear(
Color
.Red);
1527
using Pen pen = new(
Color
.Blue, width);
2886
g.Clear(
Color
.White);
2928
g.Clear(
Color
.White);
System\Drawing\BitmapTests.cs (51)
383
Color
expectedColor = bitmap.GetPixel(rectangle.X + x, rectangle.Y + y);
390
Assert.Equal(
Color
.FromArgb(255, expectedColor.R, expectedColor.G, expectedColor.B), clone.GetPixel(x, y));
532
yield return new object[] { new Bitmap(1, 1, PixelFormat.Format1bppIndexed), 0, 0,
Color
.FromArgb(0, 0, 0) };
533
yield return new object[] { new Bitmap(1, 1, PixelFormat.Format4bppIndexed), 0, 0,
Color
.FromArgb(0, 0, 0) };
534
yield return new object[] { new Bitmap(1, 1, PixelFormat.Format8bppIndexed), 0, 0,
Color
.FromArgb(0, 0, 0) };
535
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), 0, 0,
Color
.FromArgb(0, 0, 0) };
536
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), 99, 99,
Color
.FromArgb(0, 0, 0) };
541
public void GetPixel_ValidPixelFormat_Success(Bitmap bitmap, int x, int y,
Color
color)
795
bitmap.SetPixel(x, y,
Color
.LightGray);
799
bitmap.SetPixel(x, y,
Color
.Red);
811
Assert.Equal(
Color
.FromArgb(255, 211, 211, 211), bitmap.GetPixel(x, y));
815
Assert.Equal(
Color
.FromArgb(0, 0, 0, 0), bitmap.GetPixel(x, y));
831
bitmap.SetPixel(x, y,
Color
.Blue);
835
bitmap.SetPixel(x, y,
Color
.Red);
840
bitmap.MakeTransparent(
Color
.Blue);
847
Assert.Equal(
Color
.FromArgb(0, 0, 0, 0), bitmap.GetPixel(x, y));
851
Assert.Equal(
Color
.FromArgb(255, 255, 0, 0), bitmap.GetPixel(x, y));
865
bitmap.SetPixel(x, y,
Color
.Blue);
869
bitmap.MakeTransparent(
Color
.Red);
874
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), bitmap.GetPixel(x, y));
886
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.MakeTransparent(
Color
.Red));
897
bitmap.MakeTransparent(
Color
.Red);
909
Assert.Throws<InvalidOperationException>(() => bitmap.MakeTransparent(
Color
.Red));
914
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), 0, 0,
Color
.FromArgb(255, 128, 128, 128) };
915
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), 99, 99,
Color
.FromArgb(255, 128, 128, 128) };
920
public void SetPixel_ValidPixelFormat_Success(Bitmap bitmap, int x, int y,
Color
color)
933
Assert.Throws<InvalidOperationException>(() => bitmap.SetPixel(0, 0,
Color
.Red));
942
AssertExtensions.Throws<ArgumentOutOfRangeException>("x", () => bitmap.SetPixel(x, 0,
Color
.Red));
951
AssertExtensions.Throws<ArgumentOutOfRangeException>("y", () => bitmap.SetPixel(0, y,
Color
.Red));
958
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0,
Color
.Red));
967
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0,
Color
.Red));
1288
Color
a =
Color
.FromArgb(128, 64, 32, 16);
1289
Color
b =
Color
.FromArgb(192, 96, 48, 24);
1292
Color
c = bitmap.GetPixel(0, 0);
1293
Color
d = bitmap.GetPixel(1, 0);
1344
Assert.Equal(
Color
.FromArgb(255, 64, 32, 16), c);
1345
Assert.Equal(
Color
.FromArgb(255, 96, 48, 24), d);
1465
Color
red =
Color
.FromArgb(
Color
.Red.ToArgb());
1466
Color
blue =
Color
.FromArgb(
Color
.Blue.ToArgb());
1471
Color
pixelColor = bitmap.GetPixel(0, 0);
1482
pixelColor =
Color
.FromArgb(pixelValue);
1484
pixelColor =
Color
.FromArgb(red.A, pixelColor.R, pixelColor.G, pixelColor.B);
1498
pixelColor =
Color
.FromArgb(red.A, pixelColor.R, pixelColor.G, pixelColor.B);
1517
pixelColor =
Color
.FromArgb(blue.A, pixelColor.R, pixelColor.G, pixelColor.B);
1533
Assert.Equal(red,
Color
.FromArgb(red.A, r, g, b));
System\Drawing\BrushesTests.cs (146)
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);
153
public static object[] Brush(Func<Brush> getBrush,
Color
expectedColor) => [getBrush, expectedColor];
157
public void Brushes_Get_ReturnsExpected(Func<Brush> getBrush,
Color
expectedColor)
165
Color
color = brush.Color;
168
brush.Color =
Color
.Red;
169
Assert.Equal(
Color
.Red, brush.Color);
System\Drawing\BufferedGraphicsTests.cs (7)
41
Color
color =
Color
.FromArgb(255, 0, 0, 0);
46
using SolidBrush brush = new(
Color
.Red);
66
using SolidBrush brush = new(
Color
.Red);
84
Color
color =
Color
.FromArgb(255, 0, 0, 0);
91
using SolidBrush brush = new(
Color
.Red);
System\Drawing\ColorTranslatorTests.cs (48)
10
public static IEnumerable<(int,
Color
)> SystemColors_TestData()
46
yield return new object[] { default(
Color
), 0 };
47
yield return new object[] {
Color
.Red, 255 };
48
yield return new object[] {
Color
.White, 16777215 };
49
yield return new object[] {
Color
.FromArgb(1, 2, 3), 197121 };
54
public void ToWin32Color_Color_ReturnsExpected(
Color
color, int expected)
62
yield return new object[] { -1,
Color
.White };
63
yield return new object[] { 0,
Color
.Black };
64
yield return new object[] { 197121,
Color
.FromArgb(1, 2, 3) };
65
yield return new object[] { 16777215,
Color
.White };
66
yield return new object[] { int.MaxValue,
Color
.White };
67
yield return new object[] { unchecked((int)0x8000001F),
Color
.FromArgb(255, 31, 0, 0) };
68
yield return new object[] { unchecked((int)0x80000019),
Color
.FromArgb(255, 25, 0, 0) };
70
foreach ((int oleColor,
Color
color) in SystemColors_TestData())
78
public void FromOle_Color_ReturnsExpected(int oleColor,
Color
color)
86
yield return new object[] { default(
Color
), 0 };
87
yield return new object[] {
Color
.Red, 255 };
88
yield return new object[] {
Color
.White, 16777215 };
89
yield return new object[] {
Color
.FromArgb(1, 2, 3), 197121 };
91
foreach ((int oleColor,
Color
color) in SystemColors_TestData())
104
public void ToOle_Color_ReturnsExpected(
Color
color, int oleColor)
109
public static IEnumerable<(string,
Color
)> HtmlColors_TestData()
136
yield return ("LightGrey",
Color
.LightGray);
137
yield return ("Blue",
Color
.Blue);
138
yield return ("#1F2E3D",
Color
.FromArgb(31, 46, 61));
143
yield return new object[] { null,
Color
.Empty };
144
yield return new object[] { "",
Color
.Empty };
145
yield return new object[] { " ",
Color
.Empty };
146
yield return new object[] { "''",
Color
.FromName("") };
147
yield return new object[] { "\"\"",
Color
.FromName("") };
149
yield return new object[] { "#1B3",
Color
.FromArgb(17, 187, 51) };
150
yield return new object[] { " #1F2E3D ",
Color
.FromArgb(31, 46, 61) };
154
yield return new object[] { " Blue ",
Color
.Blue };
155
yield return new object[] { "'Blue'",
Color
.Blue };
156
yield return new object[] { "\"Blue\"",
Color
.Blue };
157
yield return new object[] { "'None'",
Color
.FromName("None") };
158
yield return new object[] { "\"None\"",
Color
.FromName("None") };
159
yield return new object[] { "255,0,0",
Color
.Red };
162
yield return new object[] { 498,
Color
.FromArgb(0, 0, 1, 242) };
163
yield return new object[] { "&h1F2",
Color
.FromArgb(0, 0, 1, 242) };
164
yield return new object[] { "&h1F2",
Color
.FromArgb(0, 0, 1, 242) };
167
yield return new object[] { "1, 0x2, &h3",
Color
.FromArgb(1, 2, 3) };
170
yield return new object[] { "1, 2, 0x3, &h4",
Color
.FromArgb(1, 2, 3, 4) };
172
foreach ((string htmlColor,
Color
color) in HtmlColors_TestData())
185
public void FromHtml_String_ReturnsExpected(string htmlColor,
Color
expected)
237
yield return new object[] {
Color
.Empty, "" };
239
foreach ((string htmlColor,
Color
color) in HtmlColors_TestData())
256
public void ToHtml_Color_ReturnsExpected(
Color
color, string expected)
System\Drawing\Drawing2D\ColorBlendTests.cs (4)
12
Assert.Equal(new
Color
[1], blend.Colors);
22
Assert.Equal(new
Color
[count], blend.Colors);
44
blend.Colors = new
Color
[10];
45
Assert.Equal(new
Color
[10], blend.Colors);
System\Drawing\Drawing2D\GraphicsPathTests.cs (7)
1661
using Pen pen = new(
Color
.Blue);
1674
using Pen pen = new(
Color
.Blue);
1693
using Pen pen = new(
Color
.Blue);
1704
using Pen pen = new(
Color
.Blue);
1726
using Pen pen = new(
Color
.Aqua, 0);
2248
using Pen pen = new(
Color
.Red, 3.0f);
2275
using Pen pen = new(
Color
.Red, 3.0f);
System\Drawing\Drawing2D\HatchBrushTests.cs (26)
10
yield return new object[] { HatchStyle.Horizontal, default(
Color
) };
11
yield return new object[] { HatchStyle.SolidDiamond,
Color
.PapayaWhip };
16
public void Ctor_HatchStyle_ForeColor(HatchStyle hatchStyle,
Color
foreColor)
24
Assert.Equal(
Color
.FromArgb(255, 0, 0, 0), brush.BackgroundColor);
29
yield return new object[] { HatchStyle.Horizontal, default(
Color
), default(
Color
) };
30
yield return new object[] { HatchStyle.SolidDiamond,
Color
.PapayaWhip,
Color
.Plum };
35
public void Ctor_HatchStyle_ForeColor_BackColor(HatchStyle hatchStyle,
Color
foreColor,
Color
backColor)
52
AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle,
Color
.Empty));
53
AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle,
Color
.Empty,
Color
.Empty));
59
using HatchBrush brush = new(HatchStyle.DarkDownwardDiagonal,
Color
.Magenta,
Color
.Peru);
76
Assert.Equal(
Color
.Bisque, brush.Color);
82
HatchBrush brush = new(HatchStyle.DarkHorizontal,
Color
.PeachPuff,
Color
.Purple);
91
HatchBrush brush = new(HatchStyle.DarkHorizontal,
Color
.PeachPuff,
Color
.Purple);
100
HatchBrush brush = new(HatchStyle.DarkHorizontal,
Color
.PeachPuff,
Color
.Purple);
109
HatchBrush brush = new(HatchStyle.DarkHorizontal,
Color
.PeachPuff,
Color
.Purple);
118
HatchBrush brush = new(HatchStyle.DarkHorizontal,
Color
.PeachPuff,
Color
.Purple);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (275)
10
yield return new object[] { new Point(0, 0), new Point(2, 2),
Color
.Empty,
Color
.Empty, new RectangleF(0, 0, 2, 2) };
11
yield return new object[] { new Point(1, 0), new Point(0, 0),
Color
.Empty,
Color
.Red, new RectangleF(0, -0.5f, 1, 1) };
12
yield return new object[] { new Point(1, 2), new Point(4, 6),
Color
.Plum,
Color
.Red, new RectangleF(1, 2, 3, 4) };
13
yield return new object[] { new Point(1, 2), new Point(4, 6),
Color
.Red,
Color
.Red, new RectangleF(1, 2, 3, 4) };
14
yield return new object[] { new Point(-1, -2), new Point(4, 6),
Color
.Red,
Color
.Plum, new RectangleF(-1, -2, 5, 8) };
15
yield return new object[] { new Point(-4, -6), new Point(1, 2),
Color
.Black,
Color
.Wheat, new RectangleF(-4, -6, 5, 8) };
16
yield return new object[] { new Point(4, 6), new Point(-1, -2),
Color
.Black,
Color
.Wheat, new RectangleF(-1, -2, 5, 8) };
17
yield return new object[] { new Point(4, 6), new Point(1, 2),
Color
.Black,
Color
.Wheat, new RectangleF(1, 2, 3, 4) };
22
public void Ctor_PointF_PointF_Color_Color(Point point1, Point point2,
Color
color1,
Color
color2, RectangleF expectedRectangle)
30
Assert.Equal(new
Color
[] {
Color
.FromArgb(color1.ToArgb()),
Color
.FromArgb(color2.ToArgb()) }, brush.LinearColors);
40
using LinearGradientBrush brush = new(new PointF(float.NaN, float.NaN), new PointF(float.PositiveInfinity, float.NegativeInfinity),
Color
.Plum,
Color
.Red);
49
public void Ctor_Point_Point_Color_Color(Point point1, Point point2,
Color
color1,
Color
color2, RectangleF expectedRectangle)
57
Assert.Equal(new
Color
[] {
Color
.FromArgb(color1.ToArgb()),
Color
.FromArgb(color2.ToArgb()) }, brush.LinearColors);
69
Assert.Throws<OutOfMemoryException>(() => new LinearGradientBrush(new Point(x, y), new Point(x, y),
Color
.Fuchsia,
Color
.GhostWhite));
70
Assert.Throws<OutOfMemoryException>(() => new LinearGradientBrush(new PointF(x, y), new PointF(x, y),
Color
.Fuchsia,
Color
.GhostWhite));
75
yield return new object[] { new Rectangle(0, 0, 1, 2),
Color
.Empty,
Color
.Red, LinearGradientMode.BackwardDiagonal };
76
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, LinearGradientMode.ForwardDiagonal };
77
yield return new object[] { new Rectangle(-1, -2, -3, -4),
Color
.Red,
Color
.Red, LinearGradientMode.Horizontal };
78
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Plum, LinearGradientMode.Vertical };
83
public void Ctor_Rectangle_Color_Color_LinearGradientMode(Rectangle rectangle,
Color
color1,
Color
color2, LinearGradientMode linearGradientMode)
91
Assert.Equal(new
Color
[] {
Color
.FromArgb(color1.ToArgb()),
Color
.FromArgb(color2.ToArgb()) }, brush.LinearColors);
100
public void Ctor_RectangleF_Color_Color_LinearGradientMode(Rectangle rectangle,
Color
color1,
Color
color2, LinearGradientMode linearGradientMode)
108
Assert.Equal(new
Color
[] {
Color
.FromArgb(color1.ToArgb()),
Color
.FromArgb(color2.ToArgb()) }, brush.LinearColors);
117
yield return new object[] { new Rectangle(0, 0, 1, 2),
Color
.Empty,
Color
.Red, 90 };
118
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 180 };
119
yield return new object[] { new Rectangle(-1, -2, -3, -4),
Color
.Red,
Color
.Red, 0 };
120
yield return new object[] { new Rectangle(-1, -2, -3, -4),
Color
.Red,
Color
.Red, 360 };
121
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Plum, 90 };
126
public void Ctor_Rectangle_Color_Color_Angle(Rectangle rectangle,
Color
color1,
Color
color2, float angle)
134
Assert.Equal(new
Color
[] {
Color
.FromArgb(color1.ToArgb()),
Color
.FromArgb(color2.ToArgb()) }, brush.LinearColors);
143
public void Ctor_RectangleF_Color_Color_Angle(Rectangle rectangle,
Color
color1,
Color
color2, float angle)
151
Assert.Equal(new
Color
[] {
Color
.FromArgb(color1.ToArgb()),
Color
.FromArgb(color2.ToArgb()) }, brush.LinearColors);
169
public void Ctor_Rectangle_Color_Color_Angle_IsAngleScalable(Rectangle rectangle,
Color
color1,
Color
color2, float angle, bool isAngleScalable)
177
Assert.Equal(new
Color
[] {
Color
.FromArgb(color1.ToArgb()),
Color
.FromArgb(color2.ToArgb()) }, brush.LinearColors);
186
public void Ctor_RectangleF_Color_Color_Angle_IsAngleScalable(Rectangle rectangle,
Color
color1,
Color
color2, float angle, bool isAngleScalable)
194
Assert.Equal(new
Color
[] {
Color
.FromArgb(color1.ToArgb()),
Color
.FromArgb(color2.ToArgb()) }, brush.LinearColors);
204
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4),
Color
.Empty,
Color
.Empty, 0f));
205
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4),
Color
.Empty,
Color
.Empty, 0f));
206
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4),
Color
.Empty,
Color
.Empty, LinearGradientMode.BackwardDiagonal));
207
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4),
Color
.Empty,
Color
.Empty, LinearGradientMode.BackwardDiagonal));
208
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4),
Color
.Empty,
Color
.Empty, 0, true));
209
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4),
Color
.Empty,
Color
.Empty, 0, true));
215
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0),
Color
.Empty,
Color
.Empty, 0f));
216
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0),
Color
.Empty,
Color
.Empty, 0f));
217
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0),
Color
.Empty,
Color
.Empty, LinearGradientMode.BackwardDiagonal));
218
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0),
Color
.Empty,
Color
.Empty, LinearGradientMode.BackwardDiagonal));
219
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0),
Color
.Empty,
Color
.Empty, 0, true));
220
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0),
Color
.Empty,
Color
.Empty, 0, true));
228
Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new Rectangle(1, 2, 3, 4),
Color
.Empty,
Color
.Empty, linearGradientMode));
229
Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new RectangleF(1, 2, 3, 4),
Color
.Empty,
Color
.Empty, linearGradientMode));
235
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
249
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
258
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
261
Colors = [
Color
.Red,
Color
.PeachPuff,
Color
.PowderBlue],
280
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
299
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
311
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
318
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
325
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
332
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
339
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
346
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
358
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true) { GammaCorrection = gammaCorrection };
365
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
375
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
378
Colors = [
Color
.Red,
Color
.PeachPuff,
Color
.PowderBlue],
383
Assert.Equal(blend.Colors.Select(c =>
Color
.FromArgb(c.ToArgb())), brush.InterpolationColors.Colors);
390
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true)
394
Colors = [
Color
.Wheat,
Color
.Yellow],
400
Colors = [
Color
.Red,
Color
.PeachPuff,
Color
.PowderBlue],
404
Assert.Equal(blend.Colors.Select(c =>
Color
.FromArgb(c.ToArgb())), brush.InterpolationColors.Colors);
411
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
418
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
427
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
430
() => brush.InterpolationColors = new ColorBlend { Colors = new
Color
[colorsLength] });
436
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
437
Assert.Throws<ArgumentException>(() => brush.InterpolationColors = new ColorBlend { Colors = new
Color
[2], Positions = null });
446
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
449
Colors = new
Color
[2],
459
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
462
Colors = new
Color
[positions.Length],
470
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true)
474
Colors = [
Color
.Red,
Color
.PeachPuff,
Color
.PowderBlue],
483
Colors = new
Color
[2],
491
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true)
495
Colors = [
Color
.Red,
Color
.PeachPuff,
Color
.PowderBlue],
510
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true)
514
Colors = [
Color
.Red,
Color
.PeachPuff,
Color
.PowderBlue],
534
Color
[] colors = [
Color
.Red,
Color
.Blue,
Color
.AntiqueWhite];
535
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true) { LinearColors = colors };
536
Assert.Equal(colors.Take(2).Select(c =>
Color
.FromArgb(c.ToArgb())), brush.LinearColors);
542
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
551
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
552
Assert.Throws<IndexOutOfRangeException>(() => brush.LinearColors = new
Color
[length]);
558
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
562
AssertExtensions.Throws<ArgumentException>(null, () => brush.LinearColors = [
Color
.Red,
Color
.Wheat]);
568
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
578
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true) { Transform = transform };
585
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
592
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
606
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true) { WrapMode = wrapMode };
615
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
622
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
629
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
639
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
649
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
658
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
674
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
695
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
703
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
717
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
726
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
739
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
756
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
769
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
776
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
789
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
806
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
819
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
826
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
840
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
857
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
870
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
877
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
891
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
902
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
914
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
921
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
934
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 0, true);
948
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 0, true);
962
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
974
using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
981
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
991
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
System\Drawing\Drawing2D\PathGradientBrushTests.cs (47)
141
Assert.Equal(
Color
.Black.ToArgb(), brush.CenterColor.ToArgb());
142
brush.CenterColor =
Color
.Blue;
143
Assert.Equal(
Color
.Blue.ToArgb(), brush.CenterColor.ToArgb());
144
brush.CenterColor =
Color
.Transparent;
145
Assert.Equal(
Color
.Transparent.ToArgb(), brush.CenterColor.ToArgb());
154
AssertExtensions.Throws<ArgumentException>(null, () => brush.CenterColor =
Color
.Blue);
160
Color
[] expectedColors = [
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 255, 0, 0)];
161
Color
[] sameColors = [
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 255, 255, 0)];
162
Color
[] expectedSameColors = [
Color
.FromArgb(255, 255, 255, 0)];
174
Color
[] colors = [
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 255, 0, 0)];
175
Color
[] defaultColors = [
Color
.FromArgb(255, 255, 255, 255)];
180
brush.SurroundColors[0] =
Color
.FromArgb(255, 0, 0, 255);
181
Assert.NotEqual(
Color
.FromArgb(255, 0, 0, 255), brush.SurroundColors[0]);
188
Color
[] colors = [
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 255, 0, 0)];
197
yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, Array.Empty<
Color
>() };
198
yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, new
Color
[3] };
203
public void SurroundColors_InvalidColorsLength_ThrowsArgumentException(Point[] points,
Color
[] colors)
528
Color
[] expectedColors = [
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 255, 0, 0)];
530
Color
[] sameColors = [
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 255, 255, 0)];
545
Color
[] colors = [
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 255, 0, 0)];
546
Color
[] defaultColors = [
Color
.Empty];
553
brush.InterpolationColors.Colors[0] =
Color
.Pink;
554
Assert.NotEqual(
Color
.Pink, brush.InterpolationColors.Colors[0]);
594
brush.InterpolationColors = new ColorBlend() { Colors = new
Color
[1], Positions = null });
617
brush.InterpolationColors = new ColorBlend() { Colors = new
Color
[1], Positions = new float[2] });
625
brush.InterpolationColors = new ColorBlend() { Colors = new
Color
[2], Positions = new float[1] });
946
Assert.Equal(new
Color
[] {
Color
.Empty }, brush.InterpolationColors.Colors);
947
Assert.Equal(new
Color
[] {
Color
.FromArgb(255, 255, 255, 255) }, brush.SurroundColors);
System\Drawing\Graphics_DrawBezierTests.cs (11)
12
using Pen pen = new(
Color
.White);
26
using Pen pen = new(
Color
.Red);
45
using Pen pen = new(
Color
.Red);
75
Pen pen = new(
Color
.Red);
88
using Pen pen = new(
Color
.Red);
106
using Pen pen = new(
Color
.Red);
130
Pen pen = new(
Color
.Red);
142
using Pen pen = new(
Color
.Red);
152
using Pen pen = new(
Color
.Red);
162
using Pen pen = new(
Color
.Red);
179
using Pen pen = new(
Color
.Red);
System\Drawing\Graphics_DrawLineTests.cs (10)
12
using Pen pen = new(
Color
.White);
27
using Pen pen = new(
Color
.White);
54
Pen pen = new(
Color
.Red);
68
using Pen pen = new(
Color
.Red);
87
using Pen pen = new(
Color
.Red);
111
Pen pen = new(
Color
.Red);
123
using Pen pen = new(
Color
.Red);
135
using Pen pen = new(
Color
.Red);
145
using Pen pen = new(
Color
.Red);
162
using Pen pen = new(
Color
.Red);
System\Drawing\GraphicsTests.Core.cs (8)
85
Pen pen = new(
Color
.Red);
98
using Pen pen = new(
Color
.Red);
115
using Pen pen = new(
Color
.Red);
139
SolidBrush brush = new(
Color
.Red);
152
using SolidBrush brush = new(
Color
.Red);
163
using SolidBrush brush = new(
Color
.Red);
174
using SolidBrush brush = new(
Color
.Red);
191
using SolidBrush brush = new(
Color
.Red);
System\Drawing\GraphicsTests.cs (115)
300
yield return new object[] { CompositingMode.SourceCopy,
Color
.FromArgb(160, 255, 255, 255) };
301
yield return new object[] { CompositingMode.SourceOver,
Color
.FromArgb(220, 185, 185, 185) };
306
public void CompositingMode_Set_GetReturnsExpected(CompositingMode mode,
Color
expectedOverlap)
308
Color
transparentBlack =
Color
.FromArgb(160, 0, 0, 0);
309
Color
transparentWhite =
Color
.FromArgb(160, 255, 255, 255);
372
Color
transparentBlack =
Color
.FromArgb(160, 0, 0, 0);
373
Color
transparentWhite =
Color
.FromArgb(160, 255, 255, 255);
374
var basicExpectedColors = new
Color
[][]
377
[transparentBlack,
Color
.FromArgb(220, 185, 185, 185), transparentWhite],
386
var gammaCorrectedColors = new
Color
[][]
388
[
Color
.FromArgb(159, 0, 0, 0),
Color
.FromArgb(159, 0, 0, 0),
Color
.FromArgb(0, 0, 0, 0)],
389
[
Color
.FromArgb(159, 0, 0, 0),
Color
.FromArgb(219, 222, 222, 222),
Color
.FromArgb(159, 255, 255, 255)],
390
[
Color
.FromArgb(0, 0, 0, 0),
Color
.FromArgb(159, 255, 255, 255),
Color
.FromArgb(159, 255, 255, 255)]
398
public void CompositingQuality_Set_GetReturnsExpected(CompositingQuality quality,
Color
[][] expectedIntersectionColor)
400
Color
transparentBlack =
Color
.FromArgb(160, 0, 0, 0);
401
Color
transparentWhite =
Color
.FromArgb(160, 255, 255, 255);
818
Color
empty =
Color
.FromArgb(255, 0, 0, 0);
819
Color
red =
Color
.FromArgb(
Color
.Red.ToArgb());
824
new
Color
[][]
835
new
Color
[][]
843
var allEmpty = new
Color
[][]
856
public void RenderingOrigin_SetToCustom_RendersExpected(Point renderingOrigin,
Color
[][] expectedRendering)
858
Color
red =
Color
.FromArgb(
Color
.Red.ToArgb());
1064
Color
empty = Helpers.EmptyColor;
1065
Color
red =
Color
.FromArgb(
Color
.Red.ToArgb());
1228
LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4),
Color
.Plum,
Color
.Red, 45, true);
1540
Color
plum =
Color
.FromArgb(
Color
.Plum.ToArgb());
1554
Color
color =
Color
.FromArgb(2, 3, 4);
1567
Color
imageColor = image.GetPixel(x, y);
1916
yield return new object[] { PixelFormat.Format32bppArgb,
Color
.Red,
Color
.FromArgb(
Color
.Red.ToArgb()) };
1917
yield return new object[] { PixelFormat.Format16bppRgb555,
Color
.Red,
Color
.FromArgb(255, 248, 0, 0) };
1922
public void GetNearestColor_Color_ReturnsExpected(PixelFormat pixelFormat,
Color
color,
Color
expected)
1937
Assert.Throws<InvalidOperationException>(() => graphics.GetNearestColor(
Color
.Red));
1952
AssertExtensions.Throws<ArgumentException>(null, () => graphics.GetNearestColor(
Color
.Red));
1971
Pen pen = new(
Color
.Red);
1985
using Pen pen = new(
Color
.Red);
1997
using Pen pen = new(
Color
.Red);
2009
using Pen pen = new(
Color
.Red);
2028
using Pen pen = new(
Color
.Red);
2053
Pen pen = new(
Color
.Red);
2066
using Pen pen = new(
Color
.Red);
2084
using Pen pen = new(
Color
.Red);
2107
Pen pen = new(
Color
.Red);
2119
using Pen pen = new(
Color
.Red);
2129
using Pen pen = new(
Color
.Red);
2139
using Pen pen = new(
Color
.Red);
2156
using Pen pen = new(
Color
.Red);
2180
Pen pen = new(
Color
.Red);
2194
using Pen pen = new(
Color
.Red);
2213
using Pen pen = new(
Color
.Red);
2239
Pen pen = new(
Color
.Red);
2253
using Pen pen = new(
Color
.Red);
2265
using Pen pen = new(
Color
.Red);
2277
using Pen pen = new(
Color
.Red);
2296
using Pen pen = new(
Color
.Red);
2320
Pen pen = new(
Color
.Red);
2332
using Pen pen = new(
Color
.Red);
2344
using Pen pen = new(
Color
.Red);
2354
using Pen pen = new(
Color
.Red);
2371
using Pen pen = new(
Color
.Red);
2394
Pen pen = new(
Color
.Red);
2405
using Pen pen = new(
Color
.Red);
2414
using Pen pen = new(
Color
.Red);
2426
using Pen pen = new(
Color
.Red);
2443
using Pen pen = new(
Color
.Red);
2470
Pen pen = new(
Color
.Red);
2487
using Pen pen = new(
Color
.Red);
2504
using Pen pen = new(
Color
.Red);
2524
using Pen pen = new(
Color
.Red);
2535
using Pen pen = new(
Color
.Red);
2557
using Pen pen = new(
Color
.Red);
2586
Pen pen = new(
Color
.Red);
2600
using Pen pen = new(
Color
.Red);
2615
using Pen pen = new(
Color
.Red);
2627
using Pen pen = new(
Color
.Red);
2646
using Pen pen = new(
Color
.Red);
2671
SolidBrush brush = new(
Color
.Red);
2684
using SolidBrush brush = new(
Color
.Red);
2695
using SolidBrush brush = new(
Color
.Red);
2706
using SolidBrush brush = new(
Color
.Red);
2724
using SolidBrush brush = new(
Color
.Red);
2736
Color
color =
Color
.FromArgb(
Color
.Plum.ToArgb());
2756
using Pen pen = new(
Color
.Red);
2760
Assert.Throws<InvalidOperationException>(() => graphics.Clear(
Color
.Red));
2772
using Pen pen = new(
Color
.Red);
2776
AssertExtensions.Throws<ArgumentException>(null, () => graphics.Clear(
Color
.Red));
System\Drawing\IconTests.cs (2)
733
Color
e = expected.GetPixel(x, y);
734
Color
a = actual.GetPixel(x, y);
System\Drawing\Imaging\ColorMapTests.cs (4)
21
NewColor =
Color
.AliceBlue
23
Assert.Equal(
Color
.AliceBlue, cm.NewColor);
31
OldColor =
Color
.AliceBlue
33
Assert.Equal(
Color
.AliceBlue, cm.OldColor);
System\Drawing\Imaging\Effects\EffectsTests.cs (1)
19
bitmap.GetPixel(0, 0).Should().Be(
Color
.FromArgb(255, 255, 255, 239));
System\Drawing\Imaging\ImageAttributesTests.cs (150)
33
private readonly
Color
_actualYellow =
Color
.FromArgb(255, 255, 255, 0);
34
private readonly
Color
_actualGreen =
Color
.FromArgb(255, 0, 255, 0);
35
private readonly
Color
_expectedRed =
Color
.FromArgb(255, 255, 0, 0);
36
private readonly
Color
_expectedBlack =
Color
.FromArgb(255, 0, 0, 0);
57
new() { OldColor =
Color
.FromArgb(255, 255, 255, 0), NewColor =
Color
.FromArgb(255, 255, 0, 0) }
109
yield return new object[] {
Color
.FromArgb(100, 255, 0, 0) };
110
yield return new object[] {
Color
.FromArgb(255, 255, 155, 155) };
115
public void SetColorMatrix_ColorMatrixI_Success(
Color
color)
138
Assert.Equal(
Color
.FromArgb(255, 255, 155, 155), bitmapBig.GetPixel(50, 50));
139
Assert.Equal(
Color
.FromArgb(255, 255, 205, 205), bitmapBig.GetPixel(150, 50));
145
var
grayShade =
Color
.FromArgb(255, 100, 100, 100);
347
bitmap.SetPixel(1, 1,
Color
.FromArgb(255, 100, 100, 100));
350
Assert.Equal(
Color
.FromArgb(255, 100, 0, 100), bitmap.GetPixel(1, 1));
355
yield return new object[] { ColorMatrixFlag.Default,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 0, 100) };
356
yield return new object[] { ColorMatrixFlag.SkipGrays,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 100, 100) };
357
yield return new object[] { ColorMatrixFlag.AltGrays,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 200, 255) };
362
public void SetColorMatrices_ColorMatrixGrayMatrixFlags_Success(ColorMatrixFlag flag,
Color
grayShade,
Color
expectedGrayShade)
378
yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Default,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 0, 100) };
379
yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Default,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 100, 100) };
380
yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Default,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 200, 255) };
381
yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Bitmap,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 0, 100) };
382
yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Bitmap,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 100, 100) };
383
yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Bitmap,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 100, 200, 255) };
389
(ColorMatrixFlag flag, ColorAdjustType type,
Color
grayShade,
Color
expectedGrayShade)
405
yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Pen,
Color
.FromArgb(255, 100, 100, 100) };
406
yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Pen,
Color
.FromArgb(255, 100, 100, 100) };
407
yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Pen,
Color
.FromArgb(255, 100, 100, 100) };
408
yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Brush,
Color
.FromArgb(255, 100, 100, 100) };
409
yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Brush,
Color
.FromArgb(255, 100, 100, 100) };
410
yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Brush,
Color
.FromArgb(255, 100, 100, 100) };
411
yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Text,
Color
.FromArgb(255, 100, 100, 100) };
412
yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Text,
Color
.FromArgb(255, 100, 100, 100) };
413
yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Text,
Color
.FromArgb(255, 100, 100, 100) };
418
public void SetColorMatrices_ColorMatrixGrayMatrixFlagsTypesI_Success(ColorMatrixFlag flag, ColorAdjustType type,
Color
grayShade)
486
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 230, 50, 220));
488
Assert.Equal(
Color
.FromArgb(255, 255, 0, 255), bitmap.GetPixel(0, 0));
499
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 230, 50, 220));
501
Assert.Equal(
Color
.FromArgb(255, 255, 0, 255), bitmap.GetPixel(0, 0));
512
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 230, 50, 220));
514
Assert.Equal(
Color
.FromArgb(255, 230, 50, 220), bitmap.GetPixel(0, 0));
542
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 230, 50, 220));
544
Assert.Equal(
Color
.FromArgb(255, 230, 50, 220), bitmap.GetPixel(0, 0));
556
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 230, 50, 220));
558
Assert.Equal(
Color
.FromArgb(255, 230, 50, 220), bitmap.GetPixel(0, 0));
585
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 255, 0));
587
Assert.Equal(
Color
.FromArgb(255, 33, 255, 0), bitmap.GetPixel(0, 0));
598
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 255, 0));
600
Assert.Equal(
Color
.FromArgb(255, 33, 255, 0), bitmap.GetPixel(0, 0));
611
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 255, 0));
613
Assert.Equal(
Color
.FromArgb(255, 100, 255, 0), bitmap.GetPixel(0, 0));
644
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 255, 0));
646
Assert.Equal(
Color
.FromArgb(255, 100, 255, 0), bitmap.GetPixel(0, 0));
691
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 255, 0));
693
Assert.Equal(
Color
.FromArgb(255, 100, 255, 0), bitmap.GetPixel(0, 0));
742
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 255, 0));
744
Assert.Equal(
Color
.FromArgb(255, 33, 0, 0), bitmap.GetPixel(0, 0));
759
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 255, 0));
761
Assert.Equal(
Color
.FromArgb(255, 100, 255, 0), bitmap.GetPixel(0, 0));
789
imageAttr.SetColorKey(
Color
.FromArgb(50, 50, 50),
Color
.FromArgb(150, 150, 150));
791
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 100, 100));
793
Assert.Equal(
Color
.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0));
804
imageAttr.SetColorKey(
Color
.FromArgb(50, 50, 50),
Color
.FromArgb(150, 150, 150), type);
806
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 100, 100));
808
Assert.Equal(
Color
.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0));
818
imageAttr.SetColorKey(
Color
.FromArgb(50, 50, 50),
Color
.FromArgb(150, 150, 150), type);
820
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 100, 100));
822
Assert.Equal(
Color
.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0));
831
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorKey(
Color
.FromArgb(50, 50, 50),
Color
.FromArgb(150, 150, 150)));
833
imageAttr.SetColorKey(
Color
.FromArgb(50, 50, 50),
Color
.FromArgb(150, 150, 150), ColorAdjustType.Default));
842
imageAttr.SetColorKey(
Color
.FromArgb(50, 50, 50),
Color
.FromArgb(150, 150, 150), type));
851
imageAttr.SetColorKey(
Color
.FromArgb(50, 50, 50),
Color
.FromArgb(150, 150, 150));
854
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 100, 100));
856
Assert.Equal(
Color
.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0));
866
imageAttr.SetColorKey(
Color
.FromArgb(50, 50, 50),
Color
.FromArgb(150, 150, 150), type);
869
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 100, 100));
871
Assert.Equal(
Color
.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0));
894
yield return new object[] { ColorChannelFlag.ColorChannelC,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 198, 198, 198) };
895
yield return new object[] { ColorChannelFlag.ColorChannelK,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 108, 108, 108) };
896
yield return new object[] { ColorChannelFlag.ColorChannelM,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 204, 204, 204) };
897
yield return new object[] { ColorChannelFlag.ColorChannelY,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 207, 207, 207) };
902
public void SetOutputChannel_Flag_Success(ColorChannelFlag flag,
Color
actualColor,
Color
expectedColor)
916
yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Default,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 198, 198, 198) };
917
yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Default,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 108, 108, 108) };
918
yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Default,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 204, 204, 204) };
919
yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Default,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 207, 207, 207) };
920
yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Bitmap,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 198, 198, 198) };
921
yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Bitmap,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 108, 108, 108) };
922
yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Bitmap,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 204, 204, 204) };
923
yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Bitmap,
Color
.FromArgb(255, 100, 100, 100),
Color
.FromArgb(255, 207, 207, 207) };
928
public void SetOutputChannel_FlagType_Success(ColorChannelFlag flag, ColorAdjustType type,
Color
actualColor,
Color
expectedColor)
942
yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Brush,
Color
.FromArgb(255, 100, 100, 100) };
943
yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Brush,
Color
.FromArgb(255, 100, 100, 100) };
944
yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Brush,
Color
.FromArgb(255, 100, 100, 100) };
945
yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Brush,
Color
.FromArgb(255, 100, 100, 100) };
946
yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Pen,
Color
.FromArgb(255, 100, 100, 100) };
947
yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Pen,
Color
.FromArgb(255, 100, 100, 100) };
948
yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Pen,
Color
.FromArgb(255, 100, 100, 100) };
949
yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Pen,
Color
.FromArgb(255, 100, 100, 100) };
950
yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Text,
Color
.FromArgb(255, 100, 100, 100) };
951
yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Text,
Color
.FromArgb(255, 100, 100, 100) };
952
yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Text,
Color
.FromArgb(255, 100, 100, 100) };
953
yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Text,
Color
.FromArgb(255, 100, 100, 100) };
958
public void SetOutputChannel_FlagTypeI_Success(ColorChannelFlag flag, ColorAdjustType type,
Color
color)
1061
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 100, 100));
1063
Assert.Equal(
Color
.FromArgb(255, 198, 198, 198), bitmap.GetPixel(0, 0));
1129
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 100, 100));
1131
Assert.Equal(
Color
.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0));
1145
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 100, 100, 100));
1147
Assert.Equal(
Color
.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0));
1297
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp,
Color
.Black));
1298
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp,
Color
.Black, true));
System\Drawing\PensTests.cs (144)
12
yield return Pen(() => Pens.AliceBlue,
Color
.AliceBlue);
13
yield return Pen(() => Pens.AntiqueWhite,
Color
.AntiqueWhite);
14
yield return Pen(() => Pens.Aqua,
Color
.Aqua);
15
yield return Pen(() => Pens.Aquamarine,
Color
.Aquamarine);
16
yield return Pen(() => Pens.Azure,
Color
.Azure);
17
yield return Pen(() => Pens.Beige,
Color
.Beige);
18
yield return Pen(() => Pens.Bisque,
Color
.Bisque);
19
yield return Pen(() => Pens.Black,
Color
.Black);
20
yield return Pen(() => Pens.BlanchedAlmond,
Color
.BlanchedAlmond);
21
yield return Pen(() => Pens.Blue,
Color
.Blue);
22
yield return Pen(() => Pens.BlueViolet,
Color
.BlueViolet);
23
yield return Pen(() => Pens.Brown,
Color
.Brown);
24
yield return Pen(() => Pens.BurlyWood,
Color
.BurlyWood);
25
yield return Pen(() => Pens.CadetBlue,
Color
.CadetBlue);
26
yield return Pen(() => Pens.Chartreuse,
Color
.Chartreuse);
27
yield return Pen(() => Pens.Chocolate,
Color
.Chocolate);
28
yield return Pen(() => Pens.Coral,
Color
.Coral);
29
yield return Pen(() => Pens.CornflowerBlue,
Color
.CornflowerBlue);
30
yield return Pen(() => Pens.Cornsilk,
Color
.Cornsilk);
31
yield return Pen(() => Pens.Crimson,
Color
.Crimson);
32
yield return Pen(() => Pens.Cyan,
Color
.Cyan);
33
yield return Pen(() => Pens.DarkBlue,
Color
.DarkBlue);
34
yield return Pen(() => Pens.DarkCyan,
Color
.DarkCyan);
35
yield return Pen(() => Pens.DarkGoldenrod,
Color
.DarkGoldenrod);
36
yield return Pen(() => Pens.DarkGray,
Color
.DarkGray);
37
yield return Pen(() => Pens.DarkGreen,
Color
.DarkGreen);
38
yield return Pen(() => Pens.DarkKhaki,
Color
.DarkKhaki);
39
yield return Pen(() => Pens.DarkMagenta,
Color
.DarkMagenta);
40
yield return Pen(() => Pens.DarkOliveGreen,
Color
.DarkOliveGreen);
41
yield return Pen(() => Pens.DarkOrange,
Color
.DarkOrange);
42
yield return Pen(() => Pens.DarkOrchid,
Color
.DarkOrchid);
43
yield return Pen(() => Pens.DarkRed,
Color
.DarkRed);
44
yield return Pen(() => Pens.DarkSalmon,
Color
.DarkSalmon);
45
yield return Pen(() => Pens.DarkSeaGreen,
Color
.DarkSeaGreen);
46
yield return Pen(() => Pens.DarkSlateBlue,
Color
.DarkSlateBlue);
47
yield return Pen(() => Pens.DarkSlateGray,
Color
.DarkSlateGray);
48
yield return Pen(() => Pens.DarkTurquoise,
Color
.DarkTurquoise);
49
yield return Pen(() => Pens.DarkViolet,
Color
.DarkViolet);
50
yield return Pen(() => Pens.DeepPink,
Color
.DeepPink);
51
yield return Pen(() => Pens.DeepSkyBlue,
Color
.DeepSkyBlue);
52
yield return Pen(() => Pens.DimGray,
Color
.DimGray);
53
yield return Pen(() => Pens.DodgerBlue,
Color
.DodgerBlue);
54
yield return Pen(() => Pens.Firebrick,
Color
.Firebrick);
55
yield return Pen(() => Pens.FloralWhite,
Color
.FloralWhite);
56
yield return Pen(() => Pens.ForestGreen,
Color
.ForestGreen);
57
yield return Pen(() => Pens.Fuchsia,
Color
.Fuchsia);
58
yield return Pen(() => Pens.Gainsboro,
Color
.Gainsboro);
59
yield return Pen(() => Pens.GhostWhite,
Color
.GhostWhite);
60
yield return Pen(() => Pens.Gold,
Color
.Gold);
61
yield return Pen(() => Pens.Goldenrod,
Color
.Goldenrod);
62
yield return Pen(() => Pens.Gray,
Color
.Gray);
63
yield return Pen(() => Pens.Green,
Color
.Green);
64
yield return Pen(() => Pens.GreenYellow,
Color
.GreenYellow);
65
yield return Pen(() => Pens.Honeydew,
Color
.Honeydew);
66
yield return Pen(() => Pens.HotPink,
Color
.HotPink);
67
yield return Pen(() => Pens.IndianRed,
Color
.IndianRed);
68
yield return Pen(() => Pens.Indigo,
Color
.Indigo);
69
yield return Pen(() => Pens.Ivory,
Color
.Ivory);
70
yield return Pen(() => Pens.Khaki,
Color
.Khaki);
71
yield return Pen(() => Pens.Lavender,
Color
.Lavender);
72
yield return Pen(() => Pens.LavenderBlush,
Color
.LavenderBlush);
73
yield return Pen(() => Pens.LawnGreen,
Color
.LawnGreen);
74
yield return Pen(() => Pens.LemonChiffon,
Color
.LemonChiffon);
75
yield return Pen(() => Pens.LightBlue,
Color
.LightBlue);
76
yield return Pen(() => Pens.LightCoral,
Color
.LightCoral);
77
yield return Pen(() => Pens.LightCyan,
Color
.LightCyan);
78
yield return Pen(() => Pens.LightGoldenrodYellow,
Color
.LightGoldenrodYellow);
79
yield return Pen(() => Pens.LightGray,
Color
.LightGray);
80
yield return Pen(() => Pens.LightGreen,
Color
.LightGreen);
81
yield return Pen(() => Pens.LightPink,
Color
.LightPink);
82
yield return Pen(() => Pens.LightSalmon,
Color
.LightSalmon);
83
yield return Pen(() => Pens.LightSeaGreen,
Color
.LightSeaGreen);
84
yield return Pen(() => Pens.LightSkyBlue,
Color
.LightSkyBlue);
85
yield return Pen(() => Pens.LightSlateGray,
Color
.LightSlateGray);
86
yield return Pen(() => Pens.LightSteelBlue,
Color
.LightSteelBlue);
87
yield return Pen(() => Pens.LightYellow,
Color
.LightYellow);
88
yield return Pen(() => Pens.Lime,
Color
.Lime);
89
yield return Pen(() => Pens.LimeGreen,
Color
.LimeGreen);
90
yield return Pen(() => Pens.Linen,
Color
.Linen);
91
yield return Pen(() => Pens.Magenta,
Color
.Magenta);
92
yield return Pen(() => Pens.Maroon,
Color
.Maroon);
93
yield return Pen(() => Pens.MediumAquamarine,
Color
.MediumAquamarine);
94
yield return Pen(() => Pens.MediumBlue,
Color
.MediumBlue);
95
yield return Pen(() => Pens.MediumOrchid,
Color
.MediumOrchid);
96
yield return Pen(() => Pens.MediumPurple,
Color
.MediumPurple);
97
yield return Pen(() => Pens.MediumSeaGreen,
Color
.MediumSeaGreen);
98
yield return Pen(() => Pens.MediumSlateBlue,
Color
.MediumSlateBlue);
99
yield return Pen(() => Pens.MediumSpringGreen,
Color
.MediumSpringGreen);
100
yield return Pen(() => Pens.MediumTurquoise,
Color
.MediumTurquoise);
101
yield return Pen(() => Pens.MediumVioletRed,
Color
.MediumVioletRed);
102
yield return Pen(() => Pens.MidnightBlue,
Color
.MidnightBlue);
103
yield return Pen(() => Pens.MintCream,
Color
.MintCream);
104
yield return Pen(() => Pens.MistyRose,
Color
.MistyRose);
105
yield return Pen(() => Pens.Moccasin,
Color
.Moccasin);
106
yield return Pen(() => Pens.NavajoWhite,
Color
.NavajoWhite);
107
yield return Pen(() => Pens.Navy,
Color
.Navy);
108
yield return Pen(() => Pens.OldLace,
Color
.OldLace);
109
yield return Pen(() => Pens.Olive,
Color
.Olive);
110
yield return Pen(() => Pens.OliveDrab,
Color
.OliveDrab);
111
yield return Pen(() => Pens.Orange,
Color
.Orange);
112
yield return Pen(() => Pens.OrangeRed,
Color
.OrangeRed);
113
yield return Pen(() => Pens.Orchid,
Color
.Orchid);
114
yield return Pen(() => Pens.PaleGoldenrod,
Color
.PaleGoldenrod);
115
yield return Pen(() => Pens.PaleGreen,
Color
.PaleGreen);
116
yield return Pen(() => Pens.PaleTurquoise,
Color
.PaleTurquoise);
117
yield return Pen(() => Pens.PaleVioletRed,
Color
.PaleVioletRed);
118
yield return Pen(() => Pens.PapayaWhip,
Color
.PapayaWhip);
119
yield return Pen(() => Pens.PeachPuff,
Color
.PeachPuff);
120
yield return Pen(() => Pens.Peru,
Color
.Peru);
121
yield return Pen(() => Pens.Pink,
Color
.Pink);
122
yield return Pen(() => Pens.Plum,
Color
.Plum);
123
yield return Pen(() => Pens.PowderBlue,
Color
.PowderBlue);
124
yield return Pen(() => Pens.Purple,
Color
.Purple);
125
yield return Pen(() => Pens.Red,
Color
.Red);
126
yield return Pen(() => Pens.RosyBrown,
Color
.RosyBrown);
127
yield return Pen(() => Pens.RoyalBlue,
Color
.RoyalBlue);
128
yield return Pen(() => Pens.SaddleBrown,
Color
.SaddleBrown);
129
yield return Pen(() => Pens.Salmon,
Color
.Salmon);
130
yield return Pen(() => Pens.SandyBrown,
Color
.SandyBrown);
131
yield return Pen(() => Pens.SeaGreen,
Color
.SeaGreen);
132
yield return Pen(() => Pens.SeaShell,
Color
.SeaShell);
133
yield return Pen(() => Pens.Sienna,
Color
.Sienna);
134
yield return Pen(() => Pens.Silver,
Color
.Silver);
135
yield return Pen(() => Pens.SkyBlue,
Color
.SkyBlue);
136
yield return Pen(() => Pens.SlateBlue,
Color
.SlateBlue);
137
yield return Pen(() => Pens.SlateGray,
Color
.SlateGray);
138
yield return Pen(() => Pens.Snow,
Color
.Snow);
139
yield return Pen(() => Pens.SpringGreen,
Color
.SpringGreen);
140
yield return Pen(() => Pens.SteelBlue,
Color
.SteelBlue);
141
yield return Pen(() => Pens.Tan,
Color
.Tan);
142
yield return Pen(() => Pens.Teal,
Color
.Teal);
143
yield return Pen(() => Pens.Thistle,
Color
.Thistle);
144
yield return Pen(() => Pens.Tomato,
Color
.Tomato);
145
yield return Pen(() => Pens.Transparent,
Color
.Transparent);
146
yield return Pen(() => Pens.Turquoise,
Color
.Turquoise);
147
yield return Pen(() => Pens.Violet,
Color
.Violet);
148
yield return Pen(() => Pens.Wheat,
Color
.Wheat);
149
yield return Pen(() => Pens.White,
Color
.White);
150
yield return Pen(() => Pens.WhiteSmoke,
Color
.WhiteSmoke);
151
yield return Pen(() => Pens.Yellow,
Color
.Yellow);
152
yield return Pen(() => Pens.YellowGreen,
Color
.YellowGreen);
155
public static object[] Pen(Func<Pen> getPen,
Color
expectedColor) => [getPen, expectedColor];
159
public void Pens_Get_ReturnsExpected(Func<Pen> getPen,
Color
expectedColor)
164
AssertExtensions.Throws<ArgumentException>(null, () => pen.Color =
Color
.AliceBlue);
System\Drawing\PenTests.cs (108)
13
yield return new object[] { new SolidBrush(
Color
.Red), PenType.SolidColor };
14
yield return new object[] { new HatchBrush(HatchStyle.BackwardDiagonal,
Color
.Red), PenType.HatchFill };
15
yield return new object[] { new LinearGradientBrush(new Point(0, 0), new Point(0, 2),
Color
.Purple,
Color
.Plum), PenType.LinearGradient };
41
yield return new object[] { new SolidBrush(
Color
.Red), 0, PenType.SolidColor };
48
yield return new object[] { new SolidBrush(
Color
.Red), float.PositiveInfinity, PenType.SolidColor };
49
yield return new object[] { new SolidBrush(
Color
.Red), float.NaN, PenType.SolidColor };
50
yield return new object[] { new SolidBrush(
Color
.Red), float.MaxValue, PenType.SolidColor };
67
using SolidBrush brush = new(
Color
.Red);
69
brush.Color =
Color
.Blue;
70
Assert.Equal(
Color
.FromArgb(
Color
.Red.ToArgb()), pen.Color);
84
SolidBrush brush = new(
Color
.Red);
94
using Pen pen = new(
Color
.Red);
96
Assert.Equal(
Color
.Red, pen.Color);
109
using Pen pen = new(
Color
.Red, width);
111
Assert.Equal(
Color
.Red, pen.Color);
122
using SolidBrush brush = new(
Color
.Red);
133
using SolidBrush brush = new(
Color
.Red);
141
using SolidBrush brush = new(
Color
.Red);
153
using Pen pen = new(
Color
.Red);
162
using Pen pen = new(
Color
.Red);
174
using SolidBrush brush = new(
Color
.Red);
182
using SolidBrush brush = new(
Color
.Red);
191
using SolidBrush brush = new(
Color
.Red);
201
using SolidBrush brush = new(
Color
.Red);
227
using SolidBrush brush = new(
Color
.Red);
237
using SolidBrush brush = new(
Color
.Red);
239
Assert.Equal(
Color
.FromArgb(
Color
.Red.ToArgb()), pen.Color);
245
using HatchBrush brush = new(HatchStyle.BackwardDiagonal,
Color
.Red);
253
using LinearGradientBrush brush = new(Point.Empty, new Point(1, 2),
Color
.Blue,
Color
.Red);
271
pen.Color =
Color
.Red;
272
Assert.Equal(
Color
.Red, pen.Color);
274
pen.Color =
Color
.Red;
275
Assert.Equal(
Color
.Red, pen.Color);
282
Pen pen = new(
Color
.Red);
285
Assert.Equal(
Color
.Red, pen.Color);
287
pen.Color =
Color
.Red;
288
Assert.Equal(
Color
.Red, pen.Color);
290
AssertExtensions.Throws<ArgumentException>(null, () => pen.Color =
Color
.Black);
296
using SolidBrush brush = new(
Color
.Red);
301
AssertExtensions.Throws<ArgumentException>(null, () => pen.Color =
Color
.Red);
310
using SolidBrush brush = new(
Color
.Red);
323
using SolidBrush brush = new(
Color
.Red);
331
using SolidBrush brush = new(
Color
.Red);
347
using SolidBrush brush = new(
Color
.Red);
355
using SolidBrush brush = new(
Color
.Red);
366
using SolidBrush brush = new(
Color
.Red);
383
using SolidBrush brush = new(
Color
.Red);
391
using SolidBrush brush = new(
Color
.Red);
404
using SolidBrush brush = new(
Color
.Red);
418
using SolidBrush brush = new(
Color
.Red);
435
using SolidBrush brush = new(
Color
.Red);
443
using SolidBrush brush = new(
Color
.Red);
456
using SolidBrush brush = new(
Color
.Red);
473
using SolidBrush brush = new(
Color
.Red);
485
using SolidBrush brush = new(
Color
.Red);
493
using SolidBrush brush = new(
Color
.Red);
510
using SolidBrush brush = new(
Color
.Red);
519
using SolidBrush brush = new(
Color
.Red);
534
using SolidBrush brush = new(
Color
.Red);
548
using SolidBrush brush = new(
Color
.Red);
556
using SolidBrush brush = new(
Color
.Red);
568
using SolidBrush brush = new(
Color
.Red);
576
using SolidBrush brush = new(
Color
.Red);
593
using SolidBrush brush = new(
Color
.Red);
611
using SolidBrush brush = new(
Color
.Red);
625
using SolidBrush brush = new(
Color
.Red);
633
using SolidBrush brush = new(
Color
.Red);
660
using SolidBrush brush = new(
Color
.Red);
679
using SolidBrush brush = new(
Color
.Red);
687
using SolidBrush brush = new(
Color
.Red);
702
using SolidBrush brush = new(
Color
.Red);
713
using SolidBrush brush = new(
Color
.Red);
721
using SolidBrush brush = new(
Color
.Red);
738
using SolidBrush brush = new(
Color
.Red);
747
using SolidBrush brush = new(
Color
.Red);
769
using SolidBrush brush = new(
Color
.Red);
795
using SolidBrush brush = new(
Color
.Red);
804
using SolidBrush brush = new(
Color
.Red);
814
using SolidBrush brush = new(
Color
.Red);
833
using SolidBrush brush = new(
Color
.Red);
846
using SolidBrush brush = new(
Color
.Red);
858
using SolidBrush brush = new(
Color
.Red);
873
using SolidBrush brush = new(
Color
.Red);
898
using (SolidBrush brush = new(
Color
.Red))
922
using SolidBrush brush = new(
Color
.Red);
930
using SolidBrush brush = new(
Color
.Red);
958
using (SolidBrush brush = new(
Color
.Red))
982
using SolidBrush brush = new(
Color
.Red);
990
using SolidBrush brush = new(
Color
.Red);
1005
using SolidBrush brush = new(
Color
.Red);
1022
using SolidBrush brush = new(
Color
.Red);
1033
using SolidBrush brush = new(
Color
.Red);
1043
using SolidBrush brush = new(
Color
.Red);
1051
using SolidBrush brush = new(
Color
.Red);
1062
using SolidBrush brush = new(
Color
.Red);
1077
using SolidBrush brush = new(
Color
.Red);
1085
using SolidBrush brush = new(
Color
.Red);
1094
using SolidBrush brush = new(
Color
.Red);
1105
using SolidBrush brush = new(
Color
.Red);
1133
using (SolidBrush brush = new(
Color
.Red))
1157
using SolidBrush brush = new(
Color
.Red);
1165
using SolidBrush brush = new(
Color
.Red);
1183
using SolidBrush brush = new(
Color
.Red);
1192
using SolidBrush brush = new(
Color
.Red);
System\Drawing\SolidBrushTests.cs (22)
10
yield return new object[] { default(
Color
),
Color
.FromArgb(0) };
11
yield return new object[] {
Color
.PapayaWhip,
Color
.PapayaWhip };
16
public void Ctor_Color(
Color
color,
Color
expectedColor)
25
SolidBrush brush = new(
Color
.PeachPuff);
32
Assert.NotEqual(
Color
.PeachPuff, clone.Color);
35
brush.Color =
Color
.PapayaWhip;
36
Assert.NotEqual(
Color
.PapayaWhip, clone.Color);
47
Assert.Equal(
Color
.Bisque, brush.Color);
53
SolidBrush brush = new(
Color
.LavenderBlush);
62
SolidBrush brush = new(default(
Color
));
71
SolidBrush brush = new(
Color
.Aquamarine);
74
Assert.Equal(
Color
.Aquamarine, brush.Color);
80
SolidBrush brush = new(
Color
.Goldenrod) { Color =
Color
.GhostWhite };
81
Assert.Equal(
Color
.GhostWhite, brush.Color);
87
SolidBrush brush = new(default(
Color
));
90
AssertExtensions.Throws<ArgumentException>(null, () => brush.Color =
Color
.WhiteSmoke);
97
AssertExtensions.Throws<ArgumentException>(null, () => brush.Color =
Color
.AntiqueWhite);
103
SolidBrush brush = new(
Color
.Plum);
System\Drawing\SystemBrushesTests.cs (4)
45
public static object[] Brush(Func<Brush> getBrush,
Color
expectedColor) => [getBrush, expectedColor];
49
public void SystemBrushes_Get_ReturnsExpected(Func<Brush> getBrush,
Color
expectedColor)
53
AssertExtensions.Throws<ArgumentException>(null, () => brush.Color =
Color
.Red);
61
AssertExtensions.Throws<ArgumentException>(null, () => SystemBrushes.FromSystemColor(
Color
.Blue));
System\Drawing\SystemPensTest.cs (4)
47
public static object[] Pen(Func<Pen> getPen,
Color
expectedColor) => [getPen, expectedColor];
51
public void SystemPens_Get_ReturnsExpected(Func<Pen> getPen,
Color
expectedColor)
63
AssertExtensions.Throws<ArgumentException>(null, () => pen.Color =
Color
.AliceBlue);
86
AssertExtensions.Throws<ArgumentException>(null, () => SystemPens.FromSystemColor(
Color
.Blue));
System\Drawing\TextureBrushTests.cs (75)
729
Color
empty =
Color
.FromArgb(0, 0, 0, 0);
732
[
Color
.Red,
Color
.Green, empty, empty],
733
[
Color
.Blue,
Color
.Yellow, empty, empty],
748
[
Color
.Red,
Color
.Green,
Color
.Red,
Color
.Green],
749
[
Color
.Blue,
Color
.Yellow,
Color
.Blue,
Color
.Yellow],
750
[
Color
.Red,
Color
.Green,
Color
.Red,
Color
.Green],
751
[
Color
.Blue,
Color
.Yellow,
Color
.Blue,
Color
.Yellow]
764
[
Color
.Red,
Color
.Green,
Color
.Green,
Color
.Red],
765
[
Color
.Blue,
Color
.Yellow,
Color
.Yellow,
Color
.Blue],
766
[
Color
.Red,
Color
.Green,
Color
.Green,
Color
.Red],
767
[
Color
.Blue,
Color
.Yellow,
Color
.Yellow,
Color
.Blue]
780
[
Color
.Red,
Color
.Green,
Color
.Red,
Color
.Green],
781
[
Color
.Blue,
Color
.Yellow,
Color
.Blue,
Color
.Yellow],
782
[
Color
.Blue,
Color
.Yellow,
Color
.Blue,
Color
.Yellow],
783
[
Color
.Red,
Color
.Green,
Color
.Red,
Color
.Green]
796
[
Color
.Red,
Color
.Green,
Color
.Green,
Color
.Red],
797
[
Color
.Blue,
Color
.Yellow,
Color
.Yellow,
Color
.Blue],
798
[
Color
.Blue,
Color
.Yellow,
Color
.Yellow,
Color
.Blue],
799
[
Color
.Red,
Color
.Green,
Color
.Green,
Color
.Red]
803
private static void VerifyFillRect(WrapMode wrapMode,
Color
[][] expectedColors)
806
brushBitmap.SetPixel(0, 0,
Color
.Red);
807
brushBitmap.SetPixel(1, 0,
Color
.Green);
808
brushBitmap.SetPixel(0, 1,
Color
.Blue);
809
brushBitmap.SetPixel(1, 1,
Color
.Yellow);
System.Drawing.Primitives (340)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (11)
12
public static
Color
ConvertFromString(string strValue, CultureInfo culture)
20
return
Color
.Empty;
24
Color
c;
45
return
Color
.FromName(colorName);
52
return PossibleKnownColor(
Color
.FromArgb(unchecked((int)(0xFF000000 | (uint)IntFromString(text, culture)))));
64
1 => PossibleKnownColor(
Color
.FromArgb(IntFromString(textSpan[tokens[0]], culture))),
65
3 => PossibleKnownColor(
Color
.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture))),
66
4 => PossibleKnownColor(
Color
.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture), IntFromString(textSpan[tokens[3]], culture))),
71
private static
Color
PossibleKnownColor(
Color
color)
79
foreach (
Color
c in ColorTable.Colors.Values)
src\libraries\Common\src\System\Drawing\ColorTable.cs (10)
12
private static readonly Lazy<Dictionary<string,
Color
>> s_colorConstants = new Lazy<Dictionary<string,
Color
>>(GetColors);
14
private static Dictionary<string,
Color
> GetColors()
16
var colors = new Dictionary<string,
Color
>(StringComparer.OrdinalIgnoreCase);
17
FillWithProperties(colors, typeof(
Color
));
23
Dictionary<string,
Color
> dictionary,
28
if (prop.PropertyType == typeof(
Color
))
29
dictionary[prop.Name] = (
Color
)prop.GetValue(null, null)!;
33
internal static Dictionary<string,
Color
> Colors => s_colorConstants.Value;
35
internal static bool TryGetNamedColor(string name, out
Color
result) => Colors.TryGetValue(name, out result);
System\Drawing\Color.cs (162)
17
public readonly struct Color : IEquatable<
Color
>
19
public static readonly
Color
Empty;
24
public static
Color
Transparent => new Color(KnownColor.Transparent);
26
public static
Color
AliceBlue => new Color(KnownColor.AliceBlue);
28
public static
Color
AntiqueWhite => new Color(KnownColor.AntiqueWhite);
30
public static
Color
Aqua => new Color(KnownColor.Aqua);
32
public static
Color
Aquamarine => new Color(KnownColor.Aquamarine);
34
public static
Color
Azure => new Color(KnownColor.Azure);
36
public static
Color
Beige => new Color(KnownColor.Beige);
38
public static
Color
Bisque => new Color(KnownColor.Bisque);
40
public static
Color
Black => new Color(KnownColor.Black);
42
public static
Color
BlanchedAlmond => new Color(KnownColor.BlanchedAlmond);
44
public static
Color
Blue => new Color(KnownColor.Blue);
46
public static
Color
BlueViolet => new Color(KnownColor.BlueViolet);
48
public static
Color
Brown => new Color(KnownColor.Brown);
50
public static
Color
BurlyWood => new Color(KnownColor.BurlyWood);
52
public static
Color
CadetBlue => new Color(KnownColor.CadetBlue);
54
public static
Color
Chartreuse => new Color(KnownColor.Chartreuse);
56
public static
Color
Chocolate => new Color(KnownColor.Chocolate);
58
public static
Color
Coral => new Color(KnownColor.Coral);
60
public static
Color
CornflowerBlue => new Color(KnownColor.CornflowerBlue);
62
public static
Color
Cornsilk => new Color(KnownColor.Cornsilk);
64
public static
Color
Crimson => new Color(KnownColor.Crimson);
66
public static
Color
Cyan => new Color(KnownColor.Cyan);
68
public static
Color
DarkBlue => new Color(KnownColor.DarkBlue);
70
public static
Color
DarkCyan => new Color(KnownColor.DarkCyan);
72
public static
Color
DarkGoldenrod => new Color(KnownColor.DarkGoldenrod);
74
public static
Color
DarkGray => new Color(KnownColor.DarkGray);
76
public static
Color
DarkGreen => new Color(KnownColor.DarkGreen);
78
public static
Color
DarkKhaki => new Color(KnownColor.DarkKhaki);
80
public static
Color
DarkMagenta => new Color(KnownColor.DarkMagenta);
82
public static
Color
DarkOliveGreen => new Color(KnownColor.DarkOliveGreen);
84
public static
Color
DarkOrange => new Color(KnownColor.DarkOrange);
86
public static
Color
DarkOrchid => new Color(KnownColor.DarkOrchid);
88
public static
Color
DarkRed => new Color(KnownColor.DarkRed);
90
public static
Color
DarkSalmon => new Color(KnownColor.DarkSalmon);
92
public static
Color
DarkSeaGreen => new Color(KnownColor.DarkSeaGreen);
94
public static
Color
DarkSlateBlue => new Color(KnownColor.DarkSlateBlue);
96
public static
Color
DarkSlateGray => new Color(KnownColor.DarkSlateGray);
98
public static
Color
DarkTurquoise => new Color(KnownColor.DarkTurquoise);
100
public static
Color
DarkViolet => new Color(KnownColor.DarkViolet);
102
public static
Color
DeepPink => new Color(KnownColor.DeepPink);
104
public static
Color
DeepSkyBlue => new Color(KnownColor.DeepSkyBlue);
106
public static
Color
DimGray => new Color(KnownColor.DimGray);
108
public static
Color
DodgerBlue => new Color(KnownColor.DodgerBlue);
110
public static
Color
Firebrick => new Color(KnownColor.Firebrick);
112
public static
Color
FloralWhite => new Color(KnownColor.FloralWhite);
114
public static
Color
ForestGreen => new Color(KnownColor.ForestGreen);
116
public static
Color
Fuchsia => new Color(KnownColor.Fuchsia);
118
public static
Color
Gainsboro => new Color(KnownColor.Gainsboro);
120
public static
Color
GhostWhite => new Color(KnownColor.GhostWhite);
122
public static
Color
Gold => new Color(KnownColor.Gold);
124
public static
Color
Goldenrod => new Color(KnownColor.Goldenrod);
126
public static
Color
Gray => new Color(KnownColor.Gray);
128
public static
Color
Green => new Color(KnownColor.Green);
130
public static
Color
GreenYellow => new Color(KnownColor.GreenYellow);
132
public static
Color
Honeydew => new Color(KnownColor.Honeydew);
134
public static
Color
HotPink => new Color(KnownColor.HotPink);
136
public static
Color
IndianRed => new Color(KnownColor.IndianRed);
138
public static
Color
Indigo => new Color(KnownColor.Indigo);
140
public static
Color
Ivory => new Color(KnownColor.Ivory);
142
public static
Color
Khaki => new Color(KnownColor.Khaki);
144
public static
Color
Lavender => new Color(KnownColor.Lavender);
146
public static
Color
LavenderBlush => new Color(KnownColor.LavenderBlush);
148
public static
Color
LawnGreen => new Color(KnownColor.LawnGreen);
150
public static
Color
LemonChiffon => new Color(KnownColor.LemonChiffon);
152
public static
Color
LightBlue => new Color(KnownColor.LightBlue);
154
public static
Color
LightCoral => new Color(KnownColor.LightCoral);
156
public static
Color
LightCyan => new Color(KnownColor.LightCyan);
158
public static
Color
LightGoldenrodYellow => new Color(KnownColor.LightGoldenrodYellow);
160
public static
Color
LightGreen => new Color(KnownColor.LightGreen);
162
public static
Color
LightGray => new Color(KnownColor.LightGray);
164
public static
Color
LightPink => new Color(KnownColor.LightPink);
166
public static
Color
LightSalmon => new Color(KnownColor.LightSalmon);
168
public static
Color
LightSeaGreen => new Color(KnownColor.LightSeaGreen);
170
public static
Color
LightSkyBlue => new Color(KnownColor.LightSkyBlue);
172
public static
Color
LightSlateGray => new Color(KnownColor.LightSlateGray);
174
public static
Color
LightSteelBlue => new Color(KnownColor.LightSteelBlue);
176
public static
Color
LightYellow => new Color(KnownColor.LightYellow);
178
public static
Color
Lime => new Color(KnownColor.Lime);
180
public static
Color
LimeGreen => new Color(KnownColor.LimeGreen);
182
public static
Color
Linen => new Color(KnownColor.Linen);
184
public static
Color
Magenta => new Color(KnownColor.Magenta);
186
public static
Color
Maroon => new Color(KnownColor.Maroon);
188
public static
Color
MediumAquamarine => new Color(KnownColor.MediumAquamarine);
190
public static
Color
MediumBlue => new Color(KnownColor.MediumBlue);
192
public static
Color
MediumOrchid => new Color(KnownColor.MediumOrchid);
194
public static
Color
MediumPurple => new Color(KnownColor.MediumPurple);
196
public static
Color
MediumSeaGreen => new Color(KnownColor.MediumSeaGreen);
198
public static
Color
MediumSlateBlue => new Color(KnownColor.MediumSlateBlue);
200
public static
Color
MediumSpringGreen => new Color(KnownColor.MediumSpringGreen);
202
public static
Color
MediumTurquoise => new Color(KnownColor.MediumTurquoise);
204
public static
Color
MediumVioletRed => new Color(KnownColor.MediumVioletRed);
206
public static
Color
MidnightBlue => new Color(KnownColor.MidnightBlue);
208
public static
Color
MintCream => new Color(KnownColor.MintCream);
210
public static
Color
MistyRose => new Color(KnownColor.MistyRose);
212
public static
Color
Moccasin => new Color(KnownColor.Moccasin);
214
public static
Color
NavajoWhite => new Color(KnownColor.NavajoWhite);
216
public static
Color
Navy => new Color(KnownColor.Navy);
218
public static
Color
OldLace => new Color(KnownColor.OldLace);
220
public static
Color
Olive => new Color(KnownColor.Olive);
222
public static
Color
OliveDrab => new Color(KnownColor.OliveDrab);
224
public static
Color
Orange => new Color(KnownColor.Orange);
226
public static
Color
OrangeRed => new Color(KnownColor.OrangeRed);
228
public static
Color
Orchid => new Color(KnownColor.Orchid);
230
public static
Color
PaleGoldenrod => new Color(KnownColor.PaleGoldenrod);
232
public static
Color
PaleGreen => new Color(KnownColor.PaleGreen);
234
public static
Color
PaleTurquoise => new Color(KnownColor.PaleTurquoise);
236
public static
Color
PaleVioletRed => new Color(KnownColor.PaleVioletRed);
238
public static
Color
PapayaWhip => new Color(KnownColor.PapayaWhip);
240
public static
Color
PeachPuff => new Color(KnownColor.PeachPuff);
242
public static
Color
Peru => new Color(KnownColor.Peru);
244
public static
Color
Pink => new Color(KnownColor.Pink);
246
public static
Color
Plum => new Color(KnownColor.Plum);
248
public static
Color
PowderBlue => new Color(KnownColor.PowderBlue);
250
public static
Color
Purple => new Color(KnownColor.Purple);
256
public static
Color
RebeccaPurple => new Color(KnownColor.RebeccaPurple);
258
public static
Color
Red => new Color(KnownColor.Red);
260
public static
Color
RosyBrown => new Color(KnownColor.RosyBrown);
262
public static
Color
RoyalBlue => new Color(KnownColor.RoyalBlue);
264
public static
Color
SaddleBrown => new Color(KnownColor.SaddleBrown);
266
public static
Color
Salmon => new Color(KnownColor.Salmon);
268
public static
Color
SandyBrown => new Color(KnownColor.SandyBrown);
270
public static
Color
SeaGreen => new Color(KnownColor.SeaGreen);
272
public static
Color
SeaShell => new Color(KnownColor.SeaShell);
274
public static
Color
Sienna => new Color(KnownColor.Sienna);
276
public static
Color
Silver => new Color(KnownColor.Silver);
278
public static
Color
SkyBlue => new Color(KnownColor.SkyBlue);
280
public static
Color
SlateBlue => new Color(KnownColor.SlateBlue);
282
public static
Color
SlateGray => new Color(KnownColor.SlateGray);
284
public static
Color
Snow => new Color(KnownColor.Snow);
286
public static
Color
SpringGreen => new Color(KnownColor.SpringGreen);
288
public static
Color
SteelBlue => new Color(KnownColor.SteelBlue);
290
public static
Color
Tan => new Color(KnownColor.Tan);
292
public static
Color
Teal => new Color(KnownColor.Teal);
294
public static
Color
Thistle => new Color(KnownColor.Thistle);
296
public static
Color
Tomato => new Color(KnownColor.Tomato);
298
public static
Color
Turquoise => new Color(KnownColor.Turquoise);
300
public static
Color
Violet => new Color(KnownColor.Violet);
302
public static
Color
Wheat => new Color(KnownColor.Wheat);
304
public static
Color
White => new Color(KnownColor.White);
306
public static
Color
WhiteSmoke => new Color(KnownColor.WhiteSmoke);
308
public static
Color
Yellow => new Color(KnownColor.Yellow);
310
public static
Color
YellowGreen => new Color(KnownColor.YellowGreen);
441
private static
Color
FromArgb(uint argb) => new Color(argb, StateARGBValueValid, null, (KnownColor)0);
443
public static
Color
FromArgb(int argb) => FromArgb(unchecked((uint)argb));
445
public static
Color
FromArgb(int alpha, int red, int green, int blue)
460
public static
Color
FromArgb(int alpha,
Color
baseColor)
470
public static
Color
FromArgb(int red, int green, int blue) => FromArgb(byte.MaxValue, red, green, blue);
472
public static
Color
FromKnownColor(KnownColor color) =>
475
public static
Color
FromName(string name)
478
if (ColorTable.TryGetNamedColor(name, out
Color
color))
573
IsNamedColor ? $"{nameof(
Color
)} [{Name}]" :
574
(state & StateValueMask) != 0 ? $"{nameof(
Color
)} [A={A}, R={R}, G={G}, B={B}]" :
575
$"{nameof(
Color
)} [Empty]";
577
public static bool operator ==(
Color
left,
Color
right) =>
583
public static bool operator !=(
Color
left,
Color
right) => !(left == right);
585
public override bool Equals([NotNullWhen(true)] object? obj) => obj is
Color
other && Equals(other);
587
public bool Equals(
Color
other) => this == other;
System\Drawing\ColorTranslator.cs (82)
11
/// Translates colors to and from GDI+ <see cref='
Color
'/> objects.
22
private static Dictionary<string,
Color
>? s_htmlSysColorTable;
25
=> ((value >> COLORREF_RedShift) & 0xFF) <<
Color
.ARGBRedShift
26
| ((value >> COLORREF_GreenShift) & 0xFF) <<
Color
.ARGBGreenShift
27
| ((value >> COLORREF_BlueShift) & 0xFF) <<
Color
.ARGBBlueShift
28
|
Color
.ARGBAlphaMask; // COLORREF's are always fully opaque
31
/// Translates the specified <see cref='
Color
'/> to a Win32 color.
33
public static int ToWin32(
Color
c)
43
/// Translates the specified <see cref='
Color
'/> to an Ole color.
45
public static int ToOle(
Color
c)
133
/// Translates an Ole color value to a GDI+ <see cref='
Color
'/>.
135
public static
Color
FromOle(int oleColor)
145
return
Color
.FromKnownColor(KnownColor.ActiveBorder);
147
return
Color
.FromKnownColor(KnownColor.ActiveCaption);
149
return
Color
.FromKnownColor(KnownColor.ActiveCaptionText);
151
return
Color
.FromKnownColor(KnownColor.AppWorkspace);
153
return
Color
.FromKnownColor(KnownColor.Control);
155
return
Color
.FromKnownColor(KnownColor.ControlDark);
157
return
Color
.FromKnownColor(KnownColor.ControlDarkDark);
159
return
Color
.FromKnownColor(KnownColor.ControlLight);
161
return
Color
.FromKnownColor(KnownColor.ControlLightLight);
163
return
Color
.FromKnownColor(KnownColor.ControlText);
165
return
Color
.FromKnownColor(KnownColor.Desktop);
167
return
Color
.FromKnownColor(KnownColor.GradientActiveCaption);
169
return
Color
.FromKnownColor(KnownColor.GradientInactiveCaption);
171
return
Color
.FromKnownColor(KnownColor.GrayText);
173
return
Color
.FromKnownColor(KnownColor.Highlight);
175
return
Color
.FromKnownColor(KnownColor.HighlightText);
177
return
Color
.FromKnownColor(KnownColor.HotTrack);
179
return
Color
.FromKnownColor(KnownColor.InactiveBorder);
181
return
Color
.FromKnownColor(KnownColor.InactiveCaption);
183
return
Color
.FromKnownColor(KnownColor.InactiveCaptionText);
185
return
Color
.FromKnownColor(KnownColor.Info);
187
return
Color
.FromKnownColor(KnownColor.InfoText);
189
return
Color
.FromKnownColor(KnownColor.Menu);
191
return
Color
.FromKnownColor(KnownColor.MenuBar);
193
return
Color
.FromKnownColor(KnownColor.MenuHighlight);
195
return
Color
.FromKnownColor(KnownColor.MenuText);
197
return
Color
.FromKnownColor(KnownColor.ScrollBar);
199
return
Color
.FromKnownColor(KnownColor.Window);
201
return
Color
.FromKnownColor(KnownColor.WindowFrame);
203
return
Color
.FromKnownColor(KnownColor.WindowText);
212
/// Translates an Win32 color value to a GDI+ <see cref='
Color
'/>.
214
public static
Color
FromWin32(int win32Color)
220
/// Translates an Html color representation to a GDI+ <see cref='
Color
'/>.
222
public static
Color
FromHtml(string htmlColor)
224
Color
c =
Color
.Empty;
236
c =
Color
.FromArgb(Convert.ToInt32(htmlColor.Substring(1, 2), 16),
246
c =
Color
.FromArgb(Convert.ToInt32(r + r, 16),
255
c =
Color
.LightGray;
286
/// Translates the specified <see cref='
Color
'/> to an Html string color representation.
288
public static string ToHtml(
Color
c)
381
if (c ==
Color
.LightGray)
402
s_htmlSysColorTable = new Dictionary<string,
Color
>(27)
404
["activeborder"] =
Color
.FromKnownColor(KnownColor.ActiveBorder),
405
["activecaption"] =
Color
.FromKnownColor(KnownColor.ActiveCaption),
406
["appworkspace"] =
Color
.FromKnownColor(KnownColor.AppWorkspace),
407
["background"] =
Color
.FromKnownColor(KnownColor.Desktop),
408
["buttonface"] =
Color
.FromKnownColor(KnownColor.Control),
409
["buttonhighlight"] =
Color
.FromKnownColor(KnownColor.ControlLightLight),
410
["buttonshadow"] =
Color
.FromKnownColor(KnownColor.ControlDark),
411
["buttontext"] =
Color
.FromKnownColor(KnownColor.ControlText),
412
["captiontext"] =
Color
.FromKnownColor(KnownColor.ActiveCaptionText),
413
["graytext"] =
Color
.FromKnownColor(KnownColor.GrayText),
414
["highlight"] =
Color
.FromKnownColor(KnownColor.Highlight),
415
["highlighttext"] =
Color
.FromKnownColor(KnownColor.HighlightText),
416
["inactiveborder"] =
Color
.FromKnownColor(KnownColor.InactiveBorder),
417
["inactivecaption"] =
Color
.FromKnownColor(KnownColor.InactiveCaption),
418
["inactivecaptiontext"] =
Color
.FromKnownColor(KnownColor.InactiveCaptionText),
419
["infobackground"] =
Color
.FromKnownColor(KnownColor.Info),
420
["infotext"] =
Color
.FromKnownColor(KnownColor.InfoText),
421
["menu"] =
Color
.FromKnownColor(KnownColor.Menu),
422
["menutext"] =
Color
.FromKnownColor(KnownColor.MenuText),
423
["scrollbar"] =
Color
.FromKnownColor(KnownColor.ScrollBar),
424
["threeddarkshadow"] =
Color
.FromKnownColor(KnownColor.ControlDarkDark),
425
["threedface"] =
Color
.FromKnownColor(KnownColor.Control),
426
["threedhighlight"] =
Color
.FromKnownColor(KnownColor.ControlLight),
427
["threedlightshadow"] =
Color
.FromKnownColor(KnownColor.ControlLightLight),
428
["window"] =
Color
.FromKnownColor(KnownColor.Window),
429
["windowframe"] =
Color
.FromKnownColor(KnownColor.WindowFrame),
430
["windowtext"] =
Color
.FromKnownColor(KnownColor.WindowText)
System\Drawing\KnownColorTable.cs (6)
475
internal static
Color
ArgbToKnownColor(uint argb)
477
Debug.Assert((argb &
Color
.ARGBAlphaMask) ==
Color
.ARGBAlphaMask);
485
return
Color
.FromKnownColor((KnownColor)index);
490
return
Color
.FromArgb((int)argb);
541
Debug.Assert(
Color
.IsKnownColorSystem(color));
System\Drawing\SystemColors.cs (69)
12
public static
Color
ActiveBorder =>
Color
.FromKnownColor(KnownColor.ActiveBorder);
13
public static
Color
ActiveCaption =>
Color
.FromKnownColor(KnownColor.ActiveCaption);
14
public static
Color
ActiveCaptionText =>
Color
.FromKnownColor(KnownColor.ActiveCaptionText);
15
public static
Color
AppWorkspace =>
Color
.FromKnownColor(KnownColor.AppWorkspace);
17
public static
Color
ButtonFace =>
Color
.FromKnownColor(KnownColor.ButtonFace);
18
public static
Color
ButtonHighlight =>
Color
.FromKnownColor(KnownColor.ButtonHighlight);
19
public static
Color
ButtonShadow =>
Color
.FromKnownColor(KnownColor.ButtonShadow);
21
public static
Color
Control =>
Color
.FromKnownColor(KnownColor.Control);
22
public static
Color
ControlDark =>
Color
.FromKnownColor(KnownColor.ControlDark);
23
public static
Color
ControlDarkDark =>
Color
.FromKnownColor(KnownColor.ControlDarkDark);
24
public static
Color
ControlLight =>
Color
.FromKnownColor(KnownColor.ControlLight);
25
public static
Color
ControlLightLight =>
Color
.FromKnownColor(KnownColor.ControlLightLight);
26
public static
Color
ControlText =>
Color
.FromKnownColor(KnownColor.ControlText);
28
public static
Color
Desktop =>
Color
.FromKnownColor(KnownColor.Desktop);
30
public static
Color
GradientActiveCaption =>
Color
.FromKnownColor(KnownColor.GradientActiveCaption);
31
public static
Color
GradientInactiveCaption =>
Color
.FromKnownColor(KnownColor.GradientInactiveCaption);
32
public static
Color
GrayText =>
Color
.FromKnownColor(KnownColor.GrayText);
34
public static
Color
Highlight =>
Color
.FromKnownColor(KnownColor.Highlight);
35
public static
Color
HighlightText =>
Color
.FromKnownColor(KnownColor.HighlightText);
36
public static
Color
HotTrack =>
Color
.FromKnownColor(KnownColor.HotTrack);
38
public static
Color
InactiveBorder =>
Color
.FromKnownColor(KnownColor.InactiveBorder);
39
public static
Color
InactiveCaption =>
Color
.FromKnownColor(KnownColor.InactiveCaption);
40
public static
Color
InactiveCaptionText =>
Color
.FromKnownColor(KnownColor.InactiveCaptionText);
41
public static
Color
Info =>
Color
.FromKnownColor(KnownColor.Info);
42
public static
Color
InfoText =>
Color
.FromKnownColor(KnownColor.InfoText);
44
public static
Color
Menu =>
Color
.FromKnownColor(KnownColor.Menu);
45
public static
Color
MenuBar =>
Color
.FromKnownColor(KnownColor.MenuBar);
46
public static
Color
MenuHighlight =>
Color
.FromKnownColor(KnownColor.MenuHighlight);
47
public static
Color
MenuText =>
Color
.FromKnownColor(KnownColor.MenuText);
49
public static
Color
ScrollBar =>
Color
.FromKnownColor(KnownColor.ScrollBar);
51
public static
Color
Window =>
Color
.FromKnownColor(KnownColor.Window);
52
public static
Color
WindowFrame =>
Color
.FromKnownColor(KnownColor.WindowFrame);
53
public static
Color
WindowText =>
Color
.FromKnownColor(KnownColor.WindowText);
58
/// <see cref="
Color
.FromKnownColor(KnownColor)"/>). This is currently "dark mode"
63
/// <see cref="KnownColor"/> <see cref="
Color
"/> values are always looked up every
65
/// <see cref="
Color
"/> values will change when this property is set.
System.Private.Windows.Core (55)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (8)
254
/// Writes a <see cref="
Color
"/> in binary format.
256
public static void WriteColor(Stream stream,
Color
value)
261
new ClassInfo(1, typeof(
Color
).FullName!, s_colorMemberNames),
272
typeof(
Color
).GetField("name", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(value) is not string name ? null : new BinaryObjectString(2, name),
273
(long)typeof(
Color
).GetField("value", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(value)!,
274
(short)typeof(
Color
).GetField("knownColor", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(value)!,
275
(short)typeof(
Color
).GetField("state", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(value)!
747
case
Color
color:
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (3)
224
/// Tries to get this object as a <see cref="
Color
"/>.
235
|| !classInfo.TypeNameMatches(typeof(
Color
))
244
ConstructorInfo? ctor = typeof(
Color
).GetConstructor(
System\Value.cs (16)
452
public Value(
Color
value)
466
public Value(
Color
? value)
478
public static implicit operator Value(
Color
value) => new(value);
479
public static explicit operator
Color
(in Value value) => value.GetValue<
Color
>();
480
public static implicit operator Value(
Color
? value) => new(value);
481
public static explicit operator
Color
?(in Value value) => value.GetValue<
Color
?>();
632
if (typeof(T) == typeof(
Color
))
633
return new(Unsafe.As<T,
Color
>(ref Unsafe.AsRef(in value)));
720
else if (typeof(T) == typeof(
Color
) && _object == TypeFlags.PackedColor)
722
Color
color = _union.PackedColor.Extract();
723
value = Unsafe.As<
Color
, T>(ref Unsafe.AsRef(in color));
881
else if (typeof(T) == typeof(
Color
?) && _object == TypeFlags.PackedColor)
883
Color
? color = _union.PackedColor.Extract();
884
value = Unsafe.As<
Color
?, T>(ref Unsafe.AsRef(in color));
System\Value.PackedColor.cs (6)
34
public static bool TryCreate(in
Color
color, out PackedColor packedColor)
36
CastColor castColor = Unsafe.As<
Color
, CastColor>(ref Unsafe.AsRef(in color));
52
public
Color
Extract() => _knownColor != 0
53
?
Color
.FromKnownColor((KnownColor)_knownColor)
54
: _state == 0 ?
Color
.Empty :
Color
.FromArgb(_argb);
System\Value.PackedColorFlag.cs (2)
10
private sealed class PackedColorFlag : TypeFlag<
Color
>
14
public override
Color
To(in Value value)
Windows\Win32\Foundation\COLORREF.cs (4)
10
/// Never convert native constants (such as <see cref="PInvokeCore.CLR_NONE"/> to <see cref="
Color
"/> or pass them through
11
/// any conversion in <see cref="
Color
"/>, <see cref="ColorTranslator"/>, etc. as they can change the value.
22
public static implicit operator COLORREF(
Color
color) => new((uint)ColorTranslator.ToWin32(color));
23
public static implicit operator
Color
(COLORREF color) => ColorTranslator.FromWin32((int)color.Value);
Windows\Win32\Foundation\LPARAM.cs (1)
26
public static explicit operator LPARAM(
Color
value) => (LPARAM)ColorTranslator.ToWin32(value);
Windows\Win32\Foundation\WPARAM.cs (1)
31
public static explicit operator WPARAM(
Color
value) => new((nuint)ColorTranslator.ToWin32(value));
Windows\Win32\Graphics\Gdi\ARGB.cs (7)
42
public static implicit operator ARGB(in
Color
color) => new((uint)color.ToArgb());
44
public static implicit operator
Color
(ARGB argb) =>
Color
.FromArgb((int)argb.Value);
47
public static
Color
[] ToColorArray(params ReadOnlySpan<ARGB> argbColors)
49
Color
[] colors = new
Color
[argbColors.Length];
58
public static
Color
[] ToColorArray(params ReadOnlySpan<uint> argbColors) => ToColorArray(
Windows\Win32\Graphics\Gdi\ArgbBuffer.cs (2)
30
public ArgbBuffer(Span<
Color
> colors) : this(colors.Length)
41
public readonly
Color
[] ToColorArray(int length) => ARGB.ToColorArray(_bufferScope[..length]);
Windows\Win32\Graphics\Gdi\CreateBrushScope.cs (1)
29
public CreateBrushScope(
Color
color)
Windows\Win32\Graphics\Gdi\CreatePenScope.cs (1)
29
public CreatePenScope(
Color
color, int width = 1) =>
Windows\Win32\Graphics\GdiPlus\GpBitmapExtensions.cs (2)
35
public static HBITMAP GetHBITMAP(this IPointer<GpBitmap> bitmap) => bitmap.GetHBITMAP(
Color
.LightGray);
37
public static HBITMAP GetHBITMAP(this IPointer<GpBitmap> bitmap,
Color
background)
Windows\Win32\PInvoke.GetSysColorBrush.cs (1)
11
public static HBRUSH GetSysColorBrush(
Color
systemColor)
System.Private.Windows.Core.TestUtilities (7)
CommonTestHelper.cs (7)
59
public static TheoryData<
Color
> GetColorTheoryData()
62
Color
.Red,
63
Color
.Blue,
64
Color
.Black
67
public static TheoryData<
Color
> GetColorWithEmptyTheoryData()
70
Color
.Red,
71
Color
.Empty
System.Windows.Forms (2098)
System\Drawing\Design\UITypeEditor.cs (1)
53
[typeof(
Color
)] = $"System.Drawing.Design.ColorEditor, {AssemblyRef.SystemDrawingDesign}",
System\Windows\Forms\ActiveX\AxHost.cs (4)
271
public override
Color
BackColor
363
public override
Color
ForeColor
3664
protected static
Color
GetColorFromOleColor(uint color)
3674
protected static uint GetOleColorFromColor(
Color
color)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (8)
32
private
Color
ActiveXAmbientBackColor
38
private
Color
ActiveXAmbientForeColor
175
internal
Color
AmbientBackColor
190
return property.Value is null ?
Color
.Empty : (
Color
)property.Value;
236
internal
Color
AmbientForeColor
251
return property.Value is null ?
Color
.Empty : (
Color
)property.Value;
System\Windows\Forms\AmbientProperties.cs (2)
18
public
Color
BackColor { get; set; }
33
public
Color
ForeColor { get; set; }
System\Windows\Forms\ComponentModel\COM2Interop\COM2ColorConverter.cs (3)
14
public override Type ManagedType => typeof(
Color
);
30
managedValue ??=
Color
.Black;
32
if (managedValue is
Color
managedValueAsColor)
System\Windows\Forms\Control.cs (35)
694
Color
color = BackColor;
771
public virtual
Color
BackColor
775
Color
c = RawBackColor; // inheritedProperties.BackColor
809
if (!value.Equals(
Color
.Empty) && !GetStyle(ControlStyles.SupportsTransparentBackColor) && value.A < 255)
814
Color
previous = BackColor;
1546
public static
Color
DefaultBackColor => SystemColors.Control;
1577
public static
Color
DefaultForeColor => SystemColors.ControlText;
1610
internal
Color
DisabledColor
1614
Color
color = BackColor;
1997
public virtual
Color
ForeColor
2001
Properties.TryGetValue(s_foreColorProperty, out
Color
color);
2030
Color
previous = ForeColor;
2391
private bool IsValidBackColor(
Color
c) => c.IsEmpty || GetStyle(ControlStyles.SupportsTransparentBackColor) || c.A == 255;
2665
internal
Color
RawBackColor => Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
2777
private bool RenderColorTransparent(
Color
c)
2949
Color
oldBackColor =
Color
.Empty;
2950
Color
oldForeColor =
Color
.Empty;
4156
Color
oldForeColor = ForeColor;
4157
Color
oldBackColor = BackColor;
6868
Color
backColor = Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
7001
Color
foreColor = Properties.GetValueOrDefault<
Color
>(s_foreColorProperty);
8041
internal void PaintBackground(PaintEventArgs e, Rectangle rectangle,
Color
backColor, Point scrollOffset = default)
8092
private static void PaintBackColor(PaintEventArgs e, Rectangle rectangle,
Color
backColor)
8099
Color
color = backColor;
8121
using Pen pen = new(
Color
.Red, width: 2);
9032
BackColor =
Color
.Empty;
9061
ForeColor =
Color
.Empty;
10438
Color
backColor = Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
10458
internal virtual bool ShouldSerializeForeColor() => !Properties.GetValueOrDefault<
Color
>(s_foreColorProperty).IsEmpty;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (2)
154
public override
Color
BackColor
161
if (value !=
Color
.Empty)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorData.cs (10)
12
public
Color
ButtonFace { get; set; }
13
public
Color
ButtonShadow { get; set; }
14
public
Color
ButtonShadowDark { get; set; }
15
public
Color
ContrastButtonShadow { get; set; }
16
public
Color
WindowText { get; set; }
17
public
Color
WindowDisabled { get; set; }
18
public
Color
Highlight { get; set; }
19
public
Color
LowHighlight { get; set; }
20
public
Color
LowButtonFace { get; set; }
21
public
Color
WindowFrame { get; set; }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorOptions.cs (6)
12
private readonly
Color
_backColor;
13
private readonly
Color
_foreColor;
19
internal ColorOptions(IDeviceContext deviceContext,
Color
foreColor,
Color
backColor)
72
colors.LowButtonFace =
Color
.FromArgb(
83
colors.LowHighlight =
Color
.FromArgb(
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (19)
26
private protected static
Color
GetContrastingBorderColor(
Color
buttonBorderShadowColor) =>
Color
.FromArgb(
73
internal static Brush CreateDitherBrush(
Color
color1,
Color
color2)
97
internal static void DrawDitheredFill(Graphics g,
Color
color1,
Color
color2, Rectangle bounds)
303
Color
color = GetContrastingBorderColor(colors.ButtonShadow);
325
Color
color,
356
internal static void DrawFlatFocus(IDeviceContext deviceContext, Rectangle r,
Color
color)
423
internal static void DrawDefaultBorder(IDeviceContext deviceContext, Rectangle r,
Color
color, bool isDefault)
451
private void DrawText(PaintEventArgs e, LayoutData layout,
Color
color, ColorData colors)
530
Color
foreColor,
633
Color
foreColor,
634
Color
backColor,
648
internal static ColorOptions PaintFlatRender(Graphics g,
Color
foreColor,
Color
backColor, bool enabled) =>
653
internal static ColorOptions PaintPopupRender(Graphics g,
Color
foreColor,
Color
backColor, bool enabled) =>
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (4)
14
private void PaintBackground(PaintEventArgs e, Rectangle r,
Color
backColor)
40
Color
backColor = Control.BackColor;
133
Color
backColor = Control.BackColor;
226
Color
backColor;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (1)
43
Color
borderColor = colors.Options.HighContrast
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (3)
73
Color
color = isHighContrastHighlighted ? SystemColors.Highlight : Control.BackColor;
97
Color
.Transparent,
167
Color
highlightTextColor = SystemColors.HighlightText;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (15)
15
private static
Color
t_checkImageCheckedBackColor;
20
private static
Color
t_checkImageIndeterminateBackColor;
31
Color
checkColor,
32
Color
checkBackground,
33
Color
checkBorder,
87
Color
checkBackground,
92
Color
color;
100
Color
comboColor = SystemInformation.HighContrast ? SystemColors.ControlDark : SystemColors.Control;
101
color =
Color
.FromArgb(
120
Color
checkBackground,
136
protected void DrawCheckOnly(PaintEventArgs e, LayoutData layout, ColorData colors,
Color
checkColor) =>
155
Color
checkColor)
294
private static Bitmap GetCheckBoxImage(
Color
checkColor, Rectangle fullSize, ref
Color
cacheCheckColor, ref Bitmap? cacheCheckImage)
312
offscreen.Clear(
Color
.Transparent);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxFlatAdapter.cs (3)
71
private void PaintFlatWorker(PaintEventArgs e,
Color
checkColor,
Color
checkBackground,
Color
checkBorder, ColorData colors)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (10)
17
Color
checkColor,
18
Color
checkBackground,
19
Color
checkBorder)
28
Color
checkBackground,
34
Color
field = checkBackground;
58
protected void DrawCheckBackgroundFlat(PaintEventArgs e, Rectangle bounds,
Color
borderColor,
Color
checkBackground)
60
Color
field = checkBackground;
61
Color
border = borderColor;
133
protected void DrawCheckOnly(PaintEventArgs e, LayoutData layout,
Color
checkColor, bool disabledColors)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonFlatAdapter.cs (3)
74
private void PaintFlatWorker(PaintEventArgs e,
Color
checkColor,
Color
checkBackground,
Color
checkBorder, ColorData colors)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonPopupAdapter.cs (1)
57
Color
checkBackgroundColor = colors.Options.HighContrast ? colors.ButtonFace : colors.Highlight;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (2)
145
Color
textColor;
244
Color
textColor;
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (2)
124
Color
textColor;
193
Color
textColor;
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (17)
16
private
Color
_borderColor =
Color
.Empty;
17
private
Color
_checkedBackColor =
Color
.Empty;
18
private
Color
_mouseDownBackColor =
Color
.Empty;
19
private
Color
_mouseOverBackColor =
Color
.Empty;
66
[DefaultValue(typeof(
Color
), "")]
67
public
Color
BorderColor
72
if (value.Equals(
Color
.Transparent))
94
[DefaultValue(typeof(
Color
), "")]
95
public
Color
CheckedBackColor
118
[DefaultValue(typeof(
Color
), "")]
119
public
Color
MouseDownBackColor
142
[DefaultValue(typeof(
Color
), "")]
143
public
Color
MouseOverBackColor
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (2)
133
Color
textColor;
222
Color
textColor;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
256
public override
Color
BackColor
536
public override
Color
ForeColor
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (6)
85
Color
borderPenColor = GetPopupOuterBorderColor(comboBox, focused);
119
Color
outerBorderColor = GetOuterBorderColor(comboBox);
120
Color
innerBorderColor = GetInnerBorderColor(comboBox);
189
protected virtual
Color
GetOuterBorderColor(ComboBox comboBox)
192
protected virtual
Color
GetPopupOuterBorderColor(ComboBox comboBox, bool focused)
202
protected virtual
Color
GetInnerBorderColor(ComboBox comboBox)
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (2)
34
Color
windowColor = t_visualStyleRenderer.GetColor(ColorProperty.FillColor);
91
Color
textColor = t_visualStyleRenderer.GetColor(ColorProperty.TextColor);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (17)
356
private static readonly
Color
s_defaultBackColor = SystemColors.Window;
357
private static readonly
Color
s_defaultBackgroundColor = SystemColors.ControlDark;
358
private
Color
_backgroundColor = s_defaultBackgroundColor;
991
public override
Color
BackColor
1010
public
Color
BackgroundColor
1971
else if (_defaultCellStyle.BackColor ==
Color
.Empty
1972
|| _defaultCellStyle.ForeColor ==
Color
.Empty
1973
|| _defaultCellStyle.SelectionBackColor ==
Color
.Empty
1974
|| _defaultCellStyle.SelectionForeColor ==
Color
.Empty
1983
if (_defaultCellStyle.BackColor ==
Color
.Empty)
1988
if (_defaultCellStyle.ForeColor ==
Color
.Empty)
1994
if (_defaultCellStyle.SelectionBackColor ==
Color
.Empty)
1999
if (_defaultCellStyle.SelectionForeColor ==
Color
.Empty)
2080
private static
Color
DefaultGridColor => SystemColors.WindowFrame;
2599
public override
Color
ForeColor
2635
public
Color
GridColor
2663
internal
Color
GridPenColor { get; private set; }
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5680
ControlPaint.FillReversibleRectangle(RectangleToScreen(rectInsertionBar),
Color
.White);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
668
Color
backBrushColor = PaintSelectionBackground(paintParts) && cellSelected
671
Color
foreBrushColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.ForeColor;
890
ControlPaint.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1),
Color
.Empty, cellStyle.ForeColor);
953
Color
.Empty,
976
Color
textColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (15)
945
internal static int ColorDistance(
Color
color1,
Color
color2)
1429
internal (
Color
darkColor,
Color
lightColor) GetContrastedColors(
Color
baseline)
1436
Color
darkColor;
1437
Color
lightColor;
1893
inheritedCellStyleTmp.BackColor =
Color
.Empty;
1894
inheritedCellStyleTmp.ForeColor =
Color
.Empty;
1895
inheritedCellStyleTmp.SelectionBackColor =
Color
.Empty;
1896
inheritedCellStyleTmp.SelectionForeColor =
Color
.Empty;
3140
(
Color
darkColor,
Color
lightColor) = GetContrastedColors(cellStyle.BackColor);
3152
Color
dividerWidthColor = advancedBorderStyle.Right switch
3187
Color
dividerHeightColor = advancedBorderStyle.Bottom switch
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (17)
107
public
Color
BackColor
109
get => Properties.GetValueOrDefault<
Color
>(s_propBackColor);
112
Color
previous = Properties.AddOrRemoveValue(s_propBackColor, value);
158
public
Color
ForeColor
160
get => Properties.TryGetValue(s_propForeColor, out
Color
color) ? color :
Color
.Empty;
163
Color
previous = Properties.AddOrRemoveValue(s_propForeColor, value);
307
public
Color
SelectionBackColor
309
get => Properties.GetValueOrDefault<
Color
>(s_propSelectionBackColor);
312
Color
previous = Properties.AddOrRemoveValue(s_propSelectionBackColor, value);
321
public
Color
SelectionForeColor
323
get => Properties.GetValueOrDefault<
Color
>(s_propSelectionForeColor);
326
Color
previous = Properties.AddOrRemoveValue(s_propSelectionForeColor, value);
538
if (BackColor !=
Color
.Empty)
544
if (ForeColor !=
Color
.Empty)
555
if (SelectionBackColor !=
Color
.Empty)
566
if (SelectionForeColor !=
Color
.Empty)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (6)
1109
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected
1279
Color
foreBrushColor = default;
1280
Color
backBrushColor = default;
1281
Color
highlight = default;
1303
highlight =
Color
.FromArgb(
1353
offscreen.Clear(
Color
.Transparent);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (4)
867
Color
brushColor = (PaintSelectionBackground(paintParts) && cellSelected) || IsHighlighted()
908
Color
textColor;
1004
(
Color
darkColor,
Color
lightColor) = GetContrastedColors(cellStyle.BackColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (5)
1931
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected && !cellEdited
2270
ControlPaint.DrawFocusRectangle(g, focusBounds,
Color
.Empty, cellStyle.ForeColor);
2281
ControlPaint.DrawFocusRectangle(g, focusBounds,
Color
.Empty, cellStyle.ForeColor);
2286
ControlPaint.DrawFocusRectangle(g, textBounds,
Color
.Empty, cellStyle.ForeColor);
2329
Color
textColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (2)
78
Color
opaqueBackColor =
Color
.FromArgb(255, dataGridViewCellStyle.BackColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
544
Color
backColor = PaintSelectionBackground(paintParts) && cellSelected
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (2)
776
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected
897
ControlPaint.DrawFocusRectangle(g, valBounds,
Color
.Empty, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (15)
43
public
Color
ActiveLinkColor
47
if (Properties.TryGetValue(s_propLinkCellActiveLinkColor, out
Color
color))
81
internal
Color
ActiveLinkColorInternal
151
public
Color
LinkColor
155
if (Properties.TryGetValue(s_propLinkCellLinkColor, out
Color
color))
189
internal
Color
LinkColorInternal
288
public
Color
VisitedLinkColor
292
if (Properties.TryGetValue(s_propLinkCellVisitedLinkColor, out
Color
color))
328
internal
Color
VisitedLinkColorInternal
349
private
Color
HighContrastLinkColor
913
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected
1003
ControlPaint.DrawFocusRectangle(g, focusBounds,
Color
.Empty, brushColor);
1006
Color
linkColor;
1044
ControlPaint.DrawFocusRectangle(g, errorBounds,
Color
.Empty, brushColor);
1059
ControlPaint.DrawFocusRectangle(g, valBounds,
Color
.Empty, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (3)
27
public
Color
ActiveLinkColor
138
public
Color
LinkColor
318
public
Color
VisitedLinkColor
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (2)
1187
Color
backColor;
1197
ControlPaint.DrawFocusRectangle(graphics, bounds,
Color
.Empty, backColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (11)
731
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected
813
Color
iconColor;
873
Color
textColor;
971
Color
iconColor;
1021
Color
foreColor,
1022
Color
backColor)
1031
(
Color
OldColor,
Color
NewColor) map = new(
Color
.Black, foreColor);
1033
attr.SetRemapTable(ColorAdjustType.Bitmap, new ReadOnlySpan<(
Color
OldColor,
Color
NewColor)>(ref map));
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
681
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected && !cellEdited
711
ControlPaint.DrawFocusRectangle(graphics, valBounds,
Color
.Empty, cellStyle.ForeColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (2)
104
Color
opaqueBackColor =
Color
.FromArgb(255, dataGridViewCellStyle.BackColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (4)
264
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected
308
Color
textColor;
373
(
Color
darkColor,
Color
lightColor) = GetContrastedColors(cellStyle.BackColor);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (17)
28
protected static readonly
Color
DefaultTitleBackColor = SystemColors.ActiveCaption;
33
protected static readonly
Color
DefaultTitleForeColor = SystemColors.ActiveCaptionText;
38
protected static readonly
Color
DefaultMonthBackColor = SystemColors.Window;
43
protected static readonly
Color
DefaultTrailingForeColor = SystemColors.GrayText;
90
private
Color
_calendarForeColor = DefaultForeColor;
91
private
Color
_calendarTitleBackColor = DefaultTitleBackColor;
92
private
Color
_calendarTitleForeColor = DefaultTitleForeColor;
93
private
Color
_calendarMonthBackground = DefaultMonthBackColor;
94
private
Color
_calendarTrailingText = DefaultTrailingForeColor;
128
public override
Color
BackColor
179
public
Color
CalendarForeColor
239
public
Color
CalendarTitleBackColor
262
public
Color
CalendarTitleForeColor
285
public
Color
CalendarTrailingForeColor
308
public
Color
CalendarMonthBackground
489
public override
Color
ForeColor
1276
private void SetControlColor(uint colorIndex,
Color
value)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
430
Color
textColor = Enabled ? ForeColor : TextRenderer.DisabledTextColor(BackColor);
467
Color
backColor = DisabledColor;
547
Color
boxColor = Enabled ? ForeColor : SystemColors.GrayText;
664
Color
backColor = BackColor;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (7)
88
Color
textColor,
130
Color
textColor,
140
Color
textColor,
171
Color
textColor,
248
Color
backColor = SystemColors.Control;
277
Color
textColor,
344
private static
Color
DefaultTextColor(GroupBoxState state)
System\Windows\Forms\Controls\ImageList\ImageList.cs (7)
26
private static readonly
Color
s_fakeTransparencyColor =
Color
.FromArgb(0x0d, 0x0b, 0x0c);
260
public
Color
TransparentColor { get; set; } =
Color
.Transparent;
281
Color
transparent = TransparentColor;
747
private void ResetTransparentColor() => TransparentColor =
Color
.LightGray;
749
private bool ShouldSerializeTransparentColor() => !TransparentColor.Equals(
Color
.LightGray);
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (1)
295
public int Add(Image value,
Color
transparentColor)
System\Windows\Forms\Controls\ImageList\ImageList.Original.cs (6)
17
internal
Color
_customTransparentColor =
Color
.Transparent;
21
internal Original(object image, OriginalOptions options) : this(image, options,
Color
.Transparent)
25
internal Original(object image, OriginalOptions options, int nImages) : this(image, options,
Color
.Transparent)
30
internal Original(object image, OriginalOptions options,
Color
customTransparentColor)
42
Debug.Assert(customTransparentColor.Equals(
Color
.Transparent), "Specified a custom transparent color then told us to ignore it");
System\Windows\Forms\Controls\Labels\Label.cs (2)
1261
Color
color;
1306
Color
disabledTextForeColor = TextRenderer.DisabledTextColor(BackColor);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (27)
23
private static
Color
s_iedisabledLinkColor =
Color
.Empty;
29
private
Color
_linkColor =
Color
.Empty;
30
private
Color
_activeLinkColor =
Color
.Empty;
31
private
Color
_visitedLinkColor =
Color
.Empty;
32
private
Color
_disabledLinkColor =
Color
.Empty;
70
public
Color
ActiveLinkColor
88
public
Color
DisabledLinkColor
126
private static
Color
IELinkColor => LinkUtilities.IELinkColor;
128
private static
Color
IEActiveLinkColor => LinkUtilities.IEActiveLinkColor;
130
private static
Color
IEVisitedLinkColor => LinkUtilities.IEVisitedLinkColor;
132
private
Color
IEDisabledLinkColor
235
public
Color
LinkColor
346
public
Color
VisitedLinkColor
1129
Color
foreColor;
1256
Color
brushColor =
Color
.Empty;
1285
if (brushColor ==
Color
.Empty)
1357
Color
color;
1528
internal void ResetActiveLinkColor() => _activeLinkColor =
Color
.Empty;
1530
internal void ResetDisabledLinkColor() => _disabledLinkColor =
Color
.Empty;
1534
_linkColor =
Color
.Empty;
1538
private void ResetVisitedLinkColor() => _visitedLinkColor =
Color
.Empty;
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (17)
13
private static
Color
s_ielinkColor =
Color
.Empty;
14
private static
Color
s_ieactiveLinkColor =
Color
.Empty;
15
private static
Color
s_ievisitedLinkColor =
Color
.Empty;
27
private static
Color
GetIEColor(string name)
52
return
Color
.FromArgb(rgb[0], rgb[1], rgb[2]);
58
return
Color
.Blue;
62
return
Color
.Purple;
66
return
Color
.Red;
70
return
Color
.Red;
74
public static
Color
IELinkColor
87
public static
Color
IEActiveLinkColor
100
public static
Color
IEVisitedLinkColor
114
public static
Color
GetVisitedLinkColor()
120
return
Color
.FromArgb(r, g, b);
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (4)
581
Color
backColor = (SelectionMode != SelectionMode.None) ? e.BackColor : BackColor;
582
Color
foreColor = (SelectionMode != SelectionMode.None) ? e.ForeColor : ForeColor;
717
Color
backColor = (SelectionMode != SelectionMode.None) ? e.BackColor : BackColor;
728
Color
foreColor = (SelectionMode != SelectionMode.None) ? e.ForeColor : ForeColor;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
153
public override
Color
BackColor
446
public override
Color
ForeColor
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (4)
24
Color
foreColor,
25
Color
backColor,
66
public
Color
ForeColor { get; }
71
public
Color
BackColor { get; }
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (2)
96
Color
backColor = ItemIndex == -1 ? Item!.BackColor : SubItem!.BackColor;
139
Color
color = ItemIndex == -1 ? Item!.ForeColor : SubItem!.ForeColor;
System\Windows\Forms\Controls\ListView\ListView.cs (17)
106
private
Color
_odCacheForeColor = SystemColors.WindowText;
107
private
Color
_odCacheBackColor = SystemColors.Window;
346
public override
Color
BackColor
831
public override
Color
ForeColor
2780
Color
subItemForeColor =
Color
.Empty;
2781
Color
subItemBackColor =
Color
.Empty;
2811
Color
riFore =
Color
.Empty;
2812
Color
riBack =
Color
.Empty;
4931
Color
c;
5991
Color
foreColor =
Color
.FromArgb((int)PInvoke.GetTextColor(nmcd->hdc).Value);
5992
Color
backColor =
Color
.FromArgb((int)PInvoke.GetBkColor(nmcd->hdc).Value);
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (3)
16
private
Color
_color =
Color
.Empty;
65
public
Color
Color
System\Windows\Forms\Controls\ListView\ListViewItem.cs (14)
106
public ListViewItem(string[]? items, int imageIndex,
Color
foreColor,
Color
backColor, Font? font)
162
public ListViewItem(string[]? items, int imageIndex,
Color
foreColor,
Color
backColor, Font? font, ListViewGroup? group)
197
public ListViewItem(string[]? items, string? imageKey,
Color
foreColor,
Color
backColor, Font? font)
235
public ListViewItem(string[]? items, string? imageKey,
Color
foreColor,
Color
backColor, Font? font, ListViewGroup? group)
280
public
Color
BackColor
411
public
Color
ForeColor
1214
BackColor = (
Color
)info.GetValue(nameof(BackColor), typeof(
Color
))!;
1226
ForeColor = (
Color
)info.GetValue(nameof(ForeColor), typeof(
Color
))!;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (6)
46
public ListViewSubItem(ListViewItem? owner, string? text,
Color
foreColor,
Color
backColor, Font font)
71
public
Color
BackColor
75
if (style is not null && style.backColor !=
Color
.Empty)
164
public
Color
ForeColor
168
if (style is not null && style.foreColor !=
Color
.Empty)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.SubItemStyle.cs (4)
15
public
Color
backColor =
Color
.Empty; // Do NOT rename (binary serialization).
17
public
Color
foreColor =
Color
.Empty; // Do NOT rename (binary serialization).
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (4)
125
public ListViewSubItem Add(string? text,
Color
foreColor,
Color
backColor, Font font)
167
public void AddRange(string[] items,
Color
foreColor,
Color
backColor, Font font)
System\Windows\Forms\Controls\ListView\ListViewItemConverter.cs (8)
88
typeof(
Color
),
89
typeof(
Color
),
97
item.SubItems[0].CustomForeColor ? item.ForeColor :
Color
.Empty,
98
item.SubItems[0].CustomBackColor ? item.BackColor :
Color
.Empty,
108
typeof(
Color
),
109
typeof(
Color
),
117
item.SubItems[0].CustomForeColor ? item.ForeColor :
Color
.Empty,
118
item.SubItems[0].CustomBackColor ? item.BackColor :
Color
.Empty,
System\Windows\Forms\Controls\ListView\ListViewSubItemConverter.cs (2)
39
typeof(
Color
),
40
typeof(
Color
),
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (12)
62
private static readonly
Color
s_defaultTitleBackColor = SystemColors.ActiveCaption;
63
private static readonly
Color
s_defaultTitleForeColor = SystemColors.ActiveCaptionText;
64
private static readonly
Color
s_trailingForeColor = SystemColors.GrayText;
90
private
Color
_titleBackColor = s_defaultTitleBackColor;
91
private
Color
_titleForeColor = s_defaultTitleForeColor;
92
private
Color
_trailingForeColor = s_trailingForeColor;
196
public override
Color
BackColor
412
public override
Color
ForeColor
908
public
Color
TitleBackColor
929
public
Color
TitleForeColor
950
public
Color
TrailingForeColor
1687
private void SetControlColor(uint colorIndex,
Color
value)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
264
public override
Color
ForeColor
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
28
private static readonly
Color
s_defaultForeColor = SystemColors.Highlight;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (43)
73
private
Color
_lineColor = SystemInformation.HighContrast ? SystemColors.ControlDarkDark : SystemColors.InactiveBorder;
74
private
Color
_categoryForegroundColor = SystemColors.ControlText;
75
private
Color
_categorySplitterColor = SystemColors.Control;
76
private
Color
_viewBorderColor = SystemColors.ControlDark;
77
private
Color
_selectedItemWithFocusForeColor = SystemColors.HighlightText;
78
private
Color
_selectedItemWithFocusBackColor = SystemColors.Highlight;
313
public override
Color
BackColor
406
[DefaultValue(typeof(
Color
), "ControlText")]
407
public
Color
CategoryForeColor
425
public
Color
CommandsBackColor
440
public
Color
CommandsForeColor
455
public
Color
CommandsLinkColor
466
public
Color
CommandsActiveLinkColor
477
public
Color
CommandsDisabledLinkColor
488
[DefaultValue(typeof(
Color
), "ControlDark")]
489
public
Color
CommandsBorderColor
574
public override
Color
ForeColor
627
[DefaultValue(typeof(
Color
), "Control")]
628
public
Color
HelpBackColor
639
[DefaultValue(typeof(
Color
), "ControlText")]
640
public
Color
HelpForeColor
651
[DefaultValue(typeof(
Color
), "ControlDark")]
652
public
Color
HelpBorderColor
699
[DefaultValue(typeof(
Color
), "Highlight")]
700
public
Color
SelectedItemWithFocusBackColor
718
[DefaultValue(typeof(
Color
), "HighlightText")]
719
public
Color
SelectedItemWithFocusForeColor
737
[DefaultValue(typeof(
Color
), "GrayText")]
738
public
Color
DisabledItemForeColor
753
[DefaultValue(typeof(
Color
), "Control")]
754
public
Color
CategorySplitterColor
789
[DefaultValue(typeof(
Color
), "InactiveBorder")]
790
public
Color
LineColor
1271
[DefaultValue(typeof(
Color
), "Window")]
1272
public
Color
ViewBackColor
1284
[DefaultValue(typeof(
Color
), "WindowText")]
1285
public
Color
ViewForeColor
1300
[DefaultValue(typeof(
Color
), "ControlDark")]
1301
public
Color
ViewBorderColor
3700
=> _commandsPane.SetColors(SystemColors.Control, SystemColors.ControlText,
Color
.Empty,
Color
.Empty,
Color
.Empty,
Color
.Empty);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SnappableControl.cs (1)
35
public
Color
BorderColor { get; set; } = SystemColors.ControlDark;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (2)
60
protected override
Color
BackgroundColor => OwnerGridView?.LineColor ?? default;
62
protected override
Color
LabelTextColor => OwnerGrid.CategoryForeColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (6)
151
internal void SetColors(
Color
background,
Color
normalText,
Color
link,
Color
activeLink,
Color
visitedLink,
Color
disabledLink)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (4)
22
Color
c = ControlPaint.LightLight(Control.BackColor);
39
Color
c = ControlPaint.Light(Control.BackColor);
75
Color
c = (ARGB)SystemColors.Window;
90
Color
backgroundColor = isHighContrastHighlighted ? SystemColors.Highlight : Control.BackColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (12)
68
private static
Color
InvertColor(
Color
color)
69
=>
Color
.FromArgb(color.A, (byte)~color.R, (byte)~color.G, (byte)~color.B);
130
protected virtual
Color
BackgroundColor => OwnerGridView?.BackColor ?? default;
132
protected virtual
Color
LabelTextColor
1526
Color
backColor = selected ? ownerGrid.SelectedItemWithFocusBackColor : BackgroundColor;
1591
Color
textColor = selected && _hasFocus
1678
Color
textColor = InvertColor(OwnerGrid.LineColor);
1710
Color
backgroundColor = ColorInversionNeededInHighContrast ? InvertColor(OwnerGrid.LineColor) : OwnerGrid.LineColor;
1740
Color
penColor = OwnerGridView?.TextColor ?? default;
1800
Color
textColor = ShouldRenderReadOnly ? ownerGrid.GrayTextColor : ownerGrid.TextColor;
1830
Color
backColor = BackgroundColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (9)
56
private
Color
_grayTextColor;
149
public override
Color
BackColor
350
internal
Color
GrayTextColor
380
return
Color
.FromArgb(colorRGB);
1306
public
Color
LineColor => OwnerGrid.LineColor;
1308
public
Color
SelectedItemWithFocusForeColor => OwnerGrid.SelectedItemWithFocusForeColor;
1310
public
Color
SelectedItemWithFocusBackColor => OwnerGrid.SelectedItemWithFocusBackColor;
1963
public
Color
TextColor => ForeColor;
2361
Color
color = BackColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (4)
37
leftColor:
Color
.Black, leftWidth: 1, leftStyle: ButtonBorderStyle.Dashed,
38
topColor:
Color
.Black, topWidth: 1, topStyle: ButtonBorderStyle.Dashed,
39
rightColor:
Color
.Black, rightWidth: 1, rightStyle: ButtonBorderStyle.Dashed,
40
bottomColor:
Color
.Black, bottomWidth: 1, bottomStyle: ButtonBorderStyle.Dashed);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (12)
61
private
Color
_selectionBackColorToSetOnHandleCreated;
369
public override
Color
ForeColor
836
/// <returns>The color or <see cref="
Color
.Empty"/> if the selection has more than one color.</returns>
840
public
Color
SelectionColor
844
Color
selColor =
Color
.Empty;
876
public unsafe
Color
SelectionBackColor
880
Color
selColor =
Color
.Empty;
914
if (value ==
Color
.Empty)
2113
private bool InternalSetForeColor(
Color
value)
2445
if (_selectionBackColorToSetOnHandleCreated !=
Color
.Empty)
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
110
public override
Color
ForeColor
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
170
public override
Color
BackColor
249
public override
Color
ForeColor
System\Windows\Forms\Controls\TabControl\TabPage.cs (6)
98
public override
Color
BackColor
102
Color
color = base.BackColor;
113
return
Color
.Transparent;
123
if (value !=
Color
.Empty)
606
Color
bkColor = (UseVisualStyleBackColor && !Application.IsDarkModeEnabled)
607
?
Color
.Transparent
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (2)
79
Color
textColor = t_visualStyleRenderer.GetColor(ColorProperty.TextColor);
130
Color
textColor = t_visualStyleRenderer.GetColor(ColorProperty.TextColor);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
282
public override
Color
BackColor
496
public override
Color
ForeColor
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (2)
30
Color
windowColor = t_visualStyleRenderer.GetColor(ColorProperty.FillColor);
83
Color
textColor = t_visualStyleRenderer.GetColor(ColorProperty.TextColor);
System\Windows\Forms\Controls\ToolStrips\ProfessionalColors.cs (57)
36
public static
Color
ButtonSelectedHighlight => ColorTable.ButtonSelectedHighlight;
39
public static
Color
ButtonSelectedHighlightBorder => ColorTable.ButtonSelectedHighlightBorder;
42
public static
Color
ButtonPressedHighlight => ColorTable.ButtonPressedHighlight;
45
public static
Color
ButtonPressedHighlightBorder => ColorTable.ButtonPressedHighlightBorder;
48
public static
Color
ButtonCheckedHighlight => ColorTable.ButtonCheckedHighlight;
51
public static
Color
ButtonCheckedHighlightBorder => ColorTable.ButtonCheckedHighlightBorder;
54
public static
Color
ButtonPressedBorder => ColorTable.ButtonPressedBorder;
57
public static
Color
ButtonSelectedBorder => ColorTable.ButtonSelectedBorder;
60
public static
Color
ButtonCheckedGradientBegin => ColorTable.ButtonCheckedGradientBegin;
63
public static
Color
ButtonCheckedGradientMiddle => ColorTable.ButtonCheckedGradientMiddle;
66
public static
Color
ButtonCheckedGradientEnd => ColorTable.ButtonCheckedGradientEnd;
69
public static
Color
ButtonSelectedGradientBegin => ColorTable.ButtonSelectedGradientBegin;
72
public static
Color
ButtonSelectedGradientMiddle => ColorTable.ButtonSelectedGradientMiddle;
75
public static
Color
ButtonSelectedGradientEnd => ColorTable.ButtonSelectedGradientEnd;
78
public static
Color
ButtonPressedGradientBegin => ColorTable.ButtonPressedGradientBegin;
81
public static
Color
ButtonPressedGradientMiddle => ColorTable.ButtonPressedGradientMiddle;
84
public static
Color
ButtonPressedGradientEnd => ColorTable.ButtonPressedGradientEnd;
87
public static
Color
CheckBackground => ColorTable.CheckBackground;
90
public static
Color
CheckSelectedBackground => ColorTable.CheckSelectedBackground;
93
public static
Color
CheckPressedBackground => ColorTable.CheckPressedBackground;
96
public static
Color
GripDark => ColorTable.GripDark;
99
public static
Color
GripLight => ColorTable.GripLight;
102
public static
Color
ImageMarginGradientBegin => ColorTable.ImageMarginGradientBegin;
105
public static
Color
ImageMarginGradientMiddle => ColorTable.ImageMarginGradientMiddle;
108
public static
Color
ImageMarginGradientEnd => ColorTable.ImageMarginGradientEnd;
111
public static
Color
ImageMarginRevealedGradientBegin => ColorTable.ImageMarginRevealedGradientBegin;
114
public static
Color
ImageMarginRevealedGradientMiddle => ColorTable.ImageMarginRevealedGradientMiddle;
117
public static
Color
ImageMarginRevealedGradientEnd => ColorTable.ImageMarginRevealedGradientEnd;
120
public static
Color
MenuStripGradientBegin => ColorTable.MenuStripGradientBegin;
123
public static
Color
MenuStripGradientEnd => ColorTable.MenuStripGradientEnd;
126
public static
Color
MenuBorder => ColorTable.MenuBorder;
129
public static
Color
MenuItemSelected => ColorTable.MenuItemSelected;
132
public static
Color
MenuItemBorder => ColorTable.MenuItemBorder;
135
public static
Color
MenuItemSelectedGradientBegin => ColorTable.MenuItemSelectedGradientBegin;
138
public static
Color
MenuItemSelectedGradientEnd => ColorTable.MenuItemSelectedGradientEnd;
141
public static
Color
MenuItemPressedGradientBegin => ColorTable.MenuItemPressedGradientBegin;
144
public static
Color
MenuItemPressedGradientMiddle => ColorTable.MenuItemPressedGradientMiddle;
147
public static
Color
MenuItemPressedGradientEnd => ColorTable.MenuItemPressedGradientEnd;
150
public static
Color
RaftingContainerGradientBegin => ColorTable.RaftingContainerGradientBegin;
153
public static
Color
RaftingContainerGradientEnd => ColorTable.RaftingContainerGradientEnd;
156
public static
Color
SeparatorDark => ColorTable.SeparatorDark;
159
public static
Color
SeparatorLight => ColorTable.SeparatorLight;
162
public static
Color
StatusStripBorder => ColorTable.StatusStripBorder;
165
public static
Color
StatusStripGradientBegin => ColorTable.StatusStripGradientBegin;
168
public static
Color
StatusStripGradientEnd => ColorTable.StatusStripGradientEnd;
171
public static
Color
ToolStripBorder => ColorTable.ToolStripBorder;
174
public static
Color
ToolStripDropDownBackground => ColorTable.ToolStripDropDownBackground;
177
public static
Color
ToolStripGradientBegin => ColorTable.ToolStripGradientBegin;
180
public static
Color
ToolStripGradientMiddle => ColorTable.ToolStripGradientMiddle;
183
public static
Color
ToolStripGradientEnd => ColorTable.ToolStripGradientEnd;
186
public static
Color
ToolStripContentPanelGradientBegin => ColorTable.ToolStripContentPanelGradientBegin;
189
public static
Color
ToolStripContentPanelGradientEnd => ColorTable.ToolStripContentPanelGradientEnd;
192
public static
Color
ToolStripPanelGradientBegin => ColorTable.ToolStripPanelGradientBegin;
195
public static
Color
ToolStripPanelGradientEnd => ColorTable.ToolStripPanelGradientEnd;
198
public static
Color
OverflowButtonGradientBegin => ColorTable.OverflowButtonGradientBegin;
201
public static
Color
OverflowButtonGradientMiddle => ColorTable.OverflowButtonGradientMiddle;
204
public static
Color
OverflowButtonGradientEnd => ColorTable.OverflowButtonGradientEnd;
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (1037)
11
private Dictionary<KnownColors,
Color
>? _professionalRGB;
31
private Dictionary<KnownColors,
Color
> ColorTable
40
_professionalRGB ??= new Dictionary<KnownColors,
Color
>((int)KnownColors.lastKnownColor);
49
_professionalRGB ??= new Dictionary<KnownColors,
Color
>((int)KnownColors.lastKnownColor);
58
_professionalRGB ??= new Dictionary<KnownColors,
Color
>((int)KnownColors.lastKnownColor);
87
private
Color
FromKnownColor(KnownColors color)
107
public virtual
Color
ButtonSelectedHighlight => FromKnownColor(KnownColors.ButtonSelectedHighlight);
110
public virtual
Color
ButtonSelectedHighlightBorder => ButtonPressedBorder;
113
public virtual
Color
ButtonPressedHighlight => FromKnownColor(KnownColors.ButtonPressedHighlight);
116
public virtual
Color
ButtonPressedHighlightBorder => SystemColors.Highlight;
119
public virtual
Color
ButtonCheckedHighlight => FromKnownColor(KnownColors.ButtonCheckedHighlight);
122
public virtual
Color
ButtonCheckedHighlightBorder => SystemColors.Highlight;
125
public virtual
Color
ButtonPressedBorder => FromKnownColor(KnownColors.msocbvcrCBCtlBdrMouseOver);
128
public virtual
Color
ButtonSelectedBorder => FromKnownColor(KnownColors.msocbvcrCBCtlBdrMouseOver);
131
public virtual
Color
ButtonCheckedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradSelectedBegin);
134
public virtual
Color
ButtonCheckedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradSelectedMiddle);
137
public virtual
Color
ButtonCheckedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradSelectedEnd);
140
public virtual
Color
ButtonSelectedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverBegin);
143
public virtual
Color
ButtonSelectedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverMiddle);
146
public virtual
Color
ButtonSelectedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverEnd);
149
public virtual
Color
ButtonPressedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMouseDownBegin);
152
public virtual
Color
ButtonPressedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradMouseDownMiddle);
155
public virtual
Color
ButtonPressedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMouseDownEnd);
157
public virtual
Color
CheckBackground => FromKnownColor(KnownColors.msocbvcrCBCtlBkgdSelected);
160
public virtual
Color
CheckSelectedBackground => FromKnownColor(KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver);
163
public virtual
Color
CheckPressedBackground => FromKnownColor(KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver);
166
public virtual
Color
GripDark => FromKnownColor(KnownColors.msocbvcrCBDragHandle);
169
public virtual
Color
GripLight => FromKnownColor(KnownColors.msocbvcrCBDragHandleShadow);
172
public virtual
Color
ImageMarginGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradVertBegin);
175
public virtual
Color
ImageMarginGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradVertMiddle);
178
public virtual
Color
ImageMarginGradientEnd => (_usingSystemColors) ? SystemColors.Control : FromKnownColor(KnownColors.msocbvcrCBGradVertEnd);
181
public virtual
Color
ImageMarginRevealedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin);
184
public virtual
Color
ImageMarginRevealedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle);
187
public virtual
Color
ImageMarginRevealedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd);
190
public virtual
Color
MenuStripGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin);
193
public virtual
Color
MenuStripGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd);
196
public virtual
Color
MenuItemSelected => FromKnownColor(KnownColors.msocbvcrCBCtlBkgdMouseOver);
199
public virtual
Color
MenuItemBorder => FromKnownColor(KnownColors.msocbvcrCBCtlBdrSelected);
202
public virtual
Color
MenuBorder => FromKnownColor(KnownColors.msocbvcrCBMenuBdrOuter);
205
public virtual
Color
MenuItemSelectedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverBegin);
208
public virtual
Color
MenuItemSelectedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverEnd);
211
public virtual
Color
MenuItemPressedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMenuTitleBkgdBegin);
214
public virtual
Color
MenuItemPressedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle);
217
public virtual
Color
MenuItemPressedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMenuTitleBkgdEnd);
220
public virtual
Color
RaftingContainerGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin);
223
public virtual
Color
RaftingContainerGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd);
226
public virtual
Color
SeparatorDark => FromKnownColor(KnownColors.msocbvcrCBSplitterLine);
229
public virtual
Color
SeparatorLight => FromKnownColor(KnownColors.msocbvcrCBSplitterLineLight);
233
public virtual
Color
StatusStripBorder => SystemColors.ButtonHighlight;
236
public virtual
Color
StatusStripGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin);
239
public virtual
Color
StatusStripGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd);
242
public virtual
Color
ToolStripBorder => FromKnownColor(KnownColors.msocbvcrCBShadow);
245
public virtual
Color
ToolStripDropDownBackground => FromKnownColor(KnownColors.msocbvcrCBMenuBkgd);
248
public virtual
Color
ToolStripGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradVertBegin);
251
public virtual
Color
ToolStripGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradVertMiddle);
254
public virtual
Color
ToolStripGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradVertEnd);
257
public virtual
Color
ToolStripContentPanelGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin);
260
public virtual
Color
ToolStripContentPanelGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd);
263
public virtual
Color
ToolStripPanelGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin);
266
public virtual
Color
ToolStripPanelGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd);
269
public virtual
Color
OverflowButtonGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradOptionsBegin);
272
public virtual
Color
OverflowButtonGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradOptionsMiddle);
275
public virtual
Color
OverflowButtonGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradOptionsEnd);
277
internal
Color
ComboBoxButtonGradientBegin => MenuItemPressedGradientBegin;
278
internal
Color
ComboBoxButtonGradientEnd => MenuItemPressedGradientEnd;
279
internal
Color
ComboBoxButtonSelectedGradientBegin => MenuItemSelectedGradientBegin;
280
internal
Color
ComboBoxButtonSelectedGradientEnd => MenuItemSelectedGradientEnd;
281
internal
Color
ComboBoxButtonPressedGradientBegin => ButtonPressedGradientBegin;
282
internal
Color
ComboBoxButtonPressedGradientEnd => ButtonPressedGradientEnd;
283
internal
Color
ComboBoxButtonOnOverflow => ToolStripDropDownBackground;
284
internal
Color
ComboBoxBorder => ButtonSelectedHighlightBorder;
285
internal
Color
TextBoxBorder => ButtonSelectedHighlightBorder;
287
private static
Color
GetAlphaBlendedColor(Graphics g,
Color
src,
Color
dest, int alpha)
295
return
Color
.FromArgb(newAlpha, red, green, blue);
299
return g.FindNearestColor(
Color
.FromArgb(newAlpha, red, green, blue));
305
private static
Color
GetAlphaBlendedColorHighRes(Graphics? graphics,
Color
src,
Color
dest, int alpha)
330
return
Color
.FromArgb(r, g, b);
333
return graphics.FindNearestColor(
Color
.FromArgb(r, g, b));
336
private static void InitCommonColors(ref Dictionary<KnownColors,
Color
> rgbTable)
364
private void InitSystemColors(ref Dictionary<KnownColors,
Color
> rgbTable)
371
Color
buttonFace = SystemColors.ButtonFace;
372
Color
buttonShadow = SystemColors.ButtonShadow;
373
Color
highlight = SystemColors.Highlight;
374
Color
window = SystemColors.Window;
375
Color
empty =
Color
.Empty;
376
Color
controlText = SystemColors.ControlText;
377
Color
buttonHighlight = SystemColors.ButtonHighlight;
378
Color
grayText = SystemColors.GrayText;
379
Color
highlightText = SystemColors.HighlightText;
380
Color
windowText = SystemColors.WindowText;
383
Color
gradientBegin = buttonFace;
384
Color
gradientMiddle = buttonFace;
385
Color
gradientEnd = buttonFace;
386
Color
msocbvcrCBCtlBkgdMouseOver = highlight;
387
Color
msocbvcrCBCtlBkgdMouseDown = highlight;
668
private static void InitOliveLunaColors(ref Dictionary<KnownColors,
Color
> rgbTable)
670
rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] =
Color
.FromArgb(81, 94, 51);
671
rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] =
Color
.FromArgb(81, 94, 51);
672
rgbTable[KnownColors.msocbvcrCBBdrOuterFloating] =
Color
.FromArgb(116, 134, 94);
673
rgbTable[KnownColors.msocbvcrCBBkgd] =
Color
.FromArgb(209, 222, 173);
674
rgbTable[KnownColors.msocbvcrCBCtlBdrMouseDown] =
Color
.FromArgb(63, 93, 56);
675
rgbTable[KnownColors.msocbvcrCBCtlBdrMouseOver] =
Color
.FromArgb(63, 93, 56);
676
rgbTable[KnownColors.msocbvcrCBCtlBdrSelected] =
Color
.FromArgb(63, 93, 56);
677
rgbTable[KnownColors.msocbvcrCBCtlBdrSelectedMouseOver] =
Color
.FromArgb(63, 93, 56);
678
rgbTable[KnownColors.msocbvcrCBCtlBkgd] =
Color
.FromArgb(209, 222, 173);
679
rgbTable[KnownColors.msocbvcrCBCtlBkgdLight] =
Color
.FromArgb(255, 255, 255);
680
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
681
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
682
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
683
rgbTable[KnownColors.msocbvcrCBCtlBkgdSelected] =
Color
.FromArgb(255, 192, 111);
684
rgbTable[KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver] =
Color
.FromArgb(254, 128, 62);
685
rgbTable[KnownColors.msocbvcrCBCtlText] =
Color
.FromArgb(0, 0, 0);
686
rgbTable[KnownColors.msocbvcrCBCtlTextDisabled] =
Color
.FromArgb(141, 141, 141);
687
rgbTable[KnownColors.msocbvcrCBCtlTextLight] =
Color
.FromArgb(128, 128, 128);
688
rgbTable[KnownColors.msocbvcrCBCtlTextMouseDown] =
Color
.FromArgb(0, 0, 0);
689
rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] =
Color
.FromArgb(0, 0, 0);
690
rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] =
Color
.FromArgb(0, 0, 0);
691
rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] =
Color
.FromArgb(0, 0, 0);
692
rgbTable[KnownColors.msocbvcrCBDockSeparatorLine] =
Color
.FromArgb(96, 119, 66);
693
rgbTable[KnownColors.msocbvcrCBDragHandle] =
Color
.FromArgb(81, 94, 51);
694
rgbTable[KnownColors.msocbvcrCBDragHandleShadow] =
Color
.FromArgb(255, 255, 255);
695
rgbTable[KnownColors.msocbvcrCBDropDownArrow] =
Color
.FromArgb(236, 233, 216);
696
rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzBegin] =
Color
.FromArgb(217, 217, 167);
697
rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzEnd] =
Color
.FromArgb(242, 241, 228);
698
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin] =
Color
.FromArgb(230, 230, 209);
699
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd] =
Color
.FromArgb(160, 177, 116);
700
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle] =
Color
.FromArgb(186, 201, 143);
701
rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdBegin] =
Color
.FromArgb(237, 240, 214);
702
rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdEnd] =
Color
.FromArgb(181, 196, 143);
703
rgbTable[KnownColors.msocbvcrCBGradMouseDownBegin] =
Color
.FromArgb(254, 128, 62);
704
rgbTable[KnownColors.msocbvcrCBGradMouseDownEnd] =
Color
.FromArgb(255, 223, 154);
705
rgbTable[KnownColors.msocbvcrCBGradMouseDownMiddle] =
Color
.FromArgb(255, 177, 109);
706
rgbTable[KnownColors.msocbvcrCBGradMouseOverBegin] =
Color
.FromArgb(255, 255, 222);
707
rgbTable[KnownColors.msocbvcrCBGradMouseOverEnd] =
Color
.FromArgb(255, 203, 136);
708
rgbTable[KnownColors.msocbvcrCBGradMouseOverMiddle] =
Color
.FromArgb(255, 225, 172);
709
rgbTable[KnownColors.msocbvcrCBGradOptionsBegin] =
Color
.FromArgb(186, 204, 150);
710
rgbTable[KnownColors.msocbvcrCBGradOptionsEnd] =
Color
.FromArgb(96, 119, 107);
711
rgbTable[KnownColors.msocbvcrCBGradOptionsMiddle] =
Color
.FromArgb(141, 160, 107);
712
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverBegin] =
Color
.FromArgb(255, 255, 222);
713
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverEnd] =
Color
.FromArgb(255, 193, 118);
714
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverMiddle] =
Color
.FromArgb(255, 225, 172);
715
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedBegin] =
Color
.FromArgb(254, 140, 73);
716
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedEnd] =
Color
.FromArgb(255, 221, 152);
717
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedMiddle] =
Color
.FromArgb(255, 184, 116);
718
rgbTable[KnownColors.msocbvcrCBGradSelectedBegin] =
Color
.FromArgb(255, 223, 154);
719
rgbTable[KnownColors.msocbvcrCBGradSelectedEnd] =
Color
.FromArgb(255, 166, 76);
720
rgbTable[KnownColors.msocbvcrCBGradSelectedMiddle] =
Color
.FromArgb(255, 195, 116);
721
rgbTable[KnownColors.msocbvcrCBGradVertBegin] =
Color
.FromArgb(255, 255, 237);
722
rgbTable[KnownColors.msocbvcrCBGradVertEnd] =
Color
.FromArgb(181, 196, 143);
723
rgbTable[KnownColors.msocbvcrCBGradVertMiddle] =
Color
.FromArgb(206, 220, 167);
724
rgbTable[KnownColors.msocbvcrCBIconDisabledDark] =
Color
.FromArgb(131, 144, 113);
725
rgbTable[KnownColors.msocbvcrCBIconDisabledLight] =
Color
.FromArgb(243, 244, 240);
726
rgbTable[KnownColors.msocbvcrCBLabelBkgnd] =
Color
.FromArgb(218, 227, 187);
727
rgbTable[KnownColors.msocbvcrCBLabelBkgnd] =
Color
.FromArgb(218, 227, 187);
728
rgbTable[KnownColors.msocbvcrCBLowColorIconDisabled] =
Color
.FromArgb(159, 174, 122);
729
rgbTable[KnownColors.msocbvcrCBMainMenuBkgd] =
Color
.FromArgb(236, 233, 216);
730
rgbTable[KnownColors.msocbvcrCBMenuBdrOuter] =
Color
.FromArgb(117, 141, 94);
731
rgbTable[KnownColors.msocbvcrCBMenuBkgd] =
Color
.FromArgb(244, 244, 238);
732
rgbTable[KnownColors.msocbvcrCBMenuCtlText] =
Color
.FromArgb(0, 0, 0);
733
rgbTable[KnownColors.msocbvcrCBMenuCtlTextDisabled] =
Color
.FromArgb(141, 141, 141);
734
rgbTable[KnownColors.msocbvcrCBMenuIconBkgd] =
Color
.FromArgb(216, 227, 182);
735
rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] =
Color
.FromArgb(173, 181, 157);
736
rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] =
Color
.FromArgb(173, 181, 157);
737
rgbTable[KnownColors.msocbvcrCBMenuShadow] =
Color
.FromArgb(134, 148, 108);
738
rgbTable[KnownColors.msocbvcrCBMenuSplitArrow] =
Color
.FromArgb(0, 0, 0);
739
rgbTable[KnownColors.msocbvcrCBOptionsButtonShadow] =
Color
.FromArgb(255, 255, 255);
740
rgbTable[KnownColors.msocbvcrCBShadow] =
Color
.FromArgb(96, 128, 88);
741
rgbTable[KnownColors.msocbvcrCBSplitterLine] =
Color
.FromArgb(96, 128, 88);
742
rgbTable[KnownColors.msocbvcrCBSplitterLineLight] =
Color
.FromArgb(244, 247, 222);
743
rgbTable[KnownColors.msocbvcrCBTearOffHandle] =
Color
.FromArgb(197, 212, 159);
744
rgbTable[KnownColors.msocbvcrCBTearOffHandleMouseOver] =
Color
.FromArgb(255, 238, 194);
745
rgbTable[KnownColors.msocbvcrCBTitleBkgd] =
Color
.FromArgb(116, 134, 94);
746
rgbTable[KnownColors.msocbvcrCBTitleText] =
Color
.FromArgb(255, 255, 255);
747
rgbTable[KnownColors.msocbvcrDisabledFocuslessHighlightedText] =
Color
.FromArgb(172, 168, 153);
748
rgbTable[KnownColors.msocbvcrDisabledHighlightedText] =
Color
.FromArgb(220, 224, 208);
749
rgbTable[KnownColors.msocbvcrDlgGroupBoxText] =
Color
.FromArgb(153, 84, 10);
750
rgbTable[KnownColors.msocbvcrDocTabBdr] =
Color
.FromArgb(96, 119, 107);
751
rgbTable[KnownColors.msocbvcrDocTabBdrDark] =
Color
.FromArgb(176, 194, 140);
752
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseDown] =
Color
.FromArgb(63, 93, 56);
753
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(63, 93, 56);
754
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(63, 93, 56);
755
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(63, 93, 56);
756
rgbTable[KnownColors.msocbvcrDocTabBdrLight] =
Color
.FromArgb(255, 255, 255);
757
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseDown] =
Color
.FromArgb(63, 93, 56);
758
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(63, 93, 56);
759
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(63, 93, 56);
760
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(63, 93, 56);
761
rgbTable[KnownColors.msocbvcrDocTabBdrMouseDown] =
Color
.FromArgb(63, 93, 56);
762
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(63, 93, 56);
763
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(63, 93, 56);
764
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(63, 93, 56);
765
rgbTable[KnownColors.msocbvcrDocTabBdrSelected] =
Color
.FromArgb(96, 128, 88);
766
rgbTable[KnownColors.msocbvcrDocTabBkgd] =
Color
.FromArgb(218, 227, 187);
767
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
768
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
769
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
770
rgbTable[KnownColors.msocbvcrDocTabBkgdSelected] =
Color
.FromArgb(255, 255, 255);
771
rgbTable[KnownColors.msocbvcrDocTabText] =
Color
.FromArgb(0, 0, 0);
772
rgbTable[KnownColors.msocbvcrDocTabTextMouseDown] =
Color
.FromArgb(0, 0, 0);
773
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
774
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
775
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
776
rgbTable[KnownColors.msocbvcrDocTabTextSelected] =
Color
.FromArgb(0, 0, 0);
777
rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] =
Color
.FromArgb(218, 227, 187);
778
rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] =
Color
.FromArgb(218, 227, 187);
779
rgbTable[KnownColors.msocbvcrDWActiveTabText] =
Color
.FromArgb(0, 0, 0);
780
rgbTable[KnownColors.msocbvcrDWActiveTabText] =
Color
.FromArgb(0, 0, 0);
781
rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] =
Color
.FromArgb(128, 128, 128);
782
rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] =
Color
.FromArgb(128, 128, 128);
783
rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] =
Color
.FromArgb(183, 198, 145);
784
rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] =
Color
.FromArgb(183, 198, 145);
785
rgbTable[KnownColors.msocbvcrDWInactiveTabText] =
Color
.FromArgb(255, 255, 255);
786
rgbTable[KnownColors.msocbvcrDWInactiveTabText] =
Color
.FromArgb(255, 255, 255);
787
rgbTable[KnownColors.msocbvcrDWTabBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
788
rgbTable[KnownColors.msocbvcrDWTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
789
rgbTable[KnownColors.msocbvcrDWTabTextMouseDown] =
Color
.FromArgb(0, 0, 0);
790
rgbTable[KnownColors.msocbvcrDWTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
791
rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] =
Color
.FromArgb(236, 233, 216);
792
rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] =
Color
.FromArgb(236, 233, 216);
793
rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] =
Color
.FromArgb(0, 0, 0);
794
rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] =
Color
.FromArgb(0, 0, 0);
795
rgbTable[KnownColors.msocbvcrGDHeaderBdr] =
Color
.FromArgb(191, 191, 223);
796
rgbTable[KnownColors.msocbvcrGDHeaderBkgd] =
Color
.FromArgb(239, 235, 222);
797
rgbTable[KnownColors.msocbvcrGDHeaderCellBdr] =
Color
.FromArgb(126, 125, 104);
798
rgbTable[KnownColors.msocbvcrGDHeaderCellBkgd] =
Color
.FromArgb(239, 235, 222);
799
rgbTable[KnownColors.msocbvcrGDHeaderCellBkgdSelected] =
Color
.FromArgb(255, 192, 111);
800
rgbTable[KnownColors.msocbvcrGDHeaderSeeThroughSelection] =
Color
.FromArgb(128, 128, 128);
801
rgbTable[KnownColors.msocbvcrGSPDarkBkgd] =
Color
.FromArgb(159, 171, 128);
802
rgbTable[KnownColors.msocbvcrGSPDarkBkgd] =
Color
.FromArgb(159, 171, 128);
803
rgbTable[KnownColors.msocbvcrGSPGroupContentDarkBkgd] =
Color
.FromArgb(217, 227, 187);
804
rgbTable[KnownColors.msocbvcrGSPGroupContentLightBkgd] =
Color
.FromArgb(230, 234, 208);
805
rgbTable[KnownColors.msocbvcrGSPGroupContentText] =
Color
.FromArgb(0, 0, 0);
806
rgbTable[KnownColors.msocbvcrGSPGroupContentTextDisabled] =
Color
.FromArgb(150, 145, 133);
807
rgbTable[KnownColors.msocbvcrGSPGroupHeaderDarkBkgd] =
Color
.FromArgb(161, 176, 128);
808
rgbTable[KnownColors.msocbvcrGSPGroupHeaderLightBkgd] =
Color
.FromArgb(210, 223, 174);
809
rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] =
Color
.FromArgb(90, 107, 70);
810
rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] =
Color
.FromArgb(90, 107, 70);
811
rgbTable[KnownColors.msocbvcrGSPGroupline] =
Color
.FromArgb(255, 255, 255);
812
rgbTable[KnownColors.msocbvcrGSPGroupline] =
Color
.FromArgb(255, 255, 255);
813
rgbTable[KnownColors.msocbvcrGSPHyperlink] =
Color
.FromArgb(0, 61, 178);
814
rgbTable[KnownColors.msocbvcrGSPLightBkgd] =
Color
.FromArgb(243, 242, 231);
815
rgbTable[KnownColors.msocbvcrHyperlink] =
Color
.FromArgb(0, 61, 178);
816
rgbTable[KnownColors.msocbvcrHyperlinkFollowed] =
Color
.FromArgb(170, 0, 170);
817
rgbTable[KnownColors.msocbvcrJotNavUIBdr] =
Color
.FromArgb(96, 128, 88);
818
rgbTable[KnownColors.msocbvcrJotNavUIBdr] =
Color
.FromArgb(96, 128, 88);
819
rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] =
Color
.FromArgb(217, 217, 167);
820
rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] =
Color
.FromArgb(217, 217, 167);
821
rgbTable[KnownColors.msocbvcrJotNavUIGradEnd] =
Color
.FromArgb(255, 255, 255);
822
rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] =
Color
.FromArgb(242, 241, 228);
823
rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] =
Color
.FromArgb(242, 241, 228);
824
rgbTable[KnownColors.msocbvcrJotNavUIText] =
Color
.FromArgb(0, 0, 0);
825
rgbTable[KnownColors.msocbvcrListHeaderArrow] =
Color
.FromArgb(172, 168, 153);
826
rgbTable[KnownColors.msocbvcrNetLookBkgnd] =
Color
.FromArgb(255, 255, 237);
827
rgbTable[KnownColors.msocbvcrOABBkgd] =
Color
.FromArgb(255, 255, 255);
828
rgbTable[KnownColors.msocbvcrOBBkgdBdr] =
Color
.FromArgb(211, 211, 211);
829
rgbTable[KnownColors.msocbvcrOBBkgdBdrContrast] =
Color
.FromArgb(128, 128, 128);
830
rgbTable[KnownColors.msocbvcrOGMDIParentWorkspaceBkgd] =
Color
.FromArgb(151, 160, 123);
831
rgbTable[KnownColors.msocbvcrOGRulerActiveBkgd] =
Color
.FromArgb(255, 255, 255);
832
rgbTable[KnownColors.msocbvcrOGRulerBdr] =
Color
.FromArgb(0, 0, 0);
833
rgbTable[KnownColors.msocbvcrOGRulerBkgd] =
Color
.FromArgb(226, 231, 191);
834
rgbTable[KnownColors.msocbvcrOGRulerInactiveBkgd] =
Color
.FromArgb(171, 192, 138);
835
rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdr] =
Color
.FromArgb(117, 141, 94);
836
rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdrHighlight] =
Color
.FromArgb(255, 255, 255);
837
rgbTable[KnownColors.msocbvcrOGRulerTabStopTicks] =
Color
.FromArgb(128, 128, 128);
838
rgbTable[KnownColors.msocbvcrOGRulerText] =
Color
.FromArgb(0, 0, 0);
839
rgbTable[KnownColors.msocbvcrOGTaskPaneGroupBoxHeaderBkgd] =
Color
.FromArgb(218, 227, 187);
840
rgbTable[KnownColors.msocbvcrOGWorkspaceBkgd] =
Color
.FromArgb(151, 160, 123);
841
rgbTable[KnownColors.msocbvcrOLKFlagNone] =
Color
.FromArgb(242, 240, 228);
842
rgbTable[KnownColors.msocbvcrOLKFolderbarDark] =
Color
.FromArgb(96, 119, 66);
843
rgbTable[KnownColors.msocbvcrOLKFolderbarLight] =
Color
.FromArgb(175, 192, 130);
844
rgbTable[KnownColors.msocbvcrOLKFolderbarText] =
Color
.FromArgb(255, 255, 255);
845
rgbTable[KnownColors.msocbvcrOLKGridlines] =
Color
.FromArgb(234, 233, 225);
846
rgbTable[KnownColors.msocbvcrOLKGroupLine] =
Color
.FromArgb(181, 196, 143);
847
rgbTable[KnownColors.msocbvcrOLKGroupNested] =
Color
.FromArgb(253, 238, 201);
848
rgbTable[KnownColors.msocbvcrOLKGroupShaded] =
Color
.FromArgb(175, 186, 145);
849
rgbTable[KnownColors.msocbvcrOLKGroupText] =
Color
.FromArgb(115, 137, 84);
850
rgbTable[KnownColors.msocbvcrOLKIconBar] =
Color
.FromArgb(253, 247, 233);
851
rgbTable[KnownColors.msocbvcrOLKInfoBarBkgd] =
Color
.FromArgb(151, 160, 123);
852
rgbTable[KnownColors.msocbvcrOLKInfoBarText] =
Color
.FromArgb(255, 255, 255);
853
rgbTable[KnownColors.msocbvcrOLKPreviewPaneLabelText] =
Color
.FromArgb(151, 160, 123);
854
rgbTable[KnownColors.msocbvcrOLKTodayIndicatorDark] =
Color
.FromArgb(187, 85, 3);
855
rgbTable[KnownColors.msocbvcrOLKTodayIndicatorLight] =
Color
.FromArgb(251, 200, 79);
856
rgbTable[KnownColors.msocbvcrOLKWBActionDividerLine] =
Color
.FromArgb(200, 212, 172);
857
rgbTable[KnownColors.msocbvcrOLKWBButtonDark] =
Color
.FromArgb(176, 191, 138);
858
rgbTable[KnownColors.msocbvcrOLKWBButtonLight] =
Color
.FromArgb(234, 240, 207);
859
rgbTable[KnownColors.msocbvcrOLKWBButtonLight] =
Color
.FromArgb(234, 240, 207);
860
rgbTable[KnownColors.msocbvcrOLKWBDarkOutline] =
Color
.FromArgb(96, 128, 88);
861
rgbTable[KnownColors.msocbvcrOLKWBFoldersBackground] =
Color
.FromArgb(255, 255, 255);
862
rgbTable[KnownColors.msocbvcrOLKWBHoverButtonDark] =
Color
.FromArgb(247, 190, 87);
863
rgbTable[KnownColors.msocbvcrOLKWBHoverButtonLight] =
Color
.FromArgb(255, 255, 220);
864
rgbTable[KnownColors.msocbvcrOLKWBLabelText] =
Color
.FromArgb(50, 69, 105);
865
rgbTable[KnownColors.msocbvcrOLKWBPressedButtonDark] =
Color
.FromArgb(248, 222, 128);
866
rgbTable[KnownColors.msocbvcrOLKWBPressedButtonLight] =
Color
.FromArgb(232, 127, 8);
867
rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonDark] =
Color
.FromArgb(238, 147, 17);
868
rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonLight] =
Color
.FromArgb(251, 230, 148);
869
rgbTable[KnownColors.msocbvcrOLKWBSplitterDark] =
Color
.FromArgb(64, 81, 59);
870
rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] =
Color
.FromArgb(120, 142, 111);
871
rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] =
Color
.FromArgb(120, 142, 111);
872
rgbTable[KnownColors.msocbvcrPlacesBarBkgd] =
Color
.FromArgb(236, 233, 216);
873
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd] =
Color
.FromArgb(242, 240, 228);
874
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabBdr] =
Color
.FromArgb(96, 128, 88);
875
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd] =
Color
.FromArgb(206, 220, 167);
876
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabText] =
Color
.FromArgb(0, 0, 0);
877
rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelected] =
Color
.FromArgb(107, 129, 107);
878
rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelectedMouseOver] =
Color
.FromArgb(107, 129, 107);
879
rgbTable[KnownColors.msocbvcrPPSlideBdrInactiveSelected] =
Color
.FromArgb(128, 128, 128);
880
rgbTable[KnownColors.msocbvcrPPSlideBdrMouseOver] =
Color
.FromArgb(107, 129, 107);
881
rgbTable[KnownColors.msocbvcrPubPrintDocScratchPageBkgd] =
Color
.FromArgb(151, 160, 123);
882
rgbTable[KnownColors.msocbvcrPubWebDocScratchPageBkgd] =
Color
.FromArgb(193, 198, 176);
883
rgbTable[KnownColors.msocbvcrSBBdr] =
Color
.FromArgb(211, 211, 211);
884
rgbTable[KnownColors.msocbvcrScrollbarBkgd] =
Color
.FromArgb(249, 249, 247);
885
rgbTable[KnownColors.msocbvcrToastGradBegin] =
Color
.FromArgb(237, 242, 212);
886
rgbTable[KnownColors.msocbvcrToastGradEnd] =
Color
.FromArgb(191, 206, 153);
887
rgbTable[KnownColors.msocbvcrWPBdrInnerDocked] =
Color
.FromArgb(255, 255, 255);
888
rgbTable[KnownColors.msocbvcrWPBdrOuterDocked] =
Color
.FromArgb(242, 241, 228);
889
rgbTable[KnownColors.msocbvcrWPBdrOuterFloating] =
Color
.FromArgb(116, 134, 94);
890
rgbTable[KnownColors.msocbvcrWPBkgd] =
Color
.FromArgb(243, 242, 231);
891
rgbTable[KnownColors.msocbvcrWPCtlBdr] =
Color
.FromArgb(164, 185, 127);
892
rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] =
Color
.FromArgb(0, 0, 0);
893
rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] =
Color
.FromArgb(0, 0, 0);
894
rgbTable[KnownColors.msocbvcrWPCtlBdrDisabled] =
Color
.FromArgb(128, 128, 128);
895
rgbTable[KnownColors.msocbvcrWPCtlBkgd] =
Color
.FromArgb(197, 212, 159);
896
rgbTable[KnownColors.msocbvcrWPCtlBkgdDisabled] =
Color
.FromArgb(222, 222, 222);
897
rgbTable[KnownColors.msocbvcrWPCtlText] =
Color
.FromArgb(0, 0, 0);
898
rgbTable[KnownColors.msocbvcrWPCtlTextDisabled] =
Color
.FromArgb(172, 168, 153);
899
rgbTable[KnownColors.msocbvcrWPCtlTextMouseDown] =
Color
.FromArgb(0, 0, 0);
900
rgbTable[KnownColors.msocbvcrWPGroupline] =
Color
.FromArgb(188, 187, 177);
901
rgbTable[KnownColors.msocbvcrWPInfoTipBkgd] =
Color
.FromArgb(255, 255, 204);
902
rgbTable[KnownColors.msocbvcrWPInfoTipText] =
Color
.FromArgb(0, 0, 0);
903
rgbTable[KnownColors.msocbvcrWPNavBarBkgnd] =
Color
.FromArgb(116, 134, 94);
904
rgbTable[KnownColors.msocbvcrWPText] =
Color
.FromArgb(0, 0, 0);
905
rgbTable[KnownColors.msocbvcrWPText] =
Color
.FromArgb(0, 0, 0);
906
rgbTable[KnownColors.msocbvcrWPTextDisabled] =
Color
.FromArgb(172, 168, 153);
907
rgbTable[KnownColors.msocbvcrWPTitleBkgdActive] =
Color
.FromArgb(216, 227, 182);
908
rgbTable[KnownColors.msocbvcrWPTitleBkgdInactive] =
Color
.FromArgb(188, 205, 131);
909
rgbTable[KnownColors.msocbvcrWPTitleTextActive] =
Color
.FromArgb(0, 0, 0);
910
rgbTable[KnownColors.msocbvcrWPTitleTextInactive] =
Color
.FromArgb(0, 0, 0);
911
rgbTable[KnownColors.msocbvcrXLFormulaBarBkgd] =
Color
.FromArgb(217, 217, 167);
914
private static void InitSilverLunaColors(ref Dictionary<KnownColors,
Color
> rgbTable)
916
rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] =
Color
.FromArgb(173, 174, 193);
917
rgbTable[KnownColors.msocbvcrCBBdrOuterFloating] =
Color
.FromArgb(122, 121, 153);
918
rgbTable[KnownColors.msocbvcrCBBkgd] =
Color
.FromArgb(219, 218, 228);
919
rgbTable[KnownColors.msocbvcrCBCtlBdrMouseDown] =
Color
.FromArgb(75, 75, 111);
920
rgbTable[KnownColors.msocbvcrCBCtlBdrMouseOver] =
Color
.FromArgb(75, 75, 111);
921
rgbTable[KnownColors.msocbvcrCBCtlBdrSelected] =
Color
.FromArgb(75, 75, 111);
922
rgbTable[KnownColors.msocbvcrCBCtlBdrSelectedMouseOver] =
Color
.FromArgb(75, 75, 111);
923
rgbTable[KnownColors.msocbvcrCBCtlBkgd] =
Color
.FromArgb(219, 218, 228);
924
rgbTable[KnownColors.msocbvcrCBCtlBkgdLight] =
Color
.FromArgb(255, 255, 255);
925
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
926
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
927
rgbTable[KnownColors.msocbvcrCBCtlBkgdSelected] =
Color
.FromArgb(255, 192, 111);
928
rgbTable[KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver] =
Color
.FromArgb(254, 128, 62);
929
rgbTable[KnownColors.msocbvcrCBCtlText] =
Color
.FromArgb(0, 0, 0);
930
rgbTable[KnownColors.msocbvcrCBCtlTextDisabled] =
Color
.FromArgb(141, 141, 141);
931
rgbTable[KnownColors.msocbvcrCBCtlTextLight] =
Color
.FromArgb(128, 128, 128);
932
rgbTable[KnownColors.msocbvcrCBCtlTextMouseDown] =
Color
.FromArgb(0, 0, 0);
933
rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] =
Color
.FromArgb(0, 0, 0);
934
rgbTable[KnownColors.msocbvcrCBDockSeparatorLine] =
Color
.FromArgb(110, 109, 143);
935
rgbTable[KnownColors.msocbvcrCBDragHandle] =
Color
.FromArgb(84, 84, 117);
936
rgbTable[KnownColors.msocbvcrCBDragHandleShadow] =
Color
.FromArgb(255, 255, 255);
937
rgbTable[KnownColors.msocbvcrCBDropDownArrow] =
Color
.FromArgb(224, 223, 227);
938
rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzBegin] =
Color
.FromArgb(215, 215, 229);
939
rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzEnd] =
Color
.FromArgb(243, 243, 247);
940
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin] =
Color
.FromArgb(215, 215, 226);
941
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd] =
Color
.FromArgb(118, 116, 151);
942
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle] =
Color
.FromArgb(184, 185, 202);
943
rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdBegin] =
Color
.FromArgb(232, 233, 242);
944
rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdEnd] =
Color
.FromArgb(172, 170, 194);
945
rgbTable[KnownColors.msocbvcrCBGradMouseDownBegin] =
Color
.FromArgb(254, 128, 62);
946
rgbTable[KnownColors.msocbvcrCBGradMouseDownEnd] =
Color
.FromArgb(255, 223, 154);
947
rgbTable[KnownColors.msocbvcrCBGradMouseDownMiddle] =
Color
.FromArgb(255, 177, 109);
948
rgbTable[KnownColors.msocbvcrCBGradMouseOverBegin] =
Color
.FromArgb(255, 255, 222);
949
rgbTable[KnownColors.msocbvcrCBGradMouseOverEnd] =
Color
.FromArgb(255, 203, 136);
950
rgbTable[KnownColors.msocbvcrCBGradMouseOverMiddle] =
Color
.FromArgb(255, 225, 172);
951
rgbTable[KnownColors.msocbvcrCBGradOptionsBegin] =
Color
.FromArgb(186, 185, 206);
952
rgbTable[KnownColors.msocbvcrCBGradOptionsEnd] =
Color
.FromArgb(118, 116, 146);
953
rgbTable[KnownColors.msocbvcrCBGradOptionsMiddle] =
Color
.FromArgb(156, 155, 180);
954
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverBegin] =
Color
.FromArgb(255, 255, 222);
955
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverEnd] =
Color
.FromArgb(255, 193, 118);
956
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverMiddle] =
Color
.FromArgb(255, 225, 172);
957
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedBegin] =
Color
.FromArgb(254, 140, 73);
958
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedEnd] =
Color
.FromArgb(255, 221, 152);
959
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedMiddle] =
Color
.FromArgb(255, 184, 116);
960
rgbTable[KnownColors.msocbvcrCBGradSelectedBegin] =
Color
.FromArgb(255, 223, 154);
961
rgbTable[KnownColors.msocbvcrCBGradSelectedEnd] =
Color
.FromArgb(255, 166, 76);
962
rgbTable[KnownColors.msocbvcrCBGradSelectedMiddle] =
Color
.FromArgb(255, 195, 116);
963
rgbTable[KnownColors.msocbvcrCBGradVertBegin] =
Color
.FromArgb(249, 249, 255);
964
rgbTable[KnownColors.msocbvcrCBGradVertEnd] =
Color
.FromArgb(147, 145, 176);
965
rgbTable[KnownColors.msocbvcrCBGradVertMiddle] =
Color
.FromArgb(225, 226, 236);
966
rgbTable[KnownColors.msocbvcrCBIconDisabledDark] =
Color
.FromArgb(122, 121, 153);
967
rgbTable[KnownColors.msocbvcrCBIconDisabledLight] =
Color
.FromArgb(247, 245, 249);
968
rgbTable[KnownColors.msocbvcrCBLabelBkgnd] =
Color
.FromArgb(212, 212, 226);
969
rgbTable[KnownColors.msocbvcrCBLabelBkgnd] =
Color
.FromArgb(212, 212, 226);
970
rgbTable[KnownColors.msocbvcrCBLowColorIconDisabled] =
Color
.FromArgb(168, 167, 190);
971
rgbTable[KnownColors.msocbvcrCBMainMenuBkgd] =
Color
.FromArgb(198, 200, 215);
972
rgbTable[KnownColors.msocbvcrCBMenuBdrOuter] =
Color
.FromArgb(124, 124, 148);
973
rgbTable[KnownColors.msocbvcrCBMenuBkgd] =
Color
.FromArgb(253, 250, 255);
974
rgbTable[KnownColors.msocbvcrCBMenuCtlText] =
Color
.FromArgb(0, 0, 0);
975
rgbTable[KnownColors.msocbvcrCBMenuCtlTextDisabled] =
Color
.FromArgb(141, 141, 141);
976
rgbTable[KnownColors.msocbvcrCBMenuIconBkgd] =
Color
.FromArgb(214, 211, 231);
977
rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] =
Color
.FromArgb(185, 187, 200);
978
rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] =
Color
.FromArgb(185, 187, 200);
979
rgbTable[KnownColors.msocbvcrCBMenuShadow] =
Color
.FromArgb(154, 140, 176);
980
rgbTable[KnownColors.msocbvcrCBMenuSplitArrow] =
Color
.FromArgb(0, 0, 0);
981
rgbTable[KnownColors.msocbvcrCBOptionsButtonShadow] =
Color
.FromArgb(255, 255, 255);
982
rgbTable[KnownColors.msocbvcrCBShadow] =
Color
.FromArgb(124, 124, 148);
983
rgbTable[KnownColors.msocbvcrCBSplitterLine] =
Color
.FromArgb(110, 109, 143);
984
rgbTable[KnownColors.msocbvcrCBSplitterLineLight] =
Color
.FromArgb(255, 255, 255);
985
rgbTable[KnownColors.msocbvcrCBTearOffHandle] =
Color
.FromArgb(192, 192, 211);
986
rgbTable[KnownColors.msocbvcrCBTearOffHandleMouseOver] =
Color
.FromArgb(255, 238, 194);
987
rgbTable[KnownColors.msocbvcrCBTitleBkgd] =
Color
.FromArgb(122, 121, 153);
988
rgbTable[KnownColors.msocbvcrCBTitleText] =
Color
.FromArgb(255, 255, 255);
989
rgbTable[KnownColors.msocbvcrDisabledFocuslessHighlightedText] =
Color
.FromArgb(172, 168, 153);
990
rgbTable[KnownColors.msocbvcrDisabledHighlightedText] =
Color
.FromArgb(59, 59, 63);
991
rgbTable[KnownColors.msocbvcrDlgGroupBoxText] =
Color
.FromArgb(7, 70, 213);
992
rgbTable[KnownColors.msocbvcrDocTabBdr] =
Color
.FromArgb(118, 116, 146);
993
rgbTable[KnownColors.msocbvcrDocTabBdrDark] =
Color
.FromArgb(186, 185, 206);
994
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseDown] =
Color
.FromArgb(75, 75, 111);
995
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(75, 75, 111);
996
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(75, 75, 111);
997
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(75, 75, 111);
998
rgbTable[KnownColors.msocbvcrDocTabBdrLight] =
Color
.FromArgb(255, 255, 255);
999
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseDown] =
Color
.FromArgb(75, 75, 111);
1000
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(75, 75, 111);
1001
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(75, 75, 111);
1002
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(75, 75, 111);
1003
rgbTable[KnownColors.msocbvcrDocTabBdrMouseDown] =
Color
.FromArgb(75, 75, 111);
1004
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(75, 75, 111);
1005
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(75, 75, 111);
1006
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(75, 75, 111);
1007
rgbTable[KnownColors.msocbvcrDocTabBdrSelected] =
Color
.FromArgb(124, 124, 148);
1008
rgbTable[KnownColors.msocbvcrDocTabBkgd] =
Color
.FromArgb(212, 212, 226);
1009
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
1010
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
1011
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
1012
rgbTable[KnownColors.msocbvcrDocTabBkgdSelected] =
Color
.FromArgb(255, 255, 255);
1013
rgbTable[KnownColors.msocbvcrDocTabText] =
Color
.FromArgb(0, 0, 0);
1014
rgbTable[KnownColors.msocbvcrDocTabTextMouseDown] =
Color
.FromArgb(0, 0, 0);
1015
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1016
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1017
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1018
rgbTable[KnownColors.msocbvcrDocTabTextSelected] =
Color
.FromArgb(0, 0, 0);
1019
rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] =
Color
.FromArgb(212, 212, 226);
1020
rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] =
Color
.FromArgb(212, 212, 226);
1021
rgbTable[KnownColors.msocbvcrDWActiveTabText] =
Color
.FromArgb(0, 0, 0);
1022
rgbTable[KnownColors.msocbvcrDWActiveTabText] =
Color
.FromArgb(0, 0, 0);
1023
rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] =
Color
.FromArgb(148, 148, 148);
1024
rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] =
Color
.FromArgb(148, 148, 148);
1025
rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] =
Color
.FromArgb(171, 169, 194);
1026
rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] =
Color
.FromArgb(171, 169, 194);
1027
rgbTable[KnownColors.msocbvcrDWInactiveTabText] =
Color
.FromArgb(255, 255, 255);
1028
rgbTable[KnownColors.msocbvcrDWInactiveTabText] =
Color
.FromArgb(255, 255, 255);
1029
rgbTable[KnownColors.msocbvcrDWTabBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
1030
rgbTable[KnownColors.msocbvcrDWTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
1031
rgbTable[KnownColors.msocbvcrDWTabTextMouseDown] =
Color
.FromArgb(0, 0, 0);
1032
rgbTable[KnownColors.msocbvcrDWTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1033
rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] =
Color
.FromArgb(224, 223, 227);
1034
rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] =
Color
.FromArgb(224, 223, 227);
1035
rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] =
Color
.FromArgb(0, 0, 0);
1036
rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] =
Color
.FromArgb(0, 0, 0);
1037
rgbTable[KnownColors.msocbvcrGDHeaderBdr] =
Color
.FromArgb(191, 191, 223);
1038
rgbTable[KnownColors.msocbvcrGDHeaderBkgd] =
Color
.FromArgb(239, 235, 222);
1039
rgbTable[KnownColors.msocbvcrGDHeaderCellBdr] =
Color
.FromArgb(126, 125, 104);
1040
rgbTable[KnownColors.msocbvcrGDHeaderCellBkgd] =
Color
.FromArgb(223, 223, 234);
1041
rgbTable[KnownColors.msocbvcrGDHeaderCellBkgdSelected] =
Color
.FromArgb(255, 192, 111);
1042
rgbTable[KnownColors.msocbvcrGDHeaderSeeThroughSelection] =
Color
.FromArgb(128, 128, 128);
1043
rgbTable[KnownColors.msocbvcrGSPDarkBkgd] =
Color
.FromArgb(162, 162, 181);
1044
rgbTable[KnownColors.msocbvcrGSPDarkBkgd] =
Color
.FromArgb(162, 162, 181);
1045
rgbTable[KnownColors.msocbvcrGSPGroupContentDarkBkgd] =
Color
.FromArgb(212, 213, 229);
1046
rgbTable[KnownColors.msocbvcrGSPGroupContentLightBkgd] =
Color
.FromArgb(227, 227, 236);
1047
rgbTable[KnownColors.msocbvcrGSPGroupContentText] =
Color
.FromArgb(0, 0, 0);
1048
rgbTable[KnownColors.msocbvcrGSPGroupContentTextDisabled] =
Color
.FromArgb(150, 145, 133);
1049
rgbTable[KnownColors.msocbvcrGSPGroupHeaderDarkBkgd] =
Color
.FromArgb(169, 168, 191);
1050
rgbTable[KnownColors.msocbvcrGSPGroupHeaderLightBkgd] =
Color
.FromArgb(208, 208, 223);
1051
rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] =
Color
.FromArgb(92, 91, 121);
1052
rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] =
Color
.FromArgb(92, 91, 121);
1053
rgbTable[KnownColors.msocbvcrGSPGroupline] =
Color
.FromArgb(255, 255, 255);
1054
rgbTable[KnownColors.msocbvcrGSPGroupline] =
Color
.FromArgb(255, 255, 255);
1055
rgbTable[KnownColors.msocbvcrGSPHyperlink] =
Color
.FromArgb(0, 61, 178);
1056
rgbTable[KnownColors.msocbvcrGSPLightBkgd] =
Color
.FromArgb(238, 238, 244);
1057
rgbTable[KnownColors.msocbvcrHyperlink] =
Color
.FromArgb(0, 61, 178);
1058
rgbTable[KnownColors.msocbvcrHyperlinkFollowed] =
Color
.FromArgb(170, 0, 170);
1059
rgbTable[KnownColors.msocbvcrJotNavUIBdr] =
Color
.FromArgb(124, 124, 148);
1060
rgbTable[KnownColors.msocbvcrJotNavUIBdr] =
Color
.FromArgb(124, 124, 148);
1061
rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] =
Color
.FromArgb(215, 215, 229);
1062
rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] =
Color
.FromArgb(215, 215, 229);
1063
rgbTable[KnownColors.msocbvcrJotNavUIGradEnd] =
Color
.FromArgb(255, 255, 255);
1064
rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] =
Color
.FromArgb(243, 243, 247);
1065
rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] =
Color
.FromArgb(243, 243, 247);
1066
rgbTable[KnownColors.msocbvcrJotNavUIText] =
Color
.FromArgb(0, 0, 0);
1067
rgbTable[KnownColors.msocbvcrListHeaderArrow] =
Color
.FromArgb(172, 168, 153);
1068
rgbTable[KnownColors.msocbvcrNetLookBkgnd] =
Color
.FromArgb(249, 249, 255);
1069
rgbTable[KnownColors.msocbvcrOABBkgd] =
Color
.FromArgb(255, 255, 255);
1070
rgbTable[KnownColors.msocbvcrOBBkgdBdr] =
Color
.FromArgb(211, 211, 211);
1071
rgbTable[KnownColors.msocbvcrOBBkgdBdrContrast] =
Color
.FromArgb(128, 128, 128);
1072
rgbTable[KnownColors.msocbvcrOGMDIParentWorkspaceBkgd] =
Color
.FromArgb(155, 154, 179);
1073
rgbTable[KnownColors.msocbvcrOGRulerActiveBkgd] =
Color
.FromArgb(255, 255, 255);
1074
rgbTable[KnownColors.msocbvcrOGRulerBdr] =
Color
.FromArgb(0, 0, 0);
1075
rgbTable[KnownColors.msocbvcrOGRulerBkgd] =
Color
.FromArgb(223, 223, 234);
1076
rgbTable[KnownColors.msocbvcrOGRulerInactiveBkgd] =
Color
.FromArgb(177, 176, 195);
1077
rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdr] =
Color
.FromArgb(124, 124, 148);
1078
rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdrHighlight] =
Color
.FromArgb(255, 255, 255);
1079
rgbTable[KnownColors.msocbvcrOGRulerTabStopTicks] =
Color
.FromArgb(128, 128, 128);
1080
rgbTable[KnownColors.msocbvcrOGRulerText] =
Color
.FromArgb(0, 0, 0);
1081
rgbTable[KnownColors.msocbvcrOGTaskPaneGroupBoxHeaderBkgd] =
Color
.FromArgb(212, 212, 226);
1082
rgbTable[KnownColors.msocbvcrOGWorkspaceBkgd] =
Color
.FromArgb(155, 154, 179);
1083
rgbTable[KnownColors.msocbvcrOLKFlagNone] =
Color
.FromArgb(239, 239, 244);
1084
rgbTable[KnownColors.msocbvcrOLKFolderbarDark] =
Color
.FromArgb(110, 109, 143);
1085
rgbTable[KnownColors.msocbvcrOLKFolderbarLight] =
Color
.FromArgb(168, 167, 191);
1086
rgbTable[KnownColors.msocbvcrOLKFolderbarText] =
Color
.FromArgb(255, 255, 255);
1087
rgbTable[KnownColors.msocbvcrOLKGridlines] =
Color
.FromArgb(234, 233, 225);
1088
rgbTable[KnownColors.msocbvcrOLKGroupLine] =
Color
.FromArgb(165, 164, 189);
1089
rgbTable[KnownColors.msocbvcrOLKGroupNested] =
Color
.FromArgb(253, 238, 201);
1090
rgbTable[KnownColors.msocbvcrOLKGroupShaded] =
Color
.FromArgb(229, 229, 235);
1091
rgbTable[KnownColors.msocbvcrOLKGroupText] =
Color
.FromArgb(112, 111, 145);
1092
rgbTable[KnownColors.msocbvcrOLKIconBar] =
Color
.FromArgb(253, 247, 233);
1093
rgbTable[KnownColors.msocbvcrOLKInfoBarBkgd] =
Color
.FromArgb(155, 154, 179);
1094
rgbTable[KnownColors.msocbvcrOLKInfoBarText] =
Color
.FromArgb(255, 255, 255);
1095
rgbTable[KnownColors.msocbvcrOLKPreviewPaneLabelText] =
Color
.FromArgb(155, 154, 179);
1096
rgbTable[KnownColors.msocbvcrOLKTodayIndicatorDark] =
Color
.FromArgb(187, 85, 3);
1097
rgbTable[KnownColors.msocbvcrOLKTodayIndicatorLight] =
Color
.FromArgb(251, 200, 79);
1098
rgbTable[KnownColors.msocbvcrOLKWBActionDividerLine] =
Color
.FromArgb(204, 206, 219);
1099
rgbTable[KnownColors.msocbvcrOLKWBButtonDark] =
Color
.FromArgb(147, 145, 176);
1100
rgbTable[KnownColors.msocbvcrOLKWBButtonLight] =
Color
.FromArgb(225, 226, 236);
1101
rgbTable[KnownColors.msocbvcrOLKWBButtonLight] =
Color
.FromArgb(225, 226, 236);
1102
rgbTable[KnownColors.msocbvcrOLKWBDarkOutline] =
Color
.FromArgb(124, 124, 148);
1103
rgbTable[KnownColors.msocbvcrOLKWBFoldersBackground] =
Color
.FromArgb(255, 255, 255);
1104
rgbTable[KnownColors.msocbvcrOLKWBHoverButtonDark] =
Color
.FromArgb(247, 190, 87);
1105
rgbTable[KnownColors.msocbvcrOLKWBHoverButtonLight] =
Color
.FromArgb(255, 255, 220);
1106
rgbTable[KnownColors.msocbvcrOLKWBLabelText] =
Color
.FromArgb(50, 69, 105);
1107
rgbTable[KnownColors.msocbvcrOLKWBPressedButtonDark] =
Color
.FromArgb(248, 222, 128);
1108
rgbTable[KnownColors.msocbvcrOLKWBPressedButtonLight] =
Color
.FromArgb(232, 127, 8);
1109
rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonDark] =
Color
.FromArgb(238, 147, 17);
1110
rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonLight] =
Color
.FromArgb(251, 230, 148);
1111
rgbTable[KnownColors.msocbvcrOLKWBSplitterDark] =
Color
.FromArgb(110, 109, 143);
1112
rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] =
Color
.FromArgb(168, 167, 191);
1113
rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] =
Color
.FromArgb(168, 167, 191);
1114
rgbTable[KnownColors.msocbvcrPlacesBarBkgd] =
Color
.FromArgb(224, 223, 227);
1115
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd] =
Color
.FromArgb(243, 243, 247);
1116
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabBdr] =
Color
.FromArgb(124, 124, 148);
1117
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd] =
Color
.FromArgb(215, 215, 229);
1118
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabText] =
Color
.FromArgb(0, 0, 0);
1119
rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelected] =
Color
.FromArgb(142, 142, 170);
1120
rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelectedMouseOver] =
Color
.FromArgb(142, 142, 170);
1121
rgbTable[KnownColors.msocbvcrPPSlideBdrInactiveSelected] =
Color
.FromArgb(128, 128, 128);
1122
rgbTable[KnownColors.msocbvcrPPSlideBdrMouseOver] =
Color
.FromArgb(142, 142, 170);
1123
rgbTable[KnownColors.msocbvcrPubPrintDocScratchPageBkgd] =
Color
.FromArgb(155, 154, 179);
1124
rgbTable[KnownColors.msocbvcrPubWebDocScratchPageBkgd] =
Color
.FromArgb(195, 195, 210);
1125
rgbTable[KnownColors.msocbvcrSBBdr] =
Color
.FromArgb(236, 234, 218);
1126
rgbTable[KnownColors.msocbvcrScrollbarBkgd] =
Color
.FromArgb(247, 247, 249);
1127
rgbTable[KnownColors.msocbvcrToastGradBegin] =
Color
.FromArgb(239, 239, 247);
1128
rgbTable[KnownColors.msocbvcrToastGradEnd] =
Color
.FromArgb(179, 178, 204);
1129
rgbTable[KnownColors.msocbvcrWPBdrInnerDocked] =
Color
.FromArgb(255, 255, 255);
1130
rgbTable[KnownColors.msocbvcrWPBdrOuterDocked] =
Color
.FromArgb(243, 243, 247);
1131
rgbTable[KnownColors.msocbvcrWPBdrOuterFloating] =
Color
.FromArgb(122, 121, 153);
1132
rgbTable[KnownColors.msocbvcrWPBkgd] =
Color
.FromArgb(238, 238, 244);
1133
rgbTable[KnownColors.msocbvcrWPCtlBdr] =
Color
.FromArgb(165, 172, 178);
1134
rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] =
Color
.FromArgb(0, 0, 0);
1135
rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] =
Color
.FromArgb(0, 0, 0);
1136
rgbTable[KnownColors.msocbvcrWPCtlBdrDisabled] =
Color
.FromArgb(128, 128, 128);
1137
rgbTable[KnownColors.msocbvcrWPCtlBkgd] =
Color
.FromArgb(192, 192, 211);
1138
rgbTable[KnownColors.msocbvcrWPCtlBkgdDisabled] =
Color
.FromArgb(222, 222, 222);
1139
rgbTable[KnownColors.msocbvcrWPCtlText] =
Color
.FromArgb(0, 0, 0);
1140
rgbTable[KnownColors.msocbvcrWPCtlTextDisabled] =
Color
.FromArgb(172, 168, 153);
1141
rgbTable[KnownColors.msocbvcrWPCtlTextMouseDown] =
Color
.FromArgb(0, 0, 0);
1142
rgbTable[KnownColors.msocbvcrWPGroupline] =
Color
.FromArgb(161, 160, 187);
1143
rgbTable[KnownColors.msocbvcrWPInfoTipBkgd] =
Color
.FromArgb(255, 255, 204);
1144
rgbTable[KnownColors.msocbvcrWPInfoTipText] =
Color
.FromArgb(0, 0, 0);
1145
rgbTable[KnownColors.msocbvcrWPNavBarBkgnd] =
Color
.FromArgb(122, 121, 153);
1146
rgbTable[KnownColors.msocbvcrWPText] =
Color
.FromArgb(0, 0, 0);
1147
rgbTable[KnownColors.msocbvcrWPText] =
Color
.FromArgb(0, 0, 0);
1148
rgbTable[KnownColors.msocbvcrWPTextDisabled] =
Color
.FromArgb(172, 168, 153);
1149
rgbTable[KnownColors.msocbvcrWPTitleBkgdActive] =
Color
.FromArgb(184, 188, 234);
1150
rgbTable[KnownColors.msocbvcrWPTitleBkgdInactive] =
Color
.FromArgb(198, 198, 217);
1151
rgbTable[KnownColors.msocbvcrWPTitleTextActive] =
Color
.FromArgb(0, 0, 0);
1152
rgbTable[KnownColors.msocbvcrWPTitleTextInactive] =
Color
.FromArgb(0, 0, 0);
1153
rgbTable[KnownColors.msocbvcrXLFormulaBarBkgd] =
Color
.FromArgb(215, 215, 229);
1156
private static void InitRoyaleColors(ref Dictionary<KnownColors,
Color
> rgbTable)
1158
rgbTable[KnownColors.msocbvcrCBBkgd] =
Color
.FromArgb(238, 237, 240); // msocbvcrCBBkgd
1159
rgbTable[KnownColors.msocbvcrCBDragHandle] =
Color
.FromArgb(189, 188, 191); // msocbvcrCBDragHandle -> Needs to equal VSCOLOR_COMMANDBAR_DRAGHANDLE in vscolors.cpp
1160
rgbTable[KnownColors.msocbvcrCBSplitterLine] =
Color
.FromArgb(193, 193, 196); // msocbvcrCBSplitterLine
1161
rgbTable[KnownColors.msocbvcrCBTitleBkgd] =
Color
.FromArgb(167, 166, 170); // msocbvcrCBTitleBkgd
1162
rgbTable[KnownColors.msocbvcrCBTitleText] =
Color
.FromArgb(255, 255, 255); // msocbvcrCBTitleText
1163
rgbTable[KnownColors.msocbvcrCBBdrOuterFloating] =
Color
.FromArgb(142, 141, 145); // msocbvcrCBBdrOuterFloating
1164
rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] =
Color
.FromArgb(235, 233, 237); // msocbvcrCBBdrOuterDocked
1165
rgbTable[KnownColors.msocbvcrCBTearOffHandle] =
Color
.FromArgb(238, 237, 240); // msocbvcrCBTearOffHandle
1166
rgbTable[KnownColors.msocbvcrCBTearOffHandleMouseOver] =
Color
.FromArgb(194, 207, 229); // msocbvcrCBTearOffHandleMouseOver
1167
rgbTable[KnownColors.msocbvcrCBCtlBkgd] =
Color
.FromArgb(238, 237, 240); // msocbvcrCBCtlBkgd
1168
rgbTable[KnownColors.msocbvcrCBCtlText] =
Color
.FromArgb(000, 000, 000); // msocbvcrCBCtlText
1169
rgbTable[KnownColors.msocbvcrCBCtlTextDisabled] =
Color
.FromArgb(176, 175, 179); // msocbvcrCBCtlTextDisabled
1170
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] =
Color
.FromArgb(194, 207, 229); // msocbvcrCBCtlBkgdMouseOver -> Needs to equal VSCOLOR_COMMANDBAR_HOVER in vscolors.cpp
1171
rgbTable[KnownColors.msocbvcrCBCtlBdrMouseOver] =
Color
.FromArgb(51, 94, 168); // msocbvcrCBCtlBdrMouseOver -> Needs to equal VSCOLOR_COMMANDBAR_BORDER in vscolors.cpp
1172
rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] =
Color
.FromArgb(000, 000, 000); // msocbvcrCBCtlTextMouseOver
1173
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseDown] =
Color
.FromArgb(153, 175, 212); // msocbvcrCBCtlBkgdMouseDown -> Needs to equal VSCOLOR_COMMANDBAR_HOVEROVERSELECTED in vscolors.cpp
1174
rgbTable[KnownColors.msocbvcrCBCtlBdrMouseDown] =
Color
.FromArgb(51, 94, 168); // msocbvcrCBCtlBdrMouseDown
1175
rgbTable[KnownColors.msocbvcrCBCtlTextMouseDown] =
Color
.FromArgb(255, 255, 255); // msocbvcrCBCtlTextMouseDown
1176
rgbTable[KnownColors.msocbvcrCBCtlBkgdSelected] =
Color
.FromArgb(226, 229, 238); // msocbvcrCBCtlBkgdSelected -> Needs to equal VSCOLOR_COMMANDBAR_SELECTED in vscolors.cpp
1177
rgbTable[KnownColors.msocbvcrCBCtlBdrSelected] =
Color
.FromArgb(51, 94, 168); // msocbvcrCBCtlBdrSelected
1178
rgbTable[KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver] =
Color
.FromArgb(51, 94, 168); // msocbvcrCBCtlBkgdSelectedMouseOver -> Needs to equal VSCOLOR_COMMANDBAR_HOVEROVERSELECTEDICON in vscolors.cpp
1179
rgbTable[KnownColors.msocbvcrCBCtlBdrSelectedMouseOver] =
Color
.FromArgb(51, 94, 168); // msocbvcrCBCtlBdrSelectedMouseOver -> Needs to equal VSCOLOR_COMMANDBAR_HOVEROVERSELECTEDICON_BORDER in vscolors.cpp
1180
rgbTable[KnownColors.msocbvcrCBCtlBkgdLight] =
Color
.FromArgb(255, 255, 255); // msocbvcrCBCtlBkgdLight
1181
rgbTable[KnownColors.msocbvcrCBCtlTextLight] =
Color
.FromArgb(167, 166, 170); // msocbvcrCBCtlTextLight
1182
rgbTable[KnownColors.msocbvcrCBMainMenuBkgd] =
Color
.FromArgb(235, 233, 237); // msocbvcrCBMainMenuBkgd
1183
rgbTable[KnownColors.msocbvcrCBMenuBkgd] =
Color
.FromArgb(252, 252, 252); // msocbvcrCBMenuBkgd
1184
rgbTable[KnownColors.msocbvcrCBMenuCtlText] =
Color
.FromArgb(0, 0, 0); // msocbvcrCBMenuCtlText
1185
rgbTable[KnownColors.msocbvcrCBMenuCtlTextDisabled] =
Color
.FromArgb(193, 193, 196); // msocbvcrCBMenuCtlTextDisabled
1186
rgbTable[KnownColors.msocbvcrCBMenuBdrOuter] =
Color
.FromArgb(134, 133, 136); // msocbvcrCBMenuBdrOuter
1187
rgbTable[KnownColors.msocbvcrCBMenuIconBkgd] =
Color
.FromArgb(238, 237, 240); // msocbvcrCBMenuIconBkgd
1188
rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] =
Color
.FromArgb(228, 226, 230); // msocbvcrCBMenuIconBkgdDropped
1189
rgbTable[KnownColors.msocbvcrCBMenuSplitArrow] =
Color
.FromArgb(167, 166, 170); // msocbvcrCBMenuSplitArrow
1190
rgbTable[KnownColors.msocbvcrWPBkgd] =
Color
.FromArgb(245, 244, 246); // msocbvcrWPBkgd
1191
rgbTable[KnownColors.msocbvcrWPText] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPText
1192
rgbTable[KnownColors.msocbvcrWPTitleBkgdActive] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPTitleBkgdActive
1193
rgbTable[KnownColors.msocbvcrWPTitleBkgdInactive] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPTitleBkgdInactive
1194
rgbTable[KnownColors.msocbvcrWPTitleTextActive] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPTitleTextActive
1195
rgbTable[KnownColors.msocbvcrWPTitleTextInactive] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPTitleTextInactive
1196
rgbTable[KnownColors.msocbvcrWPBdrOuterFloating] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPBdrOuterFloating
1197
rgbTable[KnownColors.msocbvcrWPBdrOuterDocked] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPBdrOuterDocked
1198
rgbTable[KnownColors.msocbvcrWPCtlBdr] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPCtlBdr
1199
rgbTable[KnownColors.msocbvcrWPCtlText] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPCtlText
1200
rgbTable[KnownColors.msocbvcrWPCtlBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPCtlBkgd
1201
rgbTable[KnownColors.msocbvcrWPCtlBdrDisabled] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPCtlBdrDisabled
1202
rgbTable[KnownColors.msocbvcrWPCtlTextDisabled] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPCtlTextDisabled
1203
rgbTable[KnownColors.msocbvcrWPCtlBkgdDisabled] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPCtlBkgdDisabled
1204
rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPCtlBdrDefault
1205
rgbTable[KnownColors.msocbvcrWPGroupline] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPGroupline
1206
rgbTable[KnownColors.msocbvcrSBBdr] =
Color
.FromArgb(255, 51, 153); // msocbvcrSBBdr
1207
rgbTable[KnownColors.msocbvcrOBBkgdBdr] =
Color
.FromArgb(255, 51, 153); // msocbvcrOBBkgdBdr
1208
rgbTable[KnownColors.msocbvcrOBBkgdBdrContrast] =
Color
.FromArgb(255, 51, 153); // msocbvcrOBBkgdBdrContrast
1209
rgbTable[KnownColors.msocbvcrOABBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrOABBkgd
1210
rgbTable[KnownColors.msocbvcrGDHeaderBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrGDHeaderBkgd
1211
rgbTable[KnownColors.msocbvcrGDHeaderBdr] =
Color
.FromArgb(255, 51, 153); // msocbvcrGDHeaderBdr
1212
rgbTable[KnownColors.msocbvcrGDHeaderCellBdr] =
Color
.FromArgb(255, 51, 153); // msocbvcrGDHeaderCellBdr
1213
rgbTable[KnownColors.msocbvcrGDHeaderSeeThroughSelection] =
Color
.FromArgb(255, 51, 153); // msocbvcrGDHeaderSeeThroughSelection
1214
rgbTable[KnownColors.msocbvcrGDHeaderCellBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrGDHeaderCellBkgd
1215
rgbTable[KnownColors.msocbvcrGDHeaderCellBkgdSelected] =
Color
.FromArgb(255, 51, 153); // msocbvcrGDHeaderCellBkgdSelected
1216
rgbTable[KnownColors.msocbvcrCBSplitterLineLight] =
Color
.FromArgb(255, 255, 255); // msocbvcrCBSplitterLineLight
1217
rgbTable[KnownColors.msocbvcrCBShadow] =
Color
.FromArgb(238, 237, 240); // msocbvcrCBShadow -> Needs to equal VSCOLOR_COMMANDBAR_SHADOW in vscolors.cpp
1218
rgbTable[KnownColors.msocbvcrCBOptionsButtonShadow] =
Color
.FromArgb(245, 244, 246); // msocbvcrCBOptionsButtonShadow
1219
rgbTable[KnownColors.msocbvcrWPNavBarBkgnd] =
Color
.FromArgb(193, 193, 196); // msocbvcrWPNavBarBkgnd
1220
rgbTable[KnownColors.msocbvcrWPBdrInnerDocked] =
Color
.FromArgb(245, 244, 246); // msocbvcrWPBdrInnerDocked
1221
rgbTable[KnownColors.msocbvcrCBLabelBkgnd] =
Color
.FromArgb(235, 233, 237); // msocbvcrCBLabelBkgnd
1222
rgbTable[KnownColors.msocbvcrCBIconDisabledLight] =
Color
.FromArgb(235, 233, 237); // msocbvcrCBIconDisabledLight
1223
rgbTable[KnownColors.msocbvcrCBIconDisabledDark] =
Color
.FromArgb(167, 166, 170); // msocbvcrCBIconDisabledDark
1224
rgbTable[KnownColors.msocbvcrCBLowColorIconDisabled] =
Color
.FromArgb(176, 175, 179); // msocbvcrCBLowColorIconDisabled
1225
rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzBegin] =
Color
.FromArgb(235, 233, 237); // msocbvcrCBGradMainMenuHorzBegin -> Needs to equal VSCOLOR_ENVIRONMENT_BACKGROUND and VSCOLOR_ENVIRONMENT_BACKGROUND_GRADIENTBEGIN in vscolors.cpp
1226
rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzEnd] =
Color
.FromArgb(251, 250, 251); // msocbvcrCBGradMainMenuHorzEnd -> Needs to equal VSCOLOR_ENVIRONMENT_BACKGROUND_GRADIENTEND in vscolors.cpp
1227
rgbTable[KnownColors.msocbvcrCBGradVertBegin] =
Color
.FromArgb(252, 252, 252); // msocbvcrCBGradVertBegin -> Needs to equal VSCOLOR_COMMANDBAR_GRADIENT_BEGIN in vscolors.cpp
1228
rgbTable[KnownColors.msocbvcrCBGradVertMiddle] =
Color
.FromArgb(245, 244, 246); // msocbvcrCBGradVertMiddle -> Needs to equal VSCOLOR_COMMANDBAR_GRADIENT_MIDDLE in vscolors.cpp
1229
rgbTable[KnownColors.msocbvcrCBGradVertEnd] =
Color
.FromArgb(235, 233, 237); // msocbvcrCBGradVertEnd -> Needs to equal VSCOLOR_COMMANDBAR_GRADIENT_END in vscolors.cpp
1230
rgbTable[KnownColors.msocbvcrCBGradOptionsBegin] =
Color
.FromArgb(242, 242, 242); // msocbvcrCBGradOptionsBegin
1231
rgbTable[KnownColors.msocbvcrCBGradOptionsMiddle] =
Color
.FromArgb(224, 224, 225); // msocbvcrCBGradOptionsMiddle
1232
rgbTable[KnownColors.msocbvcrCBGradOptionsEnd] =
Color
.FromArgb(167, 166, 170); // msocbvcrCBGradOptionsEnd
1233
rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdBegin] =
Color
.FromArgb(252, 252, 252); // msocbvcrCBGradMenuTitleBkgdBegin
1234
rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdEnd] =
Color
.FromArgb(245, 244, 246); // msocbvcrCBGradMenuTitleBkgdEnd
1235
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin] =
Color
.FromArgb(247, 246, 248); // msocbvcrCBGradMenuIconBkgdDroppedBegin
1236
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle] =
Color
.FromArgb(241, 240, 242); // msocbvcrCBGradMenuIconBkgdDroppedMiddle
1237
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd] =
Color
.FromArgb(228, 226, 230); // msocbvcrCBGradMenuIconBkgdDroppedEnd
1238
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedBegin] =
Color
.FromArgb(226, 229, 238); // msocbvcrCBGradOptionsSelectedBegin
1239
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedMiddle] =
Color
.FromArgb(226, 229, 238); // msocbvcrCBGradOptionsSelectedMiddle
1240
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedEnd] =
Color
.FromArgb(226, 229, 238); // msocbvcrCBGradOptionsSelectedEnd
1241
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverBegin] =
Color
.FromArgb(194, 207, 229); // msocbvcrCBGradOptionsMouseOverBegin
1242
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverMiddle] =
Color
.FromArgb(194, 207, 229); // msocbvcrCBGradOptionsMouseOverMiddle
1243
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverEnd] =
Color
.FromArgb(194, 207, 229); // msocbvcrCBGradOptionsMouseOverEnd
1244
rgbTable[KnownColors.msocbvcrCBGradSelectedBegin] =
Color
.FromArgb(226, 229, 238); // msocbvcrCBGradSelectedBegin
1245
rgbTable[KnownColors.msocbvcrCBGradSelectedMiddle] =
Color
.FromArgb(226, 229, 238); // msocbvcrCBGradSelectedMiddle
1246
rgbTable[KnownColors.msocbvcrCBGradSelectedEnd] =
Color
.FromArgb(226, 229, 238); // msocbvcrCBGradSelectedEnd
1247
rgbTable[KnownColors.msocbvcrCBGradMouseOverBegin] =
Color
.FromArgb(194, 207, 229); // msocbvcrCBGradMouseOverBegin
1248
rgbTable[KnownColors.msocbvcrCBGradMouseOverMiddle] =
Color
.FromArgb(194, 207, 229); // msocbvcrCBGradMouseOverMiddle
1249
rgbTable[KnownColors.msocbvcrCBGradMouseOverEnd] =
Color
.FromArgb(194, 207, 229); // msocbvcrCBGradMouseOverEnd
1250
rgbTable[KnownColors.msocbvcrCBGradMouseDownBegin] =
Color
.FromArgb(153, 175, 212); // msocbvcrCBGradMouseDownBegin
1251
rgbTable[KnownColors.msocbvcrCBGradMouseDownMiddle] =
Color
.FromArgb(153, 175, 212); // msocbvcrCBGradMouseDownMiddle
1252
rgbTable[KnownColors.msocbvcrCBGradMouseDownEnd] =
Color
.FromArgb(153, 175, 212); // msocbvcrCBGradMouseDownEnd
1253
rgbTable[KnownColors.msocbvcrNetLookBkgnd] =
Color
.FromArgb(235, 233, 237); // msocbvcrNetLookBkgnd
1254
rgbTable[KnownColors.msocbvcrCBMenuShadow] =
Color
.FromArgb(000, 000, 000); // msocbvcrCBMenuShadow
1255
rgbTable[KnownColors.msocbvcrCBDockSeparatorLine] =
Color
.FromArgb(51, 94, 168); // msocbvcrCBDockSeparatorLine
1256
rgbTable[KnownColors.msocbvcrCBDropDownArrow] =
Color
.FromArgb(235, 233, 237); // msocbvcrCBDropDownArrow
1257
rgbTable[KnownColors.msocbvcrOLKGridlines] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKGridlines
1258
rgbTable[KnownColors.msocbvcrOLKGroupText] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKGroupText
1259
rgbTable[KnownColors.msocbvcrOLKGroupLine] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKGroupLine
1260
rgbTable[KnownColors.msocbvcrOLKGroupShaded] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKGroupShaded
1261
rgbTable[KnownColors.msocbvcrOLKGroupNested] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKGroupNested
1262
rgbTable[KnownColors.msocbvcrOLKIconBar] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKIconBar
1263
rgbTable[KnownColors.msocbvcrOLKFlagNone] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKFlagNone
1264
rgbTable[KnownColors.msocbvcrOLKFolderbarLight] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKFolderbarLight
1265
rgbTable[KnownColors.msocbvcrOLKFolderbarDark] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKFolderbarDark
1266
rgbTable[KnownColors.msocbvcrOLKFolderbarText] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKFolderbarText
1267
rgbTable[KnownColors.msocbvcrOLKWBButtonLight] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBButtonLight
1268
rgbTable[KnownColors.msocbvcrOLKWBButtonDark] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBButtonDark
1269
rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonLight] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBSelectedButtonLight
1270
rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonDark] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBSelectedButtonDark
1271
rgbTable[KnownColors.msocbvcrOLKWBHoverButtonLight] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBHoverButtonLight
1272
rgbTable[KnownColors.msocbvcrOLKWBHoverButtonDark] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBHoverButtonDark
1273
rgbTable[KnownColors.msocbvcrOLKWBPressedButtonLight] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBPressedButtonLight
1274
rgbTable[KnownColors.msocbvcrOLKWBPressedButtonDark] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBPressedButtonDark
1275
rgbTable[KnownColors.msocbvcrOLKWBDarkOutline] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBDarkOutline
1276
rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBSplitterLight
1277
rgbTable[KnownColors.msocbvcrOLKWBSplitterDark] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBSplitterDark
1278
rgbTable[KnownColors.msocbvcrOLKWBActionDividerLine] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBActionDividerLine
1279
rgbTable[KnownColors.msocbvcrOLKWBLabelText] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBLabelText
1280
rgbTable[KnownColors.msocbvcrOLKWBFoldersBackground] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKWBFoldersBackground
1281
rgbTable[KnownColors.msocbvcrOLKTodayIndicatorLight] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKTodayIndicatorLight
1282
rgbTable[KnownColors.msocbvcrOLKTodayIndicatorDark] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKTodayIndicatorDark
1283
rgbTable[KnownColors.msocbvcrOLKInfoBarBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKInfoBarBkgd
1284
rgbTable[KnownColors.msocbvcrOLKInfoBarText] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKInfoBarText
1285
rgbTable[KnownColors.msocbvcrOLKPreviewPaneLabelText] =
Color
.FromArgb(255, 51, 153); // msocbvcrOLKPreviewPaneLabelText
1286
rgbTable[KnownColors.msocbvcrHyperlink] =
Color
.FromArgb(0, 61, 178); // msocbvcrHyperlink
1287
rgbTable[KnownColors.msocbvcrHyperlinkFollowed] =
Color
.FromArgb(170, 0, 170); // msocbvcrHyperlinkFollowed
1288
rgbTable[KnownColors.msocbvcrOGWorkspaceBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGWorkspaceBkgd
1289
rgbTable[KnownColors.msocbvcrOGMDIParentWorkspaceBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGMDIParentWorkspaceBkgd
1290
rgbTable[KnownColors.msocbvcrOGRulerBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGRulerBkgd
1291
rgbTable[KnownColors.msocbvcrOGRulerActiveBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGRulerActiveBkgd
1292
rgbTable[KnownColors.msocbvcrOGRulerInactiveBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGRulerInactiveBkgd
1293
rgbTable[KnownColors.msocbvcrOGRulerText] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGRulerText
1294
rgbTable[KnownColors.msocbvcrOGRulerTabStopTicks] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGRulerTabStopTicks
1295
rgbTable[KnownColors.msocbvcrOGRulerBdr] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGRulerBdr
1296
rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdr] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGRulerTabBoxBdr
1297
rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdrHighlight] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGRulerTabBoxBdrHighlight
1298
rgbTable[KnownColors.msocbvcrXLFormulaBarBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrXLFormulaBarBkgd
1299
rgbTable[KnownColors.msocbvcrCBDragHandleShadow] =
Color
.FromArgb(255, 255, 255); // msocbvcrCBDragHandleShadow -> Needs to equal VSCOLOR_COMMANDBAR_DRAGHANDLE_SHADOW in vscolors.cpp
1300
rgbTable[KnownColors.msocbvcrOGTaskPaneGroupBoxHeaderBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrOGTaskPaneGroupBoxHeaderBkgd
1301
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd
1302
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd
1303
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabBdr] =
Color
.FromArgb(255, 51, 153); // msocbvcrPPOutlineThumbnailsPaneTabBdr
1304
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabText] =
Color
.FromArgb(255, 51, 153); // msocbvcrPPOutlineThumbnailsPaneTabText
1305
rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelected] =
Color
.FromArgb(255, 51, 153); // msocbvcrPPSlideBdrActiveSelected
1306
rgbTable[KnownColors.msocbvcrPPSlideBdrInactiveSelected] =
Color
.FromArgb(255, 51, 153); // msocbvcrPPSlideBdrInactiveSelected
1307
rgbTable[KnownColors.msocbvcrPPSlideBdrMouseOver] =
Color
.FromArgb(255, 51, 153); // msocbvcrPPSlideBdrMouseOver
1308
rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelectedMouseOver] =
Color
.FromArgb(255, 51, 153); // msocbvcrPPSlideBdrActiveSelectedMouseOver
1309
rgbTable[KnownColors.msocbvcrDlgGroupBoxText] =
Color
.FromArgb(0, 0, 0); // msocbvcrDlgGroupBoxText
1310
rgbTable[KnownColors.msocbvcrScrollbarBkgd] =
Color
.FromArgb(237, 235, 239); // msocbvcrScrollbarBkgd
1311
rgbTable[KnownColors.msocbvcrListHeaderArrow] =
Color
.FromArgb(155, 154, 156); // msocbvcrListHeaderArrow
1312
rgbTable[KnownColors.msocbvcrDisabledHighlightedText] =
Color
.FromArgb(188, 202, 226); // msocbvcrDisabledHighlightedText
1313
rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] =
Color
.FromArgb(235, 233, 237); // msocbvcrFocuslessHighlightedBkgd
1314
rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] =
Color
.FromArgb(000, 000, 000); // msocbvcrFocuslessHighlightedText
1315
rgbTable[KnownColors.msocbvcrDisabledFocuslessHighlightedText] =
Color
.FromArgb(167, 166, 170); // msocbvcrDisabledFocuslessHighlightedText
1316
rgbTable[KnownColors.msocbvcrWPCtlTextMouseDown] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPCtlTextMouseDown
1317
rgbTable[KnownColors.msocbvcrWPTextDisabled] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPTextDisabled
1318
rgbTable[KnownColors.msocbvcrWPInfoTipBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPInfoTipBkgd
1319
rgbTable[KnownColors.msocbvcrWPInfoTipText] =
Color
.FromArgb(255, 51, 153); // msocbvcrWPInfoTipText
1320
rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWActiveTabBkgd
1321
rgbTable[KnownColors.msocbvcrDWActiveTabText] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWActiveTabText
1322
rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWActiveTabTextDisabled
1323
rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWInactiveTabBkgd
1324
rgbTable[KnownColors.msocbvcrDWInactiveTabText] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWInactiveTabText
1325
rgbTable[KnownColors.msocbvcrDWTabBkgdMouseOver] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWTabBkgdMouseOver
1326
rgbTable[KnownColors.msocbvcrDWTabTextMouseOver] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWTabTextMouseOver
1327
rgbTable[KnownColors.msocbvcrDWTabBkgdMouseDown] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWTabBkgdMouseDown
1328
rgbTable[KnownColors.msocbvcrDWTabTextMouseDown] =
Color
.FromArgb(255, 51, 153); // msocbvcrDWTabTextMouseDown
1329
rgbTable[KnownColors.msocbvcrGSPLightBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPLightBkgd
1330
rgbTable[KnownColors.msocbvcrGSPDarkBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPDarkBkgd
1331
rgbTable[KnownColors.msocbvcrGSPGroupHeaderLightBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPGroupHeaderLightBkgd
1332
rgbTable[KnownColors.msocbvcrGSPGroupHeaderDarkBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPGroupHeaderDarkBkgd
1333
rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPGroupHeaderText
1334
rgbTable[KnownColors.msocbvcrGSPGroupContentLightBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPGroupContentLightBkgd
1335
rgbTable[KnownColors.msocbvcrGSPGroupContentDarkBkgd] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPGroupContentDarkBkgd
1336
rgbTable[KnownColors.msocbvcrGSPGroupContentText] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPGroupContentText
1337
rgbTable[KnownColors.msocbvcrGSPGroupContentTextDisabled] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPGroupContentTextDisabled
1338
rgbTable[KnownColors.msocbvcrGSPGroupline] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPGroupline
1339
rgbTable[KnownColors.msocbvcrGSPHyperlink] =
Color
.FromArgb(255, 51, 153); // msocbvcrGSPHyperlink
1340
rgbTable[KnownColors.msocbvcrDocTabBkgd] =
Color
.FromArgb(212, 212, 226); // msocbvcrDocTabBkgd
1341
rgbTable[KnownColors.msocbvcrDocTabText] =
Color
.FromArgb(000, 000, 000); // msocbvcrDocTabText
1342
rgbTable[KnownColors.msocbvcrDocTabBdr] =
Color
.FromArgb(118, 116, 146); // msocbvcrDocTabBdr
1343
rgbTable[KnownColors.msocbvcrDocTabBdrLight] =
Color
.FromArgb(255, 255, 255); // msocbvcrDocTabBdrLight
1344
rgbTable[KnownColors.msocbvcrDocTabBdrDark] =
Color
.FromArgb(186, 185, 206); // msocbvcrDocTabBdrDark
1345
rgbTable[KnownColors.msocbvcrDocTabBkgdSelected] =
Color
.FromArgb(255, 255, 255); // msocbvcrDocTabBkgdSelected
1346
rgbTable[KnownColors.msocbvcrDocTabTextSelected] =
Color
.FromArgb(000, 000, 000); // msocbvcrDocTabTextSelected
1347
rgbTable[KnownColors.msocbvcrDocTabBdrSelected] =
Color
.FromArgb(124, 124, 148); // msocbvcrDocTabBdrSelected
1348
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] =
Color
.FromArgb(193, 210, 238); // msocbvcrDocTabBkgdMouseOver
1349
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(49, 106, 197); // msocbvcrDocTabTextMouseOver
1350
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(49, 106, 197); // msocbvcrDocTabBdrMouseOver
1351
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(49, 106, 197); // msocbvcrDocTabBdrLightMouseOver
1352
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(49, 106, 197); // msocbvcrDocTabBdrDarkMouseOver
1353
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseDown] =
Color
.FromArgb(154, 183, 228); // msocbvcrDocTabBkgdMouseDown
1354
rgbTable[KnownColors.msocbvcrDocTabTextMouseDown] =
Color
.FromArgb(000, 000, 000); // msocbvcrDocTabTextMouseDown
1355
rgbTable[KnownColors.msocbvcrDocTabBdrMouseDown] =
Color
.FromArgb(75, 75, 111); // msocbvcrDocTabBdrMouseDown
1356
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseDown] =
Color
.FromArgb(75, 75, 111); // msocbvcrDocTabBdrLightMouseDown
1357
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseDown] =
Color
.FromArgb(75, 75, 111); // msocbvcrDocTabBdrDarkMouseDown
1358
rgbTable[KnownColors.msocbvcrToastGradBegin] =
Color
.FromArgb(246, 244, 236); // msocbvcrToastGradBegin
1359
rgbTable[KnownColors.msocbvcrToastGradEnd] =
Color
.FromArgb(179, 178, 204); // msocbvcrToastGradEnd
1360
rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] =
Color
.FromArgb(236, 233, 216); // msocbvcrJotNavUIGradBegin
1361
rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] =
Color
.FromArgb(236, 233, 216); // msocbvcrJotNavUIGradMiddle
1362
rgbTable[KnownColors.msocbvcrJotNavUIGradEnd] =
Color
.FromArgb(255, 255, 255); // msocbvcrJotNavUIGradEnd
1363
rgbTable[KnownColors.msocbvcrJotNavUIText] =
Color
.FromArgb(000, 000, 000); // msocbvcrJotNavUIText
1364
rgbTable[KnownColors.msocbvcrJotNavUIBdr] =
Color
.FromArgb(172, 168, 153); // msocbvcrJotNavUIBdr
1365
rgbTable[KnownColors.msocbvcrPlacesBarBkgd] =
Color
.FromArgb(224, 223, 227); // msocbvcrPlacesBarBkgd
1366
rgbTable[KnownColors.msocbvcrPubPrintDocScratchPageBkgd] =
Color
.FromArgb(152, 181, 226); // msocbvcrPubPrintDocScratchPageBkgd
1367
rgbTable[KnownColors.msocbvcrPubWebDocScratchPageBkgd] =
Color
.FromArgb(193, 210, 238); // msocbvcrPubWebDocScratchPageBkgd
1370
private void InitThemedColors(ref Dictionary<KnownColors,
Color
> rgbTable)
1438
private static void InitBlueLunaColors(ref Dictionary<KnownColors,
Color
> rgbTable)
1440
rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] =
Color
.FromArgb(196, 205, 218);
1441
rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] =
Color
.FromArgb(196, 205, 218);
1442
rgbTable[KnownColors.msocbvcrCBBdrOuterFloating] =
Color
.FromArgb(42, 102, 201);
1443
rgbTable[KnownColors.msocbvcrCBBkgd] =
Color
.FromArgb(196, 219, 249);
1444
rgbTable[KnownColors.msocbvcrCBCtlBdrMouseDown] =
Color
.FromArgb(0, 0, 128);
1445
rgbTable[KnownColors.msocbvcrCBCtlBdrMouseOver] =
Color
.FromArgb(0, 0, 128);
1446
rgbTable[KnownColors.msocbvcrCBCtlBdrSelected] =
Color
.FromArgb(0, 0, 128);
1447
rgbTable[KnownColors.msocbvcrCBCtlBdrSelectedMouseOver] =
Color
.FromArgb(0, 0, 128);
1448
rgbTable[KnownColors.msocbvcrCBCtlBkgd] =
Color
.FromArgb(196, 219, 249);
1449
rgbTable[KnownColors.msocbvcrCBCtlBkgdLight] =
Color
.FromArgb(255, 255, 255);
1450
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
1451
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
1452
rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
1453
rgbTable[KnownColors.msocbvcrCBCtlBkgdSelected] =
Color
.FromArgb(255, 192, 111);
1454
rgbTable[KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver] =
Color
.FromArgb(254, 128, 62);
1455
rgbTable[KnownColors.msocbvcrCBCtlText] =
Color
.FromArgb(0, 0, 0);
1456
rgbTable[KnownColors.msocbvcrCBCtlTextDisabled] =
Color
.FromArgb(141, 141, 141);
1457
rgbTable[KnownColors.msocbvcrCBCtlTextLight] =
Color
.FromArgb(128, 128, 128);
1458
rgbTable[KnownColors.msocbvcrCBCtlTextMouseDown] =
Color
.FromArgb(0, 0, 0);
1459
rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1460
rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1461
rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1462
rgbTable[KnownColors.msocbvcrCBDockSeparatorLine] =
Color
.FromArgb(0, 53, 145);
1463
rgbTable[KnownColors.msocbvcrCBDragHandle] =
Color
.FromArgb(39, 65, 118);
1464
rgbTable[KnownColors.msocbvcrCBDragHandleShadow] =
Color
.FromArgb(255, 255, 255);
1465
rgbTable[KnownColors.msocbvcrCBDropDownArrow] =
Color
.FromArgb(236, 233, 216);
1466
rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzBegin] =
Color
.FromArgb(158, 190, 245);
1467
rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzEnd] =
Color
.FromArgb(196, 218, 250);
1468
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin] =
Color
.FromArgb(203, 221, 246);
1469
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd] =
Color
.FromArgb(114, 155, 215);
1470
rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle] =
Color
.FromArgb(161, 197, 249);
1471
rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdBegin] =
Color
.FromArgb(227, 239, 255);
1472
rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdEnd] =
Color
.FromArgb(123, 164, 224);
1473
rgbTable[KnownColors.msocbvcrCBGradMouseDownBegin] =
Color
.FromArgb(254, 128, 62);
1474
rgbTable[KnownColors.msocbvcrCBGradMouseDownEnd] =
Color
.FromArgb(255, 223, 154);
1475
rgbTable[KnownColors.msocbvcrCBGradMouseDownMiddle] =
Color
.FromArgb(255, 177, 109);
1476
rgbTable[KnownColors.msocbvcrCBGradMouseOverBegin] =
Color
.FromArgb(255, 255, 222);
1477
rgbTable[KnownColors.msocbvcrCBGradMouseOverEnd] =
Color
.FromArgb(255, 203, 136);
1478
rgbTable[KnownColors.msocbvcrCBGradMouseOverMiddle] =
Color
.FromArgb(255, 225, 172);
1479
rgbTable[KnownColors.msocbvcrCBGradOptionsBegin] =
Color
.FromArgb(127, 177, 250);
1480
rgbTable[KnownColors.msocbvcrCBGradOptionsEnd] =
Color
.FromArgb(0, 53, 145);
1481
rgbTable[KnownColors.msocbvcrCBGradOptionsMiddle] =
Color
.FromArgb(82, 127, 208);
1482
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverBegin] =
Color
.FromArgb(255, 255, 222);
1483
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverEnd] =
Color
.FromArgb(255, 193, 118);
1484
rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverMiddle] =
Color
.FromArgb(255, 225, 172);
1485
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedBegin] =
Color
.FromArgb(254, 140, 73);
1486
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedEnd] =
Color
.FromArgb(255, 221, 152);
1487
rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedMiddle] =
Color
.FromArgb(255, 184, 116);
1488
rgbTable[KnownColors.msocbvcrCBGradSelectedBegin] =
Color
.FromArgb(255, 223, 154);
1489
rgbTable[KnownColors.msocbvcrCBGradSelectedEnd] =
Color
.FromArgb(255, 166, 76);
1490
rgbTable[KnownColors.msocbvcrCBGradSelectedMiddle] =
Color
.FromArgb(255, 195, 116);
1491
rgbTable[KnownColors.msocbvcrCBGradVertBegin] =
Color
.FromArgb(227, 239, 255);
1492
rgbTable[KnownColors.msocbvcrCBGradVertEnd] =
Color
.FromArgb(123, 164, 224);
1493
rgbTable[KnownColors.msocbvcrCBGradVertMiddle] =
Color
.FromArgb(203, 225, 252);
1494
rgbTable[KnownColors.msocbvcrCBIconDisabledDark] =
Color
.FromArgb(97, 122, 172);
1495
rgbTable[KnownColors.msocbvcrCBIconDisabledLight] =
Color
.FromArgb(233, 236, 242);
1496
rgbTable[KnownColors.msocbvcrCBLabelBkgnd] =
Color
.FromArgb(186, 211, 245);
1497
rgbTable[KnownColors.msocbvcrCBLabelBkgnd] =
Color
.FromArgb(186, 211, 245);
1498
rgbTable[KnownColors.msocbvcrCBLowColorIconDisabled] =
Color
.FromArgb(109, 150, 208);
1499
rgbTable[KnownColors.msocbvcrCBMainMenuBkgd] =
Color
.FromArgb(153, 204, 255);
1500
rgbTable[KnownColors.msocbvcrCBMenuBdrOuter] =
Color
.FromArgb(0, 45, 150);
1501
rgbTable[KnownColors.msocbvcrCBMenuBkgd] =
Color
.FromArgb(246, 246, 246);
1502
rgbTable[KnownColors.msocbvcrCBMenuCtlText] =
Color
.FromArgb(0, 0, 0);
1503
rgbTable[KnownColors.msocbvcrCBMenuCtlTextDisabled] =
Color
.FromArgb(141, 141, 141);
1504
rgbTable[KnownColors.msocbvcrCBMenuIconBkgd] =
Color
.FromArgb(203, 225, 252);
1505
rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] =
Color
.FromArgb(172, 183, 201);
1506
rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] =
Color
.FromArgb(172, 183, 201);
1507
rgbTable[KnownColors.msocbvcrCBMenuShadow] =
Color
.FromArgb(95, 130, 234);
1508
rgbTable[KnownColors.msocbvcrCBMenuSplitArrow] =
Color
.FromArgb(128, 128, 128);
1509
rgbTable[KnownColors.msocbvcrCBOptionsButtonShadow] =
Color
.FromArgb(255, 255, 255);
1510
rgbTable[KnownColors.msocbvcrCBShadow] =
Color
.FromArgb(59, 97, 156);
1511
rgbTable[KnownColors.msocbvcrCBSplitterLine] =
Color
.FromArgb(106, 140, 203);
1512
rgbTable[KnownColors.msocbvcrCBSplitterLineLight] =
Color
.FromArgb(241, 249, 255);
1513
rgbTable[KnownColors.msocbvcrCBTearOffHandle] =
Color
.FromArgb(169, 199, 240);
1514
rgbTable[KnownColors.msocbvcrCBTearOffHandleMouseOver] =
Color
.FromArgb(255, 238, 194);
1515
rgbTable[KnownColors.msocbvcrCBTitleBkgd] =
Color
.FromArgb(42, 102, 201);
1516
rgbTable[KnownColors.msocbvcrCBTitleText] =
Color
.FromArgb(255, 255, 255);
1517
rgbTable[KnownColors.msocbvcrDisabledFocuslessHighlightedText] =
Color
.FromArgb(172, 168, 153);
1518
rgbTable[KnownColors.msocbvcrDisabledHighlightedText] =
Color
.FromArgb(187, 206, 236);
1519
rgbTable[KnownColors.msocbvcrDlgGroupBoxText] =
Color
.FromArgb(0, 70, 213);
1520
rgbTable[KnownColors.msocbvcrDocTabBdr] =
Color
.FromArgb(0, 53, 154);
1521
rgbTable[KnownColors.msocbvcrDocTabBdrDark] =
Color
.FromArgb(117, 166, 241);
1522
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseDown] =
Color
.FromArgb(0, 0, 128);
1523
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(0, 0, 128);
1524
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(0, 0, 128);
1525
rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] =
Color
.FromArgb(0, 0, 128);
1526
rgbTable[KnownColors.msocbvcrDocTabBdrLight] =
Color
.FromArgb(255, 255, 255);
1527
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseDown] =
Color
.FromArgb(0, 0, 128);
1528
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(0, 0, 128);
1529
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(0, 0, 128);
1530
rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] =
Color
.FromArgb(0, 0, 128);
1531
rgbTable[KnownColors.msocbvcrDocTabBdrMouseDown] =
Color
.FromArgb(0, 0, 128);
1532
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(0, 0, 128);
1533
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(0, 0, 128);
1534
rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] =
Color
.FromArgb(0, 0, 128);
1535
rgbTable[KnownColors.msocbvcrDocTabBdrSelected] =
Color
.FromArgb(59, 97, 156);
1536
rgbTable[KnownColors.msocbvcrDocTabBkgd] =
Color
.FromArgb(186, 211, 245);
1537
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
1538
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
1539
rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
1540
rgbTable[KnownColors.msocbvcrDocTabBkgdSelected] =
Color
.FromArgb(255, 255, 255);
1541
rgbTable[KnownColors.msocbvcrDocTabText] =
Color
.FromArgb(0, 0, 0);
1542
rgbTable[KnownColors.msocbvcrDocTabTextMouseDown] =
Color
.FromArgb(0, 0, 0);
1543
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1544
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1545
rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1546
rgbTable[KnownColors.msocbvcrDocTabTextSelected] =
Color
.FromArgb(0, 0, 0);
1547
rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] =
Color
.FromArgb(186, 211, 245);
1548
rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] =
Color
.FromArgb(186, 211, 245);
1549
rgbTable[KnownColors.msocbvcrDWActiveTabText] =
Color
.FromArgb(0, 0, 0);
1550
rgbTable[KnownColors.msocbvcrDWActiveTabText] =
Color
.FromArgb(0, 0, 0);
1551
rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] =
Color
.FromArgb(94, 94, 94);
1552
rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] =
Color
.FromArgb(94, 94, 94);
1553
rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] =
Color
.FromArgb(129, 169, 226);
1554
rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] =
Color
.FromArgb(129, 169, 226);
1555
rgbTable[KnownColors.msocbvcrDWInactiveTabText] =
Color
.FromArgb(255, 255, 255);
1556
rgbTable[KnownColors.msocbvcrDWInactiveTabText] =
Color
.FromArgb(255, 255, 255);
1557
rgbTable[KnownColors.msocbvcrDWTabBkgdMouseDown] =
Color
.FromArgb(254, 128, 62);
1558
rgbTable[KnownColors.msocbvcrDWTabBkgdMouseOver] =
Color
.FromArgb(255, 238, 194);
1559
rgbTable[KnownColors.msocbvcrDWTabTextMouseDown] =
Color
.FromArgb(0, 0, 0);
1560
rgbTable[KnownColors.msocbvcrDWTabTextMouseOver] =
Color
.FromArgb(0, 0, 0);
1561
rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] =
Color
.FromArgb(236, 233, 216);
1562
rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] =
Color
.FromArgb(236, 233, 216);
1563
rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] =
Color
.FromArgb(0, 0, 0);
1564
rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] =
Color
.FromArgb(0, 0, 0);
1565
rgbTable[KnownColors.msocbvcrGDHeaderBdr] =
Color
.FromArgb(89, 89, 172);
1566
rgbTable[KnownColors.msocbvcrGDHeaderBkgd] =
Color
.FromArgb(239, 235, 222);
1567
rgbTable[KnownColors.msocbvcrGDHeaderCellBdr] =
Color
.FromArgb(126, 125, 104);
1568
rgbTable[KnownColors.msocbvcrGDHeaderCellBkgd] =
Color
.FromArgb(239, 235, 222);
1569
rgbTable[KnownColors.msocbvcrGDHeaderCellBkgdSelected] =
Color
.FromArgb(255, 192, 111);
1570
rgbTable[KnownColors.msocbvcrGDHeaderSeeThroughSelection] =
Color
.FromArgb(191, 191, 223);
1571
rgbTable[KnownColors.msocbvcrGSPDarkBkgd] =
Color
.FromArgb(74, 122, 201);
1572
rgbTable[KnownColors.msocbvcrGSPDarkBkgd] =
Color
.FromArgb(74, 122, 201);
1573
rgbTable[KnownColors.msocbvcrGSPGroupContentDarkBkgd] =
Color
.FromArgb(185, 208, 241);
1574
rgbTable[KnownColors.msocbvcrGSPGroupContentLightBkgd] =
Color
.FromArgb(221, 236, 254);
1575
rgbTable[KnownColors.msocbvcrGSPGroupContentText] =
Color
.FromArgb(0, 0, 0);
1576
rgbTable[KnownColors.msocbvcrGSPGroupContentTextDisabled] =
Color
.FromArgb(150, 145, 133);
1577
rgbTable[KnownColors.msocbvcrGSPGroupHeaderDarkBkgd] =
Color
.FromArgb(101, 143, 224);
1578
rgbTable[KnownColors.msocbvcrGSPGroupHeaderLightBkgd] =
Color
.FromArgb(196, 219, 249);
1579
rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] =
Color
.FromArgb(0, 45, 134);
1580
rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] =
Color
.FromArgb(0, 45, 134);
1581
rgbTable[KnownColors.msocbvcrGSPGroupline] =
Color
.FromArgb(255, 255, 255);
1582
rgbTable[KnownColors.msocbvcrGSPGroupline] =
Color
.FromArgb(255, 255, 255);
1583
rgbTable[KnownColors.msocbvcrGSPHyperlink] =
Color
.FromArgb(0, 61, 178);
1584
rgbTable[KnownColors.msocbvcrGSPLightBkgd] =
Color
.FromArgb(221, 236, 254);
1585
rgbTable[KnownColors.msocbvcrHyperlink] =
Color
.FromArgb(0, 61, 178);
1586
rgbTable[KnownColors.msocbvcrHyperlinkFollowed] =
Color
.FromArgb(170, 0, 170);
1587
rgbTable[KnownColors.msocbvcrJotNavUIBdr] =
Color
.FromArgb(59, 97, 156);
1588
rgbTable[KnownColors.msocbvcrJotNavUIBdr] =
Color
.FromArgb(59, 97, 156);
1589
rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] =
Color
.FromArgb(158, 190, 245);
1590
rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] =
Color
.FromArgb(158, 190, 245);
1591
rgbTable[KnownColors.msocbvcrJotNavUIGradEnd] =
Color
.FromArgb(255, 255, 255);
1592
rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] =
Color
.FromArgb(196, 218, 250);
1593
rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] =
Color
.FromArgb(196, 218, 250);
1594
rgbTable[KnownColors.msocbvcrJotNavUIText] =
Color
.FromArgb(0, 0, 0);
1595
rgbTable[KnownColors.msocbvcrListHeaderArrow] =
Color
.FromArgb(172, 168, 153);
1596
rgbTable[KnownColors.msocbvcrNetLookBkgnd] =
Color
.FromArgb(227, 239, 255);
1597
rgbTable[KnownColors.msocbvcrOABBkgd] =
Color
.FromArgb(128, 128, 128);
1598
rgbTable[KnownColors.msocbvcrOBBkgdBdr] =
Color
.FromArgb(128, 128, 128);
1599
rgbTable[KnownColors.msocbvcrOBBkgdBdrContrast] =
Color
.FromArgb(255, 255, 255);
1600
rgbTable[KnownColors.msocbvcrOGMDIParentWorkspaceBkgd] =
Color
.FromArgb(144, 153, 174);
1601
rgbTable[KnownColors.msocbvcrOGRulerActiveBkgd] =
Color
.FromArgb(255, 255, 255);
1602
rgbTable[KnownColors.msocbvcrOGRulerBdr] =
Color
.FromArgb(0, 0, 0);
1603
rgbTable[KnownColors.msocbvcrOGRulerBkgd] =
Color
.FromArgb(216, 231, 252);
1604
rgbTable[KnownColors.msocbvcrOGRulerInactiveBkgd] =
Color
.FromArgb(158, 190, 245);
1605
rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdr] =
Color
.FromArgb(75, 120, 202);
1606
rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdrHighlight] =
Color
.FromArgb(255, 255, 255);
1607
rgbTable[KnownColors.msocbvcrOGRulerTabStopTicks] =
Color
.FromArgb(128, 128, 128);
1608
rgbTable[KnownColors.msocbvcrOGRulerText] =
Color
.FromArgb(0, 0, 0);
1609
rgbTable[KnownColors.msocbvcrOGTaskPaneGroupBoxHeaderBkgd] =
Color
.FromArgb(186, 211, 245);
1610
rgbTable[KnownColors.msocbvcrOGWorkspaceBkgd] =
Color
.FromArgb(144, 153, 174);
1611
rgbTable[KnownColors.msocbvcrOLKFlagNone] =
Color
.FromArgb(242, 240, 228);
1612
rgbTable[KnownColors.msocbvcrOLKFolderbarDark] =
Color
.FromArgb(0, 53, 145);
1613
rgbTable[KnownColors.msocbvcrOLKFolderbarLight] =
Color
.FromArgb(89, 135, 214);
1614
rgbTable[KnownColors.msocbvcrOLKFolderbarText] =
Color
.FromArgb(255, 255, 255);
1615
rgbTable[KnownColors.msocbvcrOLKGridlines] =
Color
.FromArgb(234, 233, 225);
1616
rgbTable[KnownColors.msocbvcrOLKGroupLine] =
Color
.FromArgb(123, 164, 224);
1617
rgbTable[KnownColors.msocbvcrOLKGroupNested] =
Color
.FromArgb(253, 238, 201);
1618
rgbTable[KnownColors.msocbvcrOLKGroupShaded] =
Color
.FromArgb(190, 218, 251);
1619
rgbTable[KnownColors.msocbvcrOLKGroupText] =
Color
.FromArgb(55, 104, 185);
1620
rgbTable[KnownColors.msocbvcrOLKIconBar] =
Color
.FromArgb(253, 247, 233);
1621
rgbTable[KnownColors.msocbvcrOLKInfoBarBkgd] =
Color
.FromArgb(144, 153, 174);
1622
rgbTable[KnownColors.msocbvcrOLKInfoBarText] =
Color
.FromArgb(255, 255, 255);
1623
rgbTable[KnownColors.msocbvcrOLKPreviewPaneLabelText] =
Color
.FromArgb(144, 153, 174);
1624
rgbTable[KnownColors.msocbvcrOLKTodayIndicatorDark] =
Color
.FromArgb(187, 85, 3);
1625
rgbTable[KnownColors.msocbvcrOLKTodayIndicatorLight] =
Color
.FromArgb(251, 200, 79);
1626
rgbTable[KnownColors.msocbvcrOLKWBActionDividerLine] =
Color
.FromArgb(215, 228, 251);
1627
rgbTable[KnownColors.msocbvcrOLKWBButtonDark] =
Color
.FromArgb(123, 164, 224);
1628
rgbTable[KnownColors.msocbvcrOLKWBButtonLight] =
Color
.FromArgb(203, 225, 252);
1629
rgbTable[KnownColors.msocbvcrOLKWBButtonLight] =
Color
.FromArgb(203, 225, 252);
1630
rgbTable[KnownColors.msocbvcrOLKWBDarkOutline] =
Color
.FromArgb(0, 45, 150);
1631
rgbTable[KnownColors.msocbvcrOLKWBFoldersBackground] =
Color
.FromArgb(255, 255, 255);
1632
rgbTable[KnownColors.msocbvcrOLKWBHoverButtonDark] =
Color
.FromArgb(247, 190, 87);
1633
rgbTable[KnownColors.msocbvcrOLKWBHoverButtonLight] =
Color
.FromArgb(255, 255, 220);
1634
rgbTable[KnownColors.msocbvcrOLKWBLabelText] =
Color
.FromArgb(50, 69, 105);
1635
rgbTable[KnownColors.msocbvcrOLKWBPressedButtonDark] =
Color
.FromArgb(248, 222, 128);
1636
rgbTable[KnownColors.msocbvcrOLKWBPressedButtonLight] =
Color
.FromArgb(232, 127, 8);
1637
rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonDark] =
Color
.FromArgb(238, 147, 17);
1638
rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonLight] =
Color
.FromArgb(251, 230, 148);
1639
rgbTable[KnownColors.msocbvcrOLKWBSplitterDark] =
Color
.FromArgb(0, 53, 145);
1640
rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] =
Color
.FromArgb(89, 135, 214);
1641
rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] =
Color
.FromArgb(89, 135, 214);
1642
rgbTable[KnownColors.msocbvcrPlacesBarBkgd] =
Color
.FromArgb(236, 233, 216);
1643
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd] =
Color
.FromArgb(195, 218, 249);
1644
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabBdr] =
Color
.FromArgb(59, 97, 156);
1645
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd] =
Color
.FromArgb(158, 190, 245);
1646
rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabText] =
Color
.FromArgb(0, 0, 0);
1647
rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelected] =
Color
.FromArgb(61, 108, 192);
1648
rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelectedMouseOver] =
Color
.FromArgb(61, 108, 192);
1649
rgbTable[KnownColors.msocbvcrPPSlideBdrInactiveSelected] =
Color
.FromArgb(128, 128, 128);
1650
rgbTable[KnownColors.msocbvcrPPSlideBdrMouseOver] =
Color
.FromArgb(61, 108, 192);
1651
rgbTable[KnownColors.msocbvcrPubPrintDocScratchPageBkgd] =
Color
.FromArgb(144, 153, 174);
1652
rgbTable[KnownColors.msocbvcrPubWebDocScratchPageBkgd] =
Color
.FromArgb(189, 194, 207);
1653
rgbTable[KnownColors.msocbvcrSBBdr] =
Color
.FromArgb(211, 211, 211);
1654
rgbTable[KnownColors.msocbvcrScrollbarBkgd] =
Color
.FromArgb(251, 251, 248);
1655
rgbTable[KnownColors.msocbvcrToastGradBegin] =
Color
.FromArgb(220, 236, 254);
1656
rgbTable[KnownColors.msocbvcrToastGradEnd] =
Color
.FromArgb(167, 197, 238);
1657
rgbTable[KnownColors.msocbvcrWPBdrInnerDocked] =
Color
.FromArgb(185, 212, 249);
1658
rgbTable[KnownColors.msocbvcrWPBdrOuterDocked] =
Color
.FromArgb(196, 218, 250);
1659
rgbTable[KnownColors.msocbvcrWPBdrOuterFloating] =
Color
.FromArgb(42, 102, 201);
1660
rgbTable[KnownColors.msocbvcrWPBkgd] =
Color
.FromArgb(221, 236, 254);
1661
rgbTable[KnownColors.msocbvcrWPCtlBdr] =
Color
.FromArgb(127, 157, 185);
1662
rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] =
Color
.FromArgb(0, 0, 0);
1663
rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] =
Color
.FromArgb(0, 0, 0);
1664
rgbTable[KnownColors.msocbvcrWPCtlBdrDisabled] =
Color
.FromArgb(128, 128, 128);
1665
rgbTable[KnownColors.msocbvcrWPCtlBkgd] =
Color
.FromArgb(169, 199, 240);
1666
rgbTable[KnownColors.msocbvcrWPCtlBkgdDisabled] =
Color
.FromArgb(222, 222, 222);
1667
rgbTable[KnownColors.msocbvcrWPCtlText] =
Color
.FromArgb(0, 0, 0);
1668
rgbTable[KnownColors.msocbvcrWPCtlTextDisabled] =
Color
.FromArgb(172, 168, 153);
1669
rgbTable[KnownColors.msocbvcrWPCtlTextMouseDown] =
Color
.FromArgb(0, 0, 0);
1670
rgbTable[KnownColors.msocbvcrWPGroupline] =
Color
.FromArgb(123, 164, 224);
1671
rgbTable[KnownColors.msocbvcrWPInfoTipBkgd] =
Color
.FromArgb(255, 255, 204);
1672
rgbTable[KnownColors.msocbvcrWPInfoTipText] =
Color
.FromArgb(0, 0, 0);
1673
rgbTable[KnownColors.msocbvcrWPNavBarBkgnd] =
Color
.FromArgb(74, 122, 201);
1674
rgbTable[KnownColors.msocbvcrWPText] =
Color
.FromArgb(0, 0, 0);
1675
rgbTable[KnownColors.msocbvcrWPText] =
Color
.FromArgb(0, 0, 0);
1676
rgbTable[KnownColors.msocbvcrWPTextDisabled] =
Color
.FromArgb(172, 168, 153);
1677
rgbTable[KnownColors.msocbvcrWPTitleBkgdActive] =
Color
.FromArgb(123, 164, 224);
1678
rgbTable[KnownColors.msocbvcrWPTitleBkgdInactive] =
Color
.FromArgb(148, 187, 239);
1679
rgbTable[KnownColors.msocbvcrWPTitleTextActive] =
Color
.FromArgb(0, 0, 0);
1680
rgbTable[KnownColors.msocbvcrWPTitleTextInactive] =
Color
.FromArgb(0, 0, 0);
1681
rgbTable[KnownColors.msocbvcrXLFormulaBarBkgd] =
Color
.FromArgb(158, 190, 245);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
615
BackColor =
Color
.Transparent;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
366
public new
Color
BackColor
759
public new
Color
ForeColor
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (5)
10
private
Color
_arrowColor =
Color
.Empty;
17
Color
arrowColor,
29
public
Color
ArrowColor
39
internal
Color
DefaultArrowColor { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (2)
41
protected override
Color
GetOuterBorderColor(ComboBox comboBox)
51
protected override
Color
GetPopupOuterBorderColor(ComboBox comboBox, bool focused)
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (2)
87
public new
Color
BackColor
241
public new
Color
ForeColor
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanel.cs (3)
92
public override
Color
BackColor
101
if (ParentInternal is ToolStripContainer && value ==
Color
.Transparent)
103
ParentInternal.BackColor =
Color
.Transparent;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (3)
56
public override
Color
BackColor
213
public override
Color
ForeColor
250
public new
Color
ImageTransparentColor
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
200
Color
arrowColor;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (11)
154
Color
arrowColor = item.Selected && !item.Pressed ? SystemColors.HighlightText : SystemColors.ControlText;
205
Color
arrowColor = !item.Enabled ? SystemColors.ControlDark
382
return SystemColors.Control.ToArgb() ==
Color
.Black.ToArgb();
497
Span<(
Color
OldColor,
Color
NewColor)> map =
499
new(
Color
.Black,
Color
.White),
500
new(
Color
.White,
Color
.Black),
501
new(
Color
.FromArgb(0, 0, 128),
Color
.White)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (30)
43
private
Color
_imageTransparentColor =
Color
.Empty;
505
public virtual
Color
BackColor
509
Color
c = RawBackColor;
525
Color
previous = BackColor;
526
Properties.AddOrRemoveValue(s_backColorProperty, value, defaultValue:
Color
.Empty);
859
public virtual
Color
ForeColor
863
Color
foreColor = Properties.GetValueOrDefault<
Color
>(s_foreColorProperty);
879
Color
previous = ForeColor;
1052
if (value is Bitmap bmp && ImageTransparentColor !=
Color
.Empty)
1078
public
Color
ImageTransparentColor
1089
if (Image is Bitmap currentImage && value !=
Color
.Empty)
1196
Color
color = Properties.GetValueOrDefault<
Color
>(s_foreColorProperty);
1617
internal
Color
RawBackColor => Properties.GetValueOrDefault<
Color
>(s_backColorProperty,
Color
.Empty);
2889
Color
backColor = Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
2937
Color
foreColor = Properties.GetValueOrDefault<
Color
>(s_foreColorProperty);
3286
private bool ShouldSerializeImageTransparentColor() => ImageTransparentColor !=
Color
.Empty;
3294
Color
backColor = Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
3308
Color
foreColor = Properties.GetValueOrDefault<
Color
>(s_foreColorProperty);
3376
public virtual void ResetBackColor() => BackColor =
Color
.Empty;
3385
public virtual void ResetForeColor() => ForeColor =
Color
.Empty;
3400
private void ResetImageTransparentColor() => ImageTransparentColor =
Color
.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (5)
13
private
Color
_textColor = SystemColors.ControlText;
24
Color
textColor,
47
Color
textColor,
71
public
Color
TextColor
81
internal
Color
DefaultTextColor { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (13)
20
private
Color
_linkColor =
Color
.Empty;
21
private
Color
_activeLinkColor =
Color
.Empty;
22
private
Color
_visitedLinkColor =
Color
.Empty;
91
public
Color
ActiveLinkColor
114
private static
Color
IELinkColor
122
private static
Color
IEActiveLinkColor
130
private static
Color
IEVisitedLinkColor
162
public
Color
LinkColor
206
public
Color
VisitedLinkColor
356
Color
textColor = ForeColor;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
955
Color
textColor = SystemColors.MenuText;
1010
Color
arrowColor = (Selected || Pressed) ? SystemColors.HighlightText : SystemColors.MenuText;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (15)
302
Color
.Silver.GetCachedSolidBrushScope() : ColorTable.ButtonSelectedBorder.GetCachedSolidBrushScope();
566
Color
borderColor = ColorTable.MenuItemBorder;
622
Color
borderColor = ColorTable.MenuItemBorder;
701
Color
begin = (rightToLeft == RightToLeft.No) ? ColorTable.ImageMarginGradientBegin : ColorTable.ImageMarginGradientEnd;
702
Color
end = (rightToLeft == RightToLeft.No) ? ColorTable.ImageMarginGradientEnd : ColorTable.ImageMarginGradientBegin;
912
Color
overflowBottomLeftShadow, overflowTopShadow;
953
private static void FillWithDoubleGradient(
Color
beginColor,
Color
middleColor,
Color
endColor, Graphics g, Rectangle bounds, int firstGradientWidth, int secondGradientWidth, LinearGradientMode mode, bool flipHorizontal)
1056
Color
fill = (e.Item.Selected) ? ColorTable.CheckSelectedBackground : ColorTable.CheckBackground;
1118
private static void RenderBackgroundGradient(Graphics g, Control control,
Color
beginColor,
Color
endColor)
1124
private static void RenderBackgroundGradient(Graphics g, Control control,
Color
beginColor,
Color
endColor, Orientation orientation)
1239
Color
overflowButtonGradientBegin, overflowButtonGradientMiddle, overflowButtonGradientEnd, overflowBottomLeftShadow, overflowTopShadow;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (3)
835
Color
backgroundColor = e.Item.Selected ? SystemColors.Highlight : e.Item.BackColor;
866
Color
textColor = e.TextColor;
1023
return (control.RawBackColor ==
Color
.Empty && control.BackgroundImage is null);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (6)
10
private
Color
_backColor;
16
: this(g, toolStrip, new Rectangle(Point.Empty, toolStrip.OrThrowIfNull().Size),
Color
.Empty)
27
Color
backColor)
53
public
Color
BackColor
57
if (_backColor !=
Color
.Empty)
70
if (_backColor !=
Color
.Empty)
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
152
public new
Color
ImageTransparentColor
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (7)
74
private static void FillBackground(Graphics g, Rectangle bounds,
Color
backColor)
303
Color
backColor = e.ToolStrip.BackColor;
393
Color
arrowColor = item.Enabled ? SystemColors.ControlText : SystemColors.ControlDark;
430
else if (item.RawBackColor !=
Color
.Empty)
461
Color
borderColor = ToolStripManager.VisualStylesEnabled
475
else if (!ToolStripManager.VisualStylesEnabled && (item.RawBackColor !=
Color
.Empty))
524
Color
arrowColor = splitButton.Enabled ? SystemColors.ControlText : SystemColors.ControlDark;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
244
Color
outerBorderColor = focused ? ColorTable.TextBoxBorder : BackColor;
245
Color
innerBorderColor = SystemInformation.HighContrast && !focused ? ColorTable.MenuBorder : BackColor;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
238
public override
Color
ForeColor
System\Windows\Forms\Controls\TreeView\TreeNode.cs (10)
177
public
Color
BackColor
183
return
Color
.Empty;
191
Color
oldbk = BackColor;
198
_propBag.BackColor =
Color
.Empty;
404
public
Color
ForeColor
410
return
Color
.Empty;
417
Color
oldfc = ForeColor;
424
_propBag.ForeColor =
Color
.Empty;
2040
return BackColor !=
Color
.Empty;
2045
return ForeColor !=
Color
.Empty;
System\Windows\Forms\Controls\TreeView\TreeView.cs (11)
139
private
Color
_lineColor;
196
public override
Color
BackColor
440
public override
Color
ForeColor
853
[DefaultValue(typeof(
Color
), "Black")]
854
public
Color
LineColor
1883
Color
c = BackColor;
1899
if (_lineColor !=
Color
.Empty)
2783
Color
riFore = renderinfo.ForeColor;
2784
Color
riBack = renderinfo.BackColor;
2841
Color
color = (((curState & TreeNodeStates.Selected) == TreeNodeStates.Selected) && node.TreeView.Focused) ? SystemColors.HighlightText : (node.ForeColor !=
Color
.Empty) ? node.ForeColor : node.TreeView.ForeColor;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (3)
132
public override
Color
BackColor
264
public override
Color
ForeColor
519
Color
backColor = BackColor;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
321
Color
color = _parent.BackColor;
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (17)
170
public
Color
BackColor
183
return
Color
.Empty;
195
public
Color
ForeColor
208
return
Color
.Empty;
220
public
Color
LinkColor
233
return
Color
.Empty;
245
public
Color
ActiveLinkColor
258
return
Color
.Empty;
270
public
Color
VisitedLinkColor
283
return
Color
.Empty;
644
private static
Color
ColorFromVARIANT(VARIANT vColor)
658
return
Color
.FromArgb(255,
Color
.FromArgb(int.Parse(hexColor, NumberStyles.HexNumber, CultureInfo.InvariantCulture)));
662
return
Color
.FromName(strColor);
668
return
Color
.FromArgb(255,
Color
.FromArgb(vColor.data.intVal));
675
return
Color
.Empty;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
1242
public override
Color
BackColor
1261
public override
Color
ForeColor
System\Windows\Forms\DarkProfessionalColors.cs (19)
10
public override
Color
MenuItemPressedGradientBegin
11
=>
Color
.FromArgb(0xFF, 0x60, 0x60, 0x60);
13
public override
Color
MenuItemPressedGradientMiddle
14
=>
Color
.FromArgb(0xFF, 0x60, 0x60, 0x60);
16
public override
Color
MenuItemPressedGradientEnd
17
=>
Color
.FromArgb(0xFF, 0x60, 0x60, 0x60);
19
public override
Color
MenuItemSelected
22
public override
Color
MenuItemSelectedGradientBegin
23
=>
Color
.FromArgb(0xFF, 0x40, 0x40, 0x40);
25
public override
Color
MenuItemSelectedGradientEnd
26
=>
Color
.FromArgb(0xFF, 0x40, 0x40, 0x40);
28
public override
Color
MenuStripGradientBegin
31
public override
Color
MenuStripGradientEnd
34
public override
Color
StatusStripGradientBegin
37
public override
Color
StatusStripGradientEnd
40
public override
Color
ToolStripDropDownBackground
43
public override
Color
ImageMarginGradientBegin
46
public override
Color
ImageMarginGradientMiddle
49
public override
Color
ImageMarginGradientEnd
System\Windows\Forms\Dialogs\CommonDialogs\ColorDialog.cs (6)
22
private
Color
_color;
60
public
Color
Color
63
set => _color = !value.IsEmpty ? value :
Color
.Black;
152
_color =
Color
.Black;
156
private void ResetColor() => Color =
Color
.Black;
210
private bool ShouldSerializeColor() => !Color.Equals(
Color
.Black);
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (4)
27
private
Color
_color;
94
[DefaultValue(typeof(
Color
), "Black")]
95
public
Color
Color
454
private void UpdateColor(
Color
color)
System\Windows\Forms\Form.cs (31)
377
Properties.AddValue(s_propTransparencyKey,
Color
.Empty);
587
public override
Color
BackColor
593
Color
c = RawBackColor; // inheritedProperties.BackColor
1596
_formState[s_formStateLayered] = (TransparencyKey !=
Color
.Empty) ? 1 : 0;
2004
public
Color
TransparencyKey
2006
get => Properties.GetValueOrDefault(s_propTransparencyKey,
Color
.Empty);
2009
Properties.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue:
Color
.Empty);
2013
if (value !=
Color
.Empty)
2257
/// The <see cref="
Color
"/> which has be previously set using this property or <see cref="
Color
.Empty"/>.
2279
public
Color
FormBorderColor
2281
get => Properties.GetValueOrDefault(s_propFormBorderColor,
Color
.Empty);
2289
Properties.AddOrRemoveValue(s_propFormBorderColor, value, defaultValue:
Color
.Empty);
2319
/// The <see cref="
Color
"/>, which has be previously set using this property or <see cref="
Color
.Empty"/>.
2341
public
Color
FormCaptionBackColor
2343
get => Properties.GetValueOrDefault(s_propFormCaptionBackColor,
Color
.Empty);
2351
Properties.AddOrRemoveValue(s_propFormCaptionBackColor, value, defaultValue:
Color
.Empty);
2382
/// The <see cref="
Color
"/>, which has be previously set using this property or <see cref="
Color
.Empty"/>.
2404
public
Color
FormCaptionTextColor
2406
get => Properties.GetValueOrDefault(s_propFormCaptionTextColor,
Color
.Empty);
2414
Properties.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue:
Color
.Empty);
2441
private unsafe
Color
GetFormAttributeColorInternal(DWMWINDOWATTRIBUTE dmwWindowAttribute)
2454
private unsafe void SetFormAttributeColorInternal(DWMWINDOWATTRIBUTE dmwWindowAttribute,
Color
color)
4142
if (Properties.TryGetValue(s_propFormBorderColor, out
Color
? formBorderColor))
4147
if (Properties.TryGetValue(s_propFormCaptionBackColor, out
Color
? formCaptionBackColor))
4152
if (Properties.TryGetValue(s_propFormCaptionTextColor, out
Color
? formCaptionTextColor))
4956
private void ResetTransparencyKey() => TransparencyKey =
Color
.Empty;
5894
return !TransparencyKey.Equals(
Color
.Empty);
6044
Color
transparencyKey = TransparencyKey;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1346
if (BackColor ==
Color
.Transparent)
System\Windows\Forms\OwnerDrawPropertyBag.cs (4)
28
ForeColor = (
Color
)entry.Value!;
32
BackColor = (
Color
)entry.Value!;
43
public
Color
ForeColor { get; set; }
45
public
Color
BackColor { get; set; }
System\Windows\Forms\Printing\PrintPreviewControl.cs (4)
298
public override void ResetForeColor() => ForeColor =
Color
.White;
300
internal override bool ShouldSerializeForeColor() => !ForeColor.Equals(
Color
.White);
345
Color
backColor = GetBackColor(isHighContrast);
738
private
Color
GetBackColor(bool isHighContract)
System\Windows\Forms\Printing\PrintPreviewDialog.cs (3)
122
public override
Color
BackColor
315
public new
Color
TransparencyKey
539
public override
Color
ForeColor
System\Windows\Forms\Rendering\ControlPaint.cs (119)
28
private static
Color
t_focusPenColor; // the last background color the focus pen was created with
41
private static
Color
s_frameColorActive; // color of active frame brush
46
private static
Color
s_frameColorSelected; // color of selected frame brush
139
public static
Color
ContrastControlDark
148
public static unsafe IntPtr CreateHBitmap16Bit(Bitmap bitmap,
Color
background)
371
public static
Color
Dark(
Color
baseColor, float percOfDarkDark) => new HLSColor(baseColor).Darker(percOfDarkDark);
376
public static
Color
Dark(
Color
baseColor) => new HLSColor(baseColor).Darker(0.5f);
381
public static
Color
DarkDark(
Color
baseColor) => new HLSColor(baseColor).Darker(1.0f);
383
internal static bool IsDark(
Color
color) => color.GetBrightness() <= .5;
388
internal static bool IsDarker(
Color
c1,
Color
c2) => new HLSColor(c1).Luminosity < new HLSColor(c2).Luminosity;
401
DrawBorder(graphics, bounds,
Color
.FromKnownColor(KnownColor.WindowFrame), ButtonBorderStyle.Solid);
417
Color
backColor,
521
public static void DrawBorder(Graphics graphics, Rectangle bounds,
Color
color, ButtonBorderStyle style)
550
Color
leftColor, int leftWidth, ButtonBorderStyle leftStyle,
551
Color
topColor, int topWidth, ButtonBorderStyle topStyle,
552
Color
rightColor, int rightWidth, ButtonBorderStyle rightStyle,
553
Color
bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle)
569
Color
leftColor, int leftWidth, ButtonBorderStyle leftStyle,
570
Color
topColor, int topWidth, ButtonBorderStyle topStyle,
571
Color
rightColor, int rightWidth, ButtonBorderStyle rightStyle,
572
Color
bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle)
1055
private static void DrawBorderComplex(Graphics graphics, Rectangle bounds,
Color
color, ButtonBorderStyle style)
1143
Color
color,
1192
Color
.Empty,
1193
Color
.Empty);
1221
Color
.Empty,
1222
Color
.Empty);
1247
Color
.Empty,
1248
Color
.Empty);
1267
Color
.Empty,
1268
Color
.Empty);
1326
Color
foreground = ((state & ButtonState.Inactive) == ButtonState.Inactive)
1340
Color
foreground,
1373
g2.Clear(
Color
.Transparent);
1404
public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle,
Color
foreColor,
Color
backColor)
1407
internal static void DrawHighContrastFocusRectangle(Graphics graphics, Rectangle rectangle,
Color
color)
1410
internal static void DrawBlackWhiteFocusRectangle(Graphics graphics, Rectangle rectangle,
Color
color)
1413
private static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle,
Color
color, bool highContrast, bool blackAndWhite = false)
1433
Color
foreColor,
1434
Color
backColor)
1443
g2.Clear(
Color
.Transparent);
1451
if (foreColor ==
Color
.Empty || backColor ==
Color
.Empty)
1460
Span<(
Color
OldColor,
Color
NewColor)> map =
1462
new(
Color
.Black, foreColor),
1463
new(
Color
.White, backColor)
1510
public static void DrawGrid(Graphics graphics, Rectangle area, Size pixelsBetweenDots,
Color
backColor)
1531
Color
foreColor = (s_gridInvert) ?
Color
.White :
Color
.Black;
1559
Color
replaceBlack)
1564
attributes.SetColorMatrix(RemapBlackAndWhitePreserveTransparentMatrix(replaceBlack,
Color
.White));
1580
internal static void DrawImageReplaceColor(Graphics g, Image image, Rectangle dest,
Color
oldColor,
Color
newColor)
1584
(
Color
OldColor,
Color
NewColor) map = new(oldColor, newColor);
1585
attributes.SetRemapTable(ColorAdjustType.Bitmap, new ReadOnlySpan<(
Color
OldColor,
Color
NewColor)>(ref map));
1593
public static void DrawImageDisabled(Graphics graphics, Image image, int x, int y,
Color
background)
1712
Color
foreColor,
1713
Color
backColor) => DrawMenuGlyph(
1724
=> DrawFrameControl(graphics, x, y, width, height, DFC_TYPE.DFC_MENU, (DFCS_STATE)glyph,
Color
.Empty,
Color
.Empty);
1734
Color
foreColor,
1735
Color
backColor) => DrawFrameControl(
1756
Color
.Empty,
1757
Color
.Empty);
1776
Color
.Empty,
1777
Color
.Empty);
1785
public static void DrawReversibleFrame(Rectangle rectangle,
Color
backColor, FrameStyle style)
1788
Color
graphicsColor;
1793
graphicsColor =
Color
.White;
1798
graphicsColor =
Color
.Black;
1824
public static unsafe void DrawReversibleLine(Point start, Point end,
Color
backColor)
1860
Color
.Empty,
1861
Color
.Empty);
1872
Color
backColor)
1887
public static void DrawSizeGrip(Graphics graphics,
Color
backColor, Rectangle bounds)
1893
public static void DrawSizeGrip(Graphics graphics,
Color
backColor, int x, int y, int width, int height)
1914
Color
backColor,
1948
Color
color,
1980
Color
color,
1997
Color
color,
2009
Color
paintcolor = LightLight(color);
2035
public static void FillReversibleRectangle(Rectangle rectangle,
Color
backColor)
2074
private static int GetColorRop(
Color
color, int darkROP, int lightROP)
2080
private static Brush GetActiveBrush(
Color
backColor)
2082
Color
brushColor = backColor.GetBrightness() <= .5 ? SystemColors.ControlLight : SystemColors.ControlDark;
2104
bitmap.SetPixel(x, y,
Color
.Transparent);
2129
private static Pen GetFocusPen(
Color
baseColor, bool odds, bool highContrast, bool blackAndWhite)
2148
Color
color1 =
Color
.Transparent;
2149
Color
color2;
2157
color1 =
Color
.White;
2158
color2 =
Color
.Black;
2165
color2 =
Color
.Black;
2172
else if (baseColor ==
Color
.Transparent)
2174
color1 =
Color
.White;
2210
private static Brush GetSelectedBrush(
Color
backColor)
2212
Color
brushColor = backColor.GetBrightness() <= .5 ? SystemColors.ControlLight : SystemColors.ControlDark;
2234
bitmap.SetPixel(x, y,
Color
.Transparent);
2265
public static
Color
Light(
Color
baseColor, float percOfLightLight)
2271
public static
Color
Light(
Color
baseColor) => new HLSColor(baseColor).Lighter(0.5f);
2276
public static
Color
LightLight(
Color
baseColor) => new HLSColor(baseColor).Lighter(1.0f);
2408
internal static void InvertForeColorIfNeeded(Bitmap bitmap,
Color
backgroundColor)
2416
var
pixel = bitmap.GetPixel(x, y);
2429
internal static Bitmap CreateBitmapWithInvertedForeColor(Bitmap bitmap,
Color
backgroundColor)
2436
Color
pixel = bitmap.GetPixel(x, y);
2449
private static ColorMatrix RemapBlackAndWhitePreserveTransparentMatrix(
Color
replaceBlack,
Color
replaceWhite)
System\Windows\Forms\Rendering\ControlPaint.HLSColor.cs (7)
27
public HLSColor(
Color
color)
90
public
Color
Darker(float percDarker)
114
return
Color
.FromArgb(
146
public
Color
Lighter(float percentLighter)
165
return
Color
.FromArgb(
212
private static
Color
ColorFromHLS(int hue, int luminosity, int saturation)
246
return
Color
.FromArgb(r, g, b);
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (8)
21
private readonly
Color
_backColor;
26
private readonly
Color
_foreColor;
45
Color
foreColor,
46
Color
backColor)
71
Color
foreColor,
72
Color
backColor)
114
public
Color
ForeColor
117
public
Color
BackColor
System\Windows\Forms\Rendering\TextExtensions.cs (6)
47
/// <param name="backColor">If <see cref="
Color
.Empty"/>, the hdc current background color is used.</param>
48
/// <param name="foreColor">If <see cref="
Color
.Empty"/>, the hdc current foreground color is used.</param>
54
Color
foreColor,
56
Color
backColor = default)
58
if (text.IsEmpty || foreColor ==
Color
.Transparent)
72
BACKGROUND_MODE newBackGroundMode = (backColor.IsEmpty || backColor ==
Color
.Transparent)
System\Windows\Forms\Rendering\TextRenderer.cs (61)
25
public static void DrawText(IDeviceContext dc, string? text, Font? font, Point pt,
Color
foreColor)
26
=> DrawTextInternal(dc, text, font, pt, foreColor,
Color
.Empty);
35
/// <param name="foreColor">The <see cref="
Color
"/> to apply to the drawn text.</param>
37
public static void DrawText(IDeviceContext dc, ReadOnlySpan<char> text, Font font, Point pt,
Color
foreColor)
38
=> DrawTextInternal(dc, text, font, pt, foreColor,
Color
.Empty);
45
Color
foreColor,
46
Color
backColor)
56
/// <param name="foreColor">The <see cref="
Color
"/> to apply to the drawn text.</param>
57
/// <param name="backColor">The <see cref="
Color
"/> to apply to the background area of the drawn text.</param>
64
Color
foreColor,
65
Color
backColor)
73
Color
foreColor,
75
=> DrawTextInternal(dc, text, font, pt, foreColor,
Color
.Empty, flags);
85
/// <param name="foreColor">The <see cref="
Color
"/> to apply to the drawn text.</param>
96
Color
foreColor,
104
Color
.Empty,
112
Color
foreColor,
113
Color
backColor,
125
/// <param name="foreColor">The <see cref="
Color
"/> to apply to the drawn text.</param>
126
/// <param name="backColor">The <see cref="
Color
"/> to apply to the background area of the drawn text.</param>
137
Color
foreColor,
138
Color
backColor,
149
public static void DrawText(IDeviceContext dc, string? text, Font? font, Rectangle bounds,
Color
foreColor)
150
=> DrawTextInternal(dc, text, font, bounds, foreColor,
Color
.Empty);
159
/// <param name="foreColor">The <see cref="
Color
"/> to apply to the drawn text.</param>
166
Color
foreColor)
167
=> DrawTextInternal(dc, text, font, bounds, foreColor,
Color
.Empty);
174
Color
foreColor,
175
Color
backColor)
186
/// <param name="foreColor">The <see cref="
Color
"/> to apply to the drawn text.</param>
187
/// <param name="backColor">The <see cref="
Color
"/> to apply to the background area of the drawn text.</param>
194
Color
foreColor,
195
Color
backColor)
203
Color
foreColor,
205
=> DrawTextInternal(dc, text, font, bounds, foreColor,
Color
.Empty, flags);
215
/// <param name="foreColor">The <see cref="
Color
"/> to apply to the drawn text.</param>
226
Color
foreColor,
234
Color
.Empty,
242
Color
foreColor,
243
Color
backColor,
255
/// <param name="foreColor">The <see cref="
Color
"/> to apply to the drawn text.</param>
256
/// <param name="backColor">The <see cref="
Color
"/> to apply to the background area of the drawn text.</param>
267
Color
foreColor,
268
Color
backColor,
284
Color
foreColor,
285
Color
backColor,
294
Color
foreColor,
295
Color
backColor,
301
if (text.IsEmpty || foreColor ==
Color
.Transparent)
317
Color
foreColor,
319
=> DrawTextInternal(e, text, font, bounds, foreColor,
Color
.Empty, flags);
326
Color
foreColor,
327
Color
backColor,
350
Color
foreColor,
353
=> DrawTextInternal(hdc, text, font, bounds, foreColor, fontQuality,
Color
.Empty, flags);
360
Color
foreColor,
362
Color
backColor,
392
/// <see cref="DrawText(IDeviceContext, ReadOnlySpan{char}, Font?, Rectangle,
Color
, TextFormatFlags)"/>
396
/// versions of <see cref="DrawText(IDeviceContext, ReadOnlySpan{char}, Font, Point,
Color
)"/> and
548
internal static
Color
DisabledTextColor(
Color
backColor)
System\Windows\Forms\Scrolling\ScrollBar.cs (2)
76
public override
Color
BackColor
153
public override
Color
ForeColor
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (4)
13
private readonly
Color
_backColor;
14
private readonly
Color
_foreColor;
25
Color
backColor,
26
Color
foreColor,
System\Windows\Forms\ToolTip\ToolTip.cs (6)
43
private
Color
_backColor = SystemColors.Info;
44
private
Color
_foreColor = SystemColors.InfoText;
174
[DefaultValue(typeof(
Color
), "Info")]
175
public
Color
BackColor
238
[DefaultValue(typeof(
Color
), "InfoText")]
239
public
Color
ForeColor
System\Windows\Forms\VisualStyles\VisualStyleInformation.cs (2)
181
public static
Color
TextControlBorder => Application.RenderWithVisualStyles
188
public static
Color
ControlHighlightHot => Application.RenderWithVisualStyles
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
488
public
Color
GetColor(ColorProperty prop)
System.Windows.Forms.Design (200)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (2)
579
Color
backColor = SystemColors.Window;
580
Color
textColor = SystemColors.WindowText;
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (1)
20
BackColor =
Color
.Transparent,
System\ComponentModel\Design\DesignerActionPanel.cs (20)
66
if (uiService.Styles["VsColorPanelGradientDark"] is
Color
vsColorPanelGradientDarkColor)
71
if (uiService.Styles["VsColorPanelGradientLight"] is
Color
vsColorPanelGradientLight)
76
if (uiService.Styles["VsColorPanelHyperLink"] is
Color
vsColorPanelHyperLink)
81
if (uiService.Styles["VsColorPanelHyperLinkPressed"] is
Color
vsColorPanelHyperLinkPressed)
86
if (uiService.Styles["VsColorPanelTitleBar"] is
Color
vsColorPanelTitleBar)
91
if (uiService.Styles["VsColorPanelTitleBarUnselected"] is
Color
vsColorPanelTitleBarUnselected)
96
if (uiService.Styles["VsColorPanelTitleBarText"] is
Color
vsColorPanelTitleBarText)
101
if (uiService.Styles["VsColorPanelBorder"] is
Color
vsColorPanelBorder)
106
if (uiService.Styles["VsColorPanelSeparator"] is
Color
vsColorPanelSeparator)
111
if (uiService.Styles["VsColorPanelText"] is
Color
vsColorPanelText)
120
public
Color
ActiveLinkColor { get; } = SystemColors.HotTrack;
122
public
Color
BorderColor { get; } = SystemColors.ActiveBorder;
172
public
Color
GradientDarkColor { get; } = SystemColors.Control;
174
public
Color
GradientLightColor { get; } = SystemColors.Control;
178
public
Color
LinkColor { get; } = SystemColors.HotTrack;
180
public
Color
SeparatorColor { get; } = SystemColors.ControlDark;
182
public
Color
TitleBarColor { get; } = SystemColors.ActiveCaption;
184
public
Color
TitleBarTextColor { get; } = SystemColors.ActiveCaptionText;
186
public
Color
TitleBarUnselectedColor { get; } = SystemColors.InactiveCaption;
188
public
Color
LabelForeColor { get; } = SystemColors.ControlText;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
336
private void ShowDropDown(Control hostedControl,
Color
borderColor)
447
public DropDownHolder(Control hostedControl, Control parentControl,
Color
borderColor, Font font, EditorPropertyLine parent)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (5)
131
(
Color
OldColor,
Color
NewColor) map = new(
Color
.Black, SystemColors.WindowText);
132
attributes.SetRemapTable(ColorAdjustType.Bitmap, new ReadOnlySpan<(
Color
OldColor,
Color
NewColor)>(ref map));
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
18
public FlyoutDialog(Control hostedControl, Control parentControl,
Color
borderColor, Font font)
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (1)
23
BackColor =
Color
.Transparent,
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (3)
25
BackColor =
Color
.Transparent,
33
BackColor =
Color
.Transparent,
100
Color
backColor = (_formActive || ActionPanel._dropDownActive) ? ActionPanel.TitleBarColor : ActionPanel.TitleBarUnselectedColor;
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (2)
26
BackColor =
Color
.Transparent,
34
BackColor =
Color
.Transparent,
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (1)
22
BackColor =
Color
.Transparent,
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (4)
393
Color
cw = SystemColors.Window;
394
Color
ct = SystemColors.WindowText;
395
Color
c =
Color
.FromArgb((short)(ct.R * 0.3 + cw.R * 0.7), (short)(ct.G * 0.3 + cw.G * 0.7), (short)(ct.B * 0.3 + cw.B * 0.7));
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (2)
16
private readonly
Color
_color;
20
public ColorCellAccessibleObject(ColorPaletteAccessibleObject parent,
Color
color, int cell)
System\Drawing\Design\ColorEditor.ColorPalette.cs (11)
49
private readonly
Color
[] _staticColors;
50
private
Color
_selectedColor;
55
public ColorPalette(ColorUI colorUI,
Color
[] customColors)
76
_staticColors = new
Color
[TotalCells - CellsCustom];
86
public
Color
[] CustomColors { get; }
90
public
Color
SelectedColor
129
private Point GetCellFromColor(
Color
c)
145
private
Color
GetColorFromCell(int across, int down) => GetColorFromCell(Get1DFrom2D(across, down));
147
private
Color
GetColorFromCell(int index)
377
Color
color = GetColorFromCell(Get1DFrom2D(x, y));
414
private static void PaintValue(
Color
color, Graphics g, Rectangle rect)
System\Drawing\Design\ColorEditor.ColorUI.cs (22)
27
private
Color
[]? _systemColorConstants;
28
private
Color
[]? _colorConstants;
29
private
Color
[]? _customColors;
43
private
Color
[] ColorValues => _colorConstants ??= GetConstants(typeof(
Color
));
48
private
Color
[] CustomColors
54
_customColors = new
Color
[ColorPalette.CellsCustom];
57
_customColors[i] =
Color
.White;
73
private
Color
[] SystemColorValues => _systemColorConstants ??= GetConstants(typeof(SystemColors));
102
private
Color
GetBestColor(
Color
color)
104
Color
[] colors = ColorValues;
120
private static
Color
[] GetConstants(Type enumType)
125
List<
Color
> colorList = [];
130
if (prop.PropertyType != typeof(
Color
))
141
if (prop.GetValue(obj: null, index: null) is not
Color
outColor)
209
foreach (
Color
color in ColorValues)
215
foreach (
Color
color in SystemColorValues)
243
if (sender is ListBox lb && lb.SelectedItem is
Color
selectedColor)
258
Color
value = (
Color
)lb.Items[die.Index];
365
Color
[] values = ColorValues;
System\Drawing\Design\ColorEditor.cs (3)
31
if (_colorUI.Value is
Color
colorValue && colorValue !=
Color
.Empty)
49
if (e.Value is
Color
color)
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (2)
114
Color =
Color
.Empty;
130
Color =
Color
.FromArgb(red, green, blue);
System\Drawing\Design\ColorEditor.StandardColorComparer.cs (3)
11
private class StandardColorComparer : IComparer<
Color
>
16
public int Compare(
Color
left,
Color
right)
System\Drawing\Design\ColorEditor.SystemColorComparer.cs (3)
13
private class SystemColorComparer : IComparer<
Color
>
15
public int Compare(
Color
x,
Color
y)
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
127
if (uis.Styles["VsColorPanelText"] is
Color
color)
204
if (uis.Styles["VsColorPanelText"] is
Color
color)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (3)
29
private readonly Pen _baselinePen = new(
Color
.Fuchsia);
167
if (uiService.Styles["VsColorSnaplines"] is
Color
snaplinesColor)
173
if (uiService.Styles["VsColorSnaplinesTextBaseline"] is
Color
snaplinesTextBaselineColor)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
937
Color
backColor = primaryParent is not null ? primaryParent.BackColor :
Color
.Empty;
1022
g.Clear(
Color
.Chartreuse);
1025
((Bitmap)_dragImage).MakeTransparent(
Color
.Chartreuse);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
632
Color
backColor = targetControl.Parent is not null ? targetControl.Parent.BackColor :
Color
.Empty;
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (1)
94
_image.MakeTransparent(
Color
.Magenta);
System\Windows\Forms\Design\ComponentTray.cs (12)
123
Color
styleColor;
124
if (uiService.Styles["ArtboardBackground"] is
Color
backgroundColor)
130
else if (uiService.Styles["VsColorDesignerTray"] is
Color
designerTrayColor)
134
else if (uiService.Styles["HighlightColor"] is
Color
highlightColor)
147
if (uiService.Styles["ArtboardBackgroundText"] is
Color
backgroundTextColor)
151
else if (uiService.Styles["VsColorPanelText"] is
Color
panelTextColor)
1400
Color
styleColor;
1401
if (uiService.Styles["ArtboardBackground"] is
Color
backgroundColor)
1407
else if (uiService.Styles["VsColorDesignerTray"] is
Color
trayColor)
1411
else if (uiService.Styles["HighlightColor"] is
Color
highlightColor)
1443
selectionBorderBrush = new HatchBrush(HatchStyle.Percent50, SystemColors.HighlightText,
Color
.Transparent);
1447
selectionBorderBrush = new HatchBrush(HatchStyle.Percent50, SystemColors.ControlDarkDark,
Color
.Transparent);
System\Windows\Forms\Design\ControlDesigner.cs (1)
2280
using (Pen pen = new(
Color
.Red, penThickness))
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
81
s_selectedColumnsItemBitmap.MakeTransparent(
Color
.Red);
System\Windows\Forms\Design\DesignBindingPicker.cs (9)
165
addNewBitmap.MakeTransparent(
Color
.Magenta);
290
addNewBitmap.MakeTransparent(
Color
.Magenta);
407
if (uiService.Styles["VsColorPanelHyperLink"] is
Color
color1)
412
if (uiService.Styles["VsColorPanelHyperLinkPressed"] is
Color
color2)
1908
images.MakeTransparent(
Color
.Magenta);
1912
TransparentColor =
Color
.Magenta,
1924
TransparentColor =
Color
.Magenta,
1942
TransparentColor =
Color
.Magenta,
2261
images.Add(value,
Color
.Transparent);
System\Windows\Forms\Design\DesignerFrame.cs (2)
43
if (_uiService?.Styles["ArtboardBackground"] is
Color
color)
268
if (_uiService?.Styles["HorizontalResizeGrip"] is
Color
color)
System\Windows\Forms\Design\DesignerUtils.cs (15)
22
private static SolidBrush s_hoverBrush = new(
Color
.FromArgb(alpha: 50, SystemColors.Highlight));
167
s_hoverBrush = new SolidBrush(
Color
.FromArgb(50, SystemColors.Highlight));
188
private static void DrawDragBorder(Graphics g, Size imageSize, int borderSize,
Color
backColor)
191
if (backColor !=
Color
.Empty && backColor.GetBrightness() < .5)
212
public static void DrawResizeBorder(Graphics g, Region resizeBorder,
Color
backColor)
215
if (backColor !=
Color
.Empty && backColor.GetBrightness() < .5)
226
public static void DrawFrame(Graphics g, Region resizeBorder, FrameStyle style,
Color
backColor)
228
Color
color = SystemColors.ControlDarkDark;
229
if (backColor !=
Color
.Empty && backColor.GetBrightness() < .5)
236
FrameStyle.Dashed => new HatchBrush(HatchStyle.Percent50, color,
Color
.Transparent),
312
public static void GenerateSnapShot(Control control, out Bitmap image, int borderSize, double opacity,
Color
backColor)
396
if (control.BackColor ==
Color
.Transparent)
428
if (control.BackColor ==
Color
.Transparent)
438
Color
testColor =
Color
.FromArgb(255, 252, 186, 238);
System\Windows\Forms\Design\DocumentDesigner.cs (4)
127
private
Color
BackColor
678
if (backProp is not null && backProp.PropertyType == typeof(
Color
) && !backProp.ShouldSerializeValue(Component))
1326
BackColor =
Color
.Empty;
1364
if (!ShadowProperties.Contains(nameof(BackColor)) || ((
Color
)ShadowProperties[nameof(BackColor)]).IsEmpty)
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (2)
440
var
backColor = Control.BackColor;
441
if (backColor !=
Color
.Empty && backColor.GetBrightness() < .5)
System\Windows\Forms\Design\ImageListDesigner.cs (2)
70
private
Color
TransparentColor
81
private bool ShouldSerializeTransparentColor() => !TransparentColor.Equals(
Color
.LightGray);
System\Windows\Forms\Design\OleDragDropHandler.cs (5)
342
Color
backColor = SystemColors.Control;
410
private static void DrawReversibleFrame(HWND handle, Rectangle rectangle,
Color
backColor)
424
Color
graphicsColor;
429
graphicsColor =
Color
.White;
434
graphicsColor =
Color
.Black;
System\Windows\Forms\Design\PanelDesigner.cs (1)
72
Color
penColor = Control.BackColor.GetBrightness() < .5 ?
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
34
Color
penColor;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (1)
138
Color
borderColor = SystemColors.Control;
System\Windows\Forms\Design\SplitterDesigner.cs (3)
31
Color
penColor = control.BackColor.GetBrightness() < .5 ?
Color
.White :
Color
.Black;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (4)
149
Color
penColor = control.BackColor.GetBrightness() < .5 ? ControlPaint.Light(control.BackColor) : ControlPaint.Dark(control.BackColor);
184
Color
waterMarkTextColor =
Color
.Black;
186
if (uis?.Styles["SmartTagText"] is
Color
clr)
System\Windows\Forms\Design\StandardCommandToolStripMenuItem.cs (1)
90
ImageTransparentColor =
Color
.Magenta;
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
182
item.ImageTransparentColor =
Color
.Magenta;
349
item.ImageTransparentColor =
Color
.Magenta;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
363
if (uis.Styles["VsColorPanelText"] is
Color
color)
System\Windows\Forms\Design\TabOrder.cs (2)
215
Color
backColor = hoverParent.BackColor;
265
Color
textColor;
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
107
imageTransProperty?.SetValue(component,
Color
.Magenta);
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
629
imageTransProperty?.SetValue(item,
Color
.Magenta);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
394
if (uis.Styles["VsColorPanelText"] is
Color
color)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
926
using Pen p = new(new SolidBrush(
Color
.Black));
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (5)
76
item.ImageTransparentColor =
Color
.Magenta;
124
ImageTransparentColor =
Color
.Magenta
178
if (panelTextObject is
Color
panelTextColor)
219
_editItemsToolStripMenuItem.ImageTransparentColor =
Color
.Magenta;
541
ChangeProperty(component, "ImageTransparentColor",
Color
.Magenta);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
837
imageTransProperty?.SetValue(newItem,
Color
.Magenta);
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (3)
46
Color
penColor = Control.BackColor.GetBrightness() < .5 ?
473
using Brush brush = new SolidBrush(
Color
.FromArgb(50,
Color
.White));
System\Windows\Forms\Design\ToolStripTemplateNode.cs (18)
1442
_addItemButton.ImageTransparentColor =
Color
.Lime;
1781
private readonly
Color
_selectedBorderColor;
1782
private readonly
Color
_defaultBorderColor;
1783
private readonly
Color
_dropDownMouseOverColor;
1784
private readonly
Color
_dropDownMouseDownColor;
1785
private readonly
Color
_toolStripBorderColor;
1793
_selectedBorderColor =
Color
.FromArgb(46, 106, 197);
1794
_defaultBorderColor =
Color
.FromArgb(171, 171, 171);
1795
_dropDownMouseOverColor =
Color
.FromArgb(193, 210, 238);
1796
_dropDownMouseDownColor =
Color
.FromArgb(152, 181, 226);
1797
_toolStripBorderColor =
Color
.White;
1815
DrawArrow(new ToolStripArrowRenderEventArgs(g, null, bounds, SystemInformation.HighContrast ?
Color
.Black : SystemColors.ControlText, ArrowDirection.Down));
1827
using (LinearGradientBrush brush = new(bounds,
Color
.White, _defaultBorderColor, LinearGradientMode.Vertical))
1910
borderPen.Color =
Color
.Black;
1930
borderPen.Color =
Color
.Black;
1939
borderPen.Color =
Color
.Black;
1949
borderPen.Color =
Color
.Black;
2047
e.TextColor =
Color
.Black;
System.Windows.Forms.Design.Tests (16)
EnsureEditorsTests.cs (1)
48
[InlineData(typeof(
Color
), typeof(ColorEditor))]
System\Drawing\Design\ColorEditorTests.cs (2)
24
yield return new object[] {
Color
.Empty };
25
yield return new object[] {
Color
.Red };
System\Drawing\Design\ImageEditorTests.cs (6)
163
otherImage.SetPixel(0, 0,
Color
.Red);
164
otherImage.SetPixel(1, 0,
Color
.Red);
165
otherImage.SetPixel(2, 0,
Color
.Red);
166
otherImage.SetPixel(0, 1,
Color
.Red);
167
otherImage.SetPixel(1, 1,
Color
.Red);
168
otherImage.SetPixel(2, 1,
Color
.Red);
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (1)
325
bitmap.SetPixel(0, 0,
Color
.Red);
System\Windows\Forms\Design\DataGridViewCellStyleBuilderTests.cs (2)
21
builder.CellStyle = new DataGridViewCellStyle { BackColor =
Color
.Red };
25
result.BackColor.Should().Be(
Color
.Red);
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (4)
49
Color
backColor = (
Color
)inheritedPropertyDescriptor.GetValue(control);
52
inheritedPropertyDescriptor.SetValue(control,
Color
.Purple);
53
backColor = (
Color
)inheritedPropertyDescriptor.GetValue(control);
System.Windows.Forms.Primitives (43)
System\Drawing\ColorExtensions.cs (1)
8
public static int ToWin32(this
Color
color) => ColorTranslator.ToWin32(color);
System\Windows\Forms\DeviceContextExtensions.cs (6)
98
internal static
Color
FindNearestColor(this DeviceContextHdcScope hdc,
Color
color) => FindNearestColor(hdc.HDC, color);
109
/// state that would otherwise be stripped, notably things like <see cref="
Color
.IsKnownColor"/> which allows
117
internal static
Color
FindNearestColor(this HDC hdc,
Color
color)
119
Color
newColor = ColorTranslator.FromWin32((int)PInvoke.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(color)).Value);
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (7)
27
private static PenCache.Scope GetPenScope(
Color
color)
44
private static SolidBrushCache.Scope GetSolidBrushScope(
Color
color)
73
internal static PenCache.Scope GetCachedPenScope(this
Color
color) => GetPenScope(color);
75
/// <inheritdoc cref="GetCachedPenScope(
Color
)"/>
76
internal static PenCache.Scope GetCachedPenScope(this
Color
color, int width)
79
/// <inheritdoc cref="GetCachedPenScope(
Color
)"/>
80
internal static SolidBrushCache.Scope GetCachedSolidBrushScope(this
Color
color) => GetSolidBrushScope(color);
System\Windows\Forms\GdiPlus\PenCache.cs (5)
8
internal sealed class PenCache : RefCountedCache<Pen,
Color
,
Color
>
12
protected override CacheEntry CreateEntry(
Color
key, bool cached) => new PenCacheEntry(key, cached);
13
protected override bool IsMatch(
Color
key, CacheEntry entry) => key == entry.Data;
18
public PenCacheEntry(
Color
color, bool cached) : base(color, cached) => _pen = new Pen(color);
System\Windows\Forms\GdiPlus\SolidBrushCache.cs (5)
8
internal sealed class SolidBrushCache : RefCountedCache<SolidBrush,
Color
,
Color
>
12
protected override CacheEntry CreateEntry(
Color
key, bool cached) => new SolidBrushCacheEntry(key, cached);
13
protected override bool IsMatch(
Color
key, CacheEntry data) => key == data.Data;
18
public SolidBrushCacheEntry(
Color
color, bool cached) : base(color, cached)
System\Windows\Forms\RefCountedCache.Scope.cs (1)
24
/// See <see cref="GdiPlusCache.GetSolidBrushScope(Drawing.
Color
)"/> for an example.
System\Windows\Forms\SystemDrawingExtensions.cs (18)
17
/// Similar to <see cref="Graphics.GetNearestColor(
Color
)"/>, but this retains the original color if the color
24
/// state that would otherwise be stripped, notably things like <see cref="
Color
.IsKnownColor"/> which allows
32
internal static
Color
FindNearestColor(this Graphics graphics,
Color
color)
34
Color
newColor = graphics.GetNearestColor(color);
41
internal static bool HasTransparency(this
Color
color) => color.A != byte.MaxValue;
46
internal static bool IsFullyTransparent(this
Color
color) => color.A == 0;
68
internal static
Color
MixColor(this
Color
color1,
Color
color2)
74
return
Color
.FromArgb(
84
internal static
Color
InvertColor(this
Color
color)
87
return
Color
.FromArgb(argb.A, (byte)~argb.R, (byte)~argb.G, (byte)~argb.B);
94
internal static Pen CreateStaticPen(this
Color
color, DashStyle dashStyle)
105
? new Pen(
Color
.FromArgb(color.ToArgb())) { DashStyle = dashStyle }
119
internal static SolidBrush CreateStaticBrush(this
Color
color)
121
? new SolidBrush(
Color
.FromArgb(color.ToArgb()))
System.Windows.Forms.Primitives.Tests (13)
Interop\GdiPlus\ARGBTests.cs (6)
30
public void ToFromColor(
Color
color)
34
Color
backAgain = argb;
38
public static TheoryData<
Color
> Colors =>
41
Color
.CornflowerBlue,
42
Color
.Transparent,
43
Color
.BurlyWood
System\Windows\Forms\DeviceContextScopeTests.cs (2)
64
using CreateBrushScope blueBrush = new(
Color
.Blue);
65
using CreateBrushScope redBrush = new(
Color
.Red);
System\Windows\Forms\RefCacheTests.cs (5)
79
internal sealed class IntColorCache : RefCountedCache<
Color
,
Color
, int>
84
=> new ColorCacheEntry(
Color
.FromArgb(key), cached);
90
public ColorCacheEntry(
Color
color, bool cached) : base(color, cached) { }
91
public override
Color
Object => Data;
System.Windows.Forms.Primitives.TestUtilities (15)
Metafiles\Validators\BrushColorValidator.cs (2)
12
private readonly
Color
_brushColor;
13
public BrushColorValidator(
Color
brushColor) => _brushColor = brushColor;
Metafiles\Validators\BrushValidator.cs (2)
12
private readonly
Color
_brushColor;
15
public BrushValidator(
Color
brushColor, BRUSH_STYLE brushStyle)
Metafiles\Validators\PenColorValidator.cs (2)
12
private readonly
Color
_penColor;
13
public PenColorValidator(
Color
penColor) => _penColor = penColor;
Metafiles\Validators\PenValidator.cs (2)
14
private readonly
Color
_penColor;
16
public PenValidator(int penWidth,
Color
penColor, PEN_STYLE penStyle)
Metafiles\Validators\State.cs (5)
14
internal static IStateValidator Brush(
Color
brushColor, BRUSH_STYLE brushStyle)
16
internal static IStateValidator BrushColor(
Color
brushColor) => new BrushColorValidator(brushColor);
20
internal static IStateValidator Pen(int penWidth,
Color
penColor, PEN_STYLE penStyle)
22
internal static IStateValidator PenColor(
Color
penColor) => new PenColorValidator(penColor);
26
internal static IStateValidator TextColor(
Color
textColor) => new TextColorValidator(textColor);
Metafiles\Validators\TextColorValidator.cs (2)
12
private readonly
Color
_textColor;
13
public TextColorValidator(
Color
textColor) => _textColor = textColor;
System.Windows.Forms.Tests (4298)
CheckedListBoxTests.cs (12)
405
yield return new object[] { null, Rectangle.Empty, 0, DrawItemState.Default,
Color
.Red,
Color
.Blue };
406
yield return new object[] { null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.None,
Color
.Red,
Color
.Blue };
407
yield return new object[] { null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Checked,
Color
.Red,
Color
.Blue };
408
yield return new object[] { new Font("Arial", 8.25f), new Rectangle(10, 20, 30, 40), 1, DrawItemState.Default,
Color
.Red,
Color
.Blue };
413
public void CheckedListBox_OnDrawItem_Invoke_Success(Font font, Rectangle rect, int index, DrawItemState state,
Color
foreColor,
Color
backColor)
428
public void CheckedListBox_OnDrawItem_InvokeWithHandle_Success(Font font, Rectangle rect, int index, DrawItemState state,
Color
foreColor,
Color
backColor)
SerializableTypesTests.cs (13)
78
TransparentColor =
Color
.White
165
ForeColor =
Color
.White,
166
BackColor =
Color
.Black,
188
Assert.Equal(
Color
.Black, result.BackColor);
189
Assert.Equal(
Color
.White, result.ForeColor);
213
foreColor:
Color
.White,
214
backColor:
Color
.Black,
237
Assert.Equal(
Color
.White, result.ForeColor);
238
Assert.Equal(
Color
.Black, result.BackColor);
352
BackColor =
Color
.Yellow, // Colors and Font are serialized into the property bag.
353
ForeColor =
Color
.Green,
378
Assert.Equal(
Color
.Yellow, result.BackColor);
379
Assert.Equal(
Color
.Green, result.ForeColor);
System\Windows\Forms\AbstractButtonBaseTests.cs (3)
17
control.Invoking(y => y.FlatAppearance.BorderColor =
Color
.Transparent)
34
Color
expectedColor =
Color
.FromArgb(red, green, blue);
System\Windows\Forms\AmbientPropertiesTests.cs (4)
16
Assert.Equal(
Color
.Empty, property.BackColor);
19
Assert.Equal(
Color
.Empty, property.ForeColor);
24
public void BackColor_Set_GetReturnsExpected(
Color
value)
69
public void ForeColor_Set_GetReturnsExpected(
Color
value)
System\Windows\Forms\AxHostTests.cs (8)
290
public void AxHost_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
535
public void AxHost_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1608
original.SetPixel(1, 2,
Color
.FromArgb(unchecked((int)0xFF010203)));
1626
Assert.Equal(
Color
.FromArgb(unchecked((int)0xFF010203)), original.GetPixel(1, 2));
1668
original.SetPixel(1, 2,
Color
.FromArgb(unchecked((int)0xFF010203)));
1691
Assert.Equal(
Color
.FromArgb(unchecked((int)0xFF010203)), original.GetPixel(1, 2));
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (1)
74
Color
.Red
System\Windows\Forms\ButtonBaseTests.cs (26)
503
public void ButtonBase_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
520
public void ButtonBase_BackColor_SetWithUseVisualStyleBackColor_GetReturnsExpected(
Color
value,
Color
expected)
540
public void ButtonBase_BackColor_SetDesignMode_GetReturnsExpected(
Color
value,
Color
expected)
586
public void ButtonBase_BackColor_SetDesignModeWithUseVisualStyleBackColor_GetReturnsExpected(
Color
value,
Color
expected)
632
public void ButtonBase_BackColor_SetDesignModeWithInvalidDescriptor_GetReturnsExpected(
Color
value,
Color
expected)
694
yield return new object[] {
Color
.Red,
Color
.Red, 2 };
695
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 1 };
700
public void ButtonBase_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
741
control.BackColor =
Color
.Red;
742
Assert.Equal(
Color
.Red, control.BackColor);
746
control.BackColor =
Color
.Red;
747
Assert.Equal(
Color
.Red, control.BackColor);
751
control.BackColor =
Color
.Empty;
757
control.BackColor =
Color
.Red;
758
Assert.Equal(
Color
.Red, control.BackColor);
1032
Assert.Equal(
Color
.Empty, appearance.BorderColor);
1034
Assert.Equal(
Color
.Empty, appearance.CheckedBackColor);
1035
Assert.Equal(
Color
.Empty, appearance.MouseDownBackColor);
1036
Assert.Equal(
Color
.Empty, appearance.MouseOverBackColor);
System\Windows\Forms\ButtonRenderingTests.cs (1)
243
State.PenColor(
Color
.Black),
System\Windows\Forms\ClipboardTests.cs (4)
425
bitmap.SetPixel(1, 2,
Color
.FromArgb(0x01, 0x02, 0x03, 0x04));
429
result.GetPixel(1, 2).Should().Be(
Color
.FromArgb(0xFF, 0xD2, 0xD2, 0xD2));
489
Clipboard.SetData(format,
Color
.Black);
492
Clipboard.GetData(format).Should().Be(
Color
.Black);
System\Windows\Forms\ColorDialogTests.cs (19)
18
Assert.Equal(
Color
.Black, dialog.Color);
42
Assert.Equal(
Color
.Empty, dialog.Color);
107
yield return new object[] {
Color
.Empty,
Color
.Black };
108
yield return new object[] {
Color
.Red,
Color
.Red };
113
public void ColorDialog_Color_Set_GetReturnsExpected(
Color
value,
Color
expected)
128
public void ColorDialog_Color_SetWithCustomOldValue_GetReturnsExpected(
Color
value,
Color
expected)
132
Color =
Color
.Blue
150
dialog.Color =
Color
.Red;
151
Assert.Equal(
Color
.Red, dialog.Color);
155
Assert.Equal(
Color
.Black, dialog.Color);
166
dialog.Color =
Color
.Red;
167
Assert.Equal(
Color
.Red, dialog.Color);
171
Assert.Equal(
Color
.Black, dialog.Color);
327
Color =
Color
.Red,
339
Assert.Equal(
Color
.Black, dialog.Color);
System\Windows\Forms\ComboBoxTests.cs (54)
165
yield return new object[] {
Color
.Empty, SystemColors.Window };
166
yield return new object[] {
Color
.Red,
Color
.Red };
171
public void ComboBox_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
188
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
189
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
194
public void ComboBox_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
255
control.BackColor =
Color
.Red;
256
Assert.Equal(
Color
.Red, control.BackColor);
260
control.BackColor =
Color
.Red;
261
Assert.Equal(
Color
.Red, control.BackColor);
265
control.BackColor =
Color
.Empty;
271
control.BackColor =
Color
.Red;
272
Assert.Equal(
Color
.Red, control.BackColor);
283
control.BackColor =
Color
.Red;
284
Assert.Equal(
Color
.Red, control.BackColor);
299
control.BackColor =
Color
.Red;
300
Assert.Equal(
Color
.Red, control.BackColor);
1047
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1048
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1049
yield return new object[] {
Color
.White,
Color
.White };
1050
yield return new object[] {
Color
.Black,
Color
.Black };
1051
yield return new object[] {
Color
.Red,
Color
.Red };
1056
public void ComboBox_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1073
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1074
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1075
yield return new object[] {
Color
.White,
Color
.White, 1 };
1076
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1077
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1082
public void ComboBox_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1123
control.ForeColor =
Color
.Red;
1124
Assert.Equal(
Color
.Red, control.ForeColor);
1128
control.ForeColor =
Color
.Red;
1129
Assert.Equal(
Color
.Red, control.ForeColor);
1133
control.ForeColor =
Color
.Empty;
1139
control.ForeColor =
Color
.Red;
1140
Assert.Equal(
Color
.Red, control.ForeColor);
1151
control.ForeColor =
Color
.Red;
1152
Assert.Equal(
Color
.Red, control.ForeColor);
1167
control.ForeColor =
Color
.Red;
1168
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\Control.ActiveXImplTests.cs (3)
20
control.BackColor =
Color
.Bisque;
27
control.BackColor =
Color
.Honeydew;
32
Assert.Equal(
Color
.Bisque, control.BackColor);
System\Windows\Forms\ControlPaintTests.cs (1123)
13
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed),
Color
.Empty };
14
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
Color
.Empty };
15
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
Color
.Empty };
16
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed),
Color
.Red };
17
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
Color
.Red };
18
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
Color
.Red };
19
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed),
Color
.Transparent };
20
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
Color
.Transparent };
21
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
Color
.Transparent };
22
yield return new object[] { new Bitmap(11, 11, PixelFormat.Format1bppIndexed),
Color
.Red };
23
yield return new object[] { new Bitmap(11, 11, PixelFormat.Format32bppRgb),
Color
.Red };
24
yield return new object[] { new Bitmap(11, 11, PixelFormat.Format32bppArgb),
Color
.Red };
25
yield return new object[] { new Bitmap(16, 24, PixelFormat.Format1bppIndexed),
Color
.Red };
26
yield return new object[] { new Bitmap(16, 24, PixelFormat.Format32bppRgb),
Color
.Red };
27
yield return new object[] { new Bitmap(16, 24, PixelFormat.Format32bppArgb),
Color
.Red };
32
public void ControlPaint_CreateHBitmap16Bit_Invoke_ReturnsExpected(Bitmap bitmap,
Color
background)
55
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 50, 100, 150));
56
bitmap.SetPixel(1, 0,
Color
.FromArgb(1, 50, 100, 150));
57
bitmap.SetPixel(2, 0,
Color
.FromArgb(0, 50, 100, 150));
59
HBITMAP hBitmap = (HBITMAP)ControlPaint.CreateHBitmap16Bit(bitmap,
Color
.Red);
69
Assert.Equal(
Color
.FromArgb(255, 49, 99, 148), result.GetPixel(0, 0));
70
Assert.Equal(
Color
.FromArgb(255, 255, 0, 0), result.GetPixel(1, 0));
71
Assert.Equal(
Color
.FromArgb(255, 255, 0, 0), result.GetPixel(2, 0));
82
Assert.Throws<ArgumentNullException>(() => ControlPaint.CreateHBitmap16Bit(null,
Color
.Red));
126
mask.SetPixel(0, 0,
Color
.FromArgb(255, 255, 0, 0));
127
mask.SetPixel(1, 0,
Color
.FromArgb(255, 0, 255, 0));
128
mask.SetPixel(2, 0,
Color
.FromArgb(0, 0, 0, 255));
133
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 50, 100, 150));
134
bitmap.SetPixel(1, 0,
Color
.FromArgb(1, 50, 100, 150));
135
bitmap.SetPixel(2, 0,
Color
.FromArgb(0, 50, 100, 150));
147
Assert.Equal(
Color
.FromArgb(255, 0, 100, 150), result.GetPixel(0, 0));
148
Assert.Equal(
Color
.FromArgb(255, 210, 0, 211), result.GetPixel(1, 0));
149
Assert.Equal(
Color
.FromArgb(255, 0, 0, 0), result.GetPixel(2, 0));
166
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 50, 100, 150));
167
bitmap.SetPixel(1, 0,
Color
.FromArgb(1, 50, 100, 150));
168
bitmap.SetPixel(2, 0,
Color
.FromArgb(0, 50, 100, 150));
180
Assert.Equal(
Color
.FromArgb(255, 50, 100, 150), result.GetPixel(0, 0));
181
Assert.Equal(
Color
.FromArgb(255, 210, 210, 211), result.GetPixel(1, 0));
182
Assert.Equal(
Color
.FromArgb(255, 211, 211, 211), result.GetPixel(2, 0));
221
Assert.Equal(new
Color
[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 255, 255, 255) }, result.Palette.Entries);
234
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 50, 100, 150));
235
bitmap.SetPixel(1, 0,
Color
.FromArgb(1, 50, 100, 150));
236
bitmap.SetPixel(2, 0,
Color
.FromArgb(0, 50, 100, 150));
246
Assert.Equal(new
Color
[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 255, 255, 255) }, result.Palette.Entries);
248
Assert.Equal(
Color
.FromArgb(255, 0, 0, 0), result.GetPixel(0, 0));
249
Assert.Equal(
Color
.FromArgb(255, 0, 0, 0), result.GetPixel(1, 0));
250
Assert.Equal(
Color
.FromArgb(255, 255, 255, 255), result.GetPixel(2, 0));
266
yield return new object[] {
Color
.White,
Color
.FromArgb(255, 0, 0, 0) };
267
yield return new object[] {
Color
.Black,
Color
.FromArgb(255, 255, 255, 255) };
272
public void ControlPaint_CreateBitmapWithInvertedForeColor(
Color
imageColor,
Color
expected)
277
using Bitmap invertedBitmap = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap,
Color
.LightGray);
278
Color
newColor = invertedBitmap.GetPixel(0, 0);
285
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0),
Color
.FromArgb(255, 85, 0, 0) };
286
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0),
Color
.FromArgb(255, 0, 85, 0) };
287
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 0, 0, 85) };
288
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 85, 85, 0) };
289
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255),
Color
.FromArgb(255, 85, 0, 85) };
290
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255),
Color
.FromArgb(255, 0, 85, 85) };
291
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255),
Color
.FromArgb(255, 85, 85, 85) };
292
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0),
Color
.FromArgb(255, 0, 28, 0) };
293
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0),
Color
.FromArgb(255, 0, 9, 0) };
294
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0),
Color
.FromArgb(255, 0, 2, 0) };
295
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0),
Color
.FromArgb(255, 0, 0, 0) };
296
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 0, 0, 0) };
297
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200),
Color
.FromArgb(255, 41, 14, 67) };
298
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255),
Color
.FromArgb(255, 151, 0, 151) };
299
yield return new object[] { SystemColors.ControlDarkDark,
Color
.FromArgb(255, 35, 35, 35) };
300
yield return new object[] { SystemColors.ControlDark,
Color
.FromArgb(255, 53, 53, 53) };
301
yield return new object[] { SystemColors.Control,
Color
.FromArgb(255, 133, 133, 133) };
302
yield return new object[] { SystemColors.ControlLight,
Color
.FromArgb(255, 75, 75, 75) };
303
yield return new object[] { SystemColors.ControlLightLight,
Color
.FromArgb(255, 85, 85, 85) };
308
public void ControlPaint_Dark_InvokeColor_ReturnsExpected(
Color
baseColor,
Color
expected)
318
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -1.5f,
Color
.FromArgb(255, 255, 170, 170) };
319
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -1.5f,
Color
.FromArgb(255, 170, 255, 170) };
320
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -1.5f,
Color
.FromArgb(255, 170, 170, 255) };
321
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -1.5f,
Color
.FromArgb(255, 255, 255, 170) };
322
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -1.5f,
Color
.FromArgb(255, 255, 170, 255) };
323
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -1.5f,
Color
.FromArgb(255, 170, 255, 255) };
324
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -1.5f,
Color
.FromArgb(255, 169, 169, 169) };
325
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -1.5f,
Color
.FromArgb(255, 0, 138, 0) };
326
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -1.5f,
Color
.FromArgb(255, 0, 43, 0) };
327
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -1.5f,
Color
.FromArgb(255, 0, 11, 0) };
328
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -1.5f,
Color
.FromArgb(255, 0, 0, 0) };
329
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -1.5f,
Color
.FromArgb(255, 0, 0, 0) };
330
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -1.5f,
Color
.FromArgb(255, 201, 162, 236) };
331
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -1.5f,
Color
.FromArgb(255, 255, 243, 0) };
332
yield return new object[] { SystemColors.ControlDarkDark, -1.5f,
Color
.FromArgb(255, 175, 175, 175) };
333
yield return new object[] { SystemColors.ControlDark, -1.5f,
Color
.FromArgb(255, 9, 9, 9) };
334
yield return new object[] { SystemColors.Control, -1.5f,
Color
.FromArgb(255, 242, 242, 242) };
335
yield return new object[] { SystemColors.ControlLight, -1.5f,
Color
.FromArgb(255, 121, 121, 121) };
336
yield return new object[] { SystemColors.ControlLightLight, -1.5f,
Color
.FromArgb(255, 169, 169, 169) };
338
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -1f,
Color
.FromArgb(255, 255, 85, 85) };
339
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -1f,
Color
.FromArgb(255, 85, 255, 85) };
340
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -1f,
Color
.FromArgb(255, 85, 85, 255) };
341
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -1f,
Color
.FromArgb(255, 255, 255, 85) };
342
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -1f,
Color
.FromArgb(255, 255, 85, 255) };
343
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -1f,
Color
.FromArgb(255, 85, 255, 255) };
344
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -1f,
Color
.FromArgb(255, 84, 84, 84) };
345
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -1f,
Color
.FromArgb(255, 0, 111, 0) };
346
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -1f,
Color
.FromArgb(255, 0, 34, 0) };
347
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -1f,
Color
.FromArgb(255, 0, 9, 0) };
348
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -1f,
Color
.FromArgb(255, 0, 0, 0) };
349
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -1f,
Color
.FromArgb(255, 0, 0, 0) };
350
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -1f,
Color
.FromArgb(255, 163, 96, 223) };
351
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -1f,
Color
.FromArgb(255, 255, 93, 0) };
352
yield return new object[] { SystemColors.ControlDarkDark, -1f,
Color
.FromArgb(255, 140, 140, 140) };
353
yield return new object[] { SystemColors.ControlDark, -1f,
Color
.FromArgb(255, 212, 212, 212) };
354
yield return new object[] { SystemColors.Control, -1f,
Color
.FromArgb(255, 215, 215, 215) };
355
yield return new object[] { SystemColors.ControlLight, -1f,
Color
.FromArgb(255, 45, 45, 45) };
356
yield return new object[] { SystemColors.ControlLightLight, -1f,
Color
.FromArgb(255, 84, 84, 84) };
358
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -0.5f,
Color
.FromArgb(255, 255, 0, 0) };
359
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -0.5f,
Color
.FromArgb(255, 0, 255, 0) };
360
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -0.5f,
Color
.FromArgb(255, 0, 0, 255) };
361
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -0.5f,
Color
.FromArgb(255, 255, 255, 0) };
362
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -0.5f,
Color
.FromArgb(255, 255, 0, 255) };
363
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -0.5f,
Color
.FromArgb(255, 0, 255, 255) };
364
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -0.5f,
Color
.FromArgb(255, 255, 255, 255) };
365
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -0.5f,
Color
.FromArgb(255, 0, 83, 0) };
366
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -0.5f,
Color
.FromArgb(255, 0, 26, 0) };
367
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -0.5f,
Color
.FromArgb(255, 0, 6, 0) };
368
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -0.5f,
Color
.FromArgb(255, 0, 0, 0) };
369
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -0.5f,
Color
.FromArgb(255, 0, 0, 0) };
370
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -0.5f,
Color
.FromArgb(255, 123, 39, 199) };
371
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -0.5f,
Color
.FromArgb(255, 255, 198, 255) };
372
yield return new object[] { SystemColors.ControlDarkDark, -0.5f,
Color
.FromArgb(255, 105, 105, 105) };
373
yield return new object[] { SystemColors.ControlDark, -0.5f,
Color
.FromArgb(255, 159, 159, 159) };
374
yield return new object[] { SystemColors.Control, -0.5f,
Color
.FromArgb(255, 187, 187, 187) };
375
yield return new object[] { SystemColors.ControlLight, -0.5f,
Color
.FromArgb(255, 226, 226, 226) };
376
yield return new object[] { SystemColors.ControlLightLight, -0.5f,
Color
.FromArgb(255, 255, 255, 255) };
378
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -0.25f,
Color
.FromArgb(255, 213, 0, 0) };
379
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -0.25f,
Color
.FromArgb(255, 0, 213, 0) };
380
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -0.25f,
Color
.FromArgb(255, 0, 0, 213) };
381
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -0.25f,
Color
.FromArgb(255, 213, 213, 0) };
382
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -0.25f,
Color
.FromArgb(255, 213, 0, 213) };
383
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -0.25f,
Color
.FromArgb(255, 0, 213, 213) };
384
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -0.25f,
Color
.FromArgb(255, 212, 212, 212) };
385
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -0.25f,
Color
.FromArgb(255, 0, 68, 0) };
386
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -0.25f,
Color
.FromArgb(255, 0, 21, 0) };
387
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -0.25f,
Color
.FromArgb(255, 0, 4, 0) };
388
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -0.25f,
Color
.FromArgb(255, 0, 0, 0) };
389
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -0.25f,
Color
.FromArgb(255, 0, 0, 0) };
390
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -0.25f,
Color
.FromArgb(255, 102, 33, 165) };
391
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -0.25f,
Color
.FromArgb(255, 255, 121, 255) };
392
yield return new object[] { SystemColors.ControlDarkDark, -0.25f,
Color
.FromArgb(255, 87, 87, 87) };
393
yield return new object[] { SystemColors.ControlDark, -0.25f,
Color
.FromArgb(255, 132, 132, 132) };
394
yield return new object[] { SystemColors.Control, -0.25f,
Color
.FromArgb(255, 173, 173, 173) };
395
yield return new object[] { SystemColors.ControlLight, -0.25f,
Color
.FromArgb(255, 188, 188, 188) };
396
yield return new object[] { SystemColors.ControlLightLight, -0.25f,
Color
.FromArgb(255, 212, 212, 212) };
398
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0f,
Color
.FromArgb(255, 170, 0, 0) };
399
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0f,
Color
.FromArgb(255, 0, 170, 0) };
400
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0f,
Color
.FromArgb(255, 0, 0, 170) };
401
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0f,
Color
.FromArgb(255, 170, 170, 0) };
402
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0f,
Color
.FromArgb(255, 170, 0, 170) };
403
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0f,
Color
.FromArgb(255, 0, 170, 170) };
404
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0f,
Color
.FromArgb(255, 170, 170, 170) };
405
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0f,
Color
.FromArgb(255, 0, 55, 0) };
406
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0f,
Color
.FromArgb(255, 0, 17, 0) };
407
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0f,
Color
.FromArgb(255, 0, 4, 0) };
408
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0f,
Color
.FromArgb(255, 0, 0, 0) };
409
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0f,
Color
.FromArgb(255, 0, 0, 0) };
410
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0f,
Color
.FromArgb(255, 83, 27, 133) };
411
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0f,
Color
.FromArgb(255, 255, 47, 255) };
412
yield return new object[] { SystemColors.ControlDarkDark, 0f,
Color
.FromArgb(255, 70, 70, 70) };
413
yield return new object[] { SystemColors.ControlDark, 0f,
Color
.FromArgb(255, 106, 106, 106) };
415
yield return new object[] { SystemColors.ControlLight, 0f,
Color
.FromArgb(255, 150, 150, 150) };
416
yield return new object[] { SystemColors.ControlLightLight, 0f,
Color
.FromArgb(255, 170, 170, 170) };
418
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0.25f,
Color
.FromArgb(255, 128, 0, 0) };
419
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0.25f,
Color
.FromArgb(255, 0, 128, 0) };
420
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0.25f,
Color
.FromArgb(255, 0, 0, 128) };
421
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0.25f,
Color
.FromArgb(255, 128, 128, 0) };
422
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0.25f,
Color
.FromArgb(255, 128, 0, 128) };
423
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0.25f,
Color
.FromArgb(255, 0, 128, 128) };
424
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0.25f,
Color
.FromArgb(255, 127, 127, 127) };
425
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0.25f,
Color
.FromArgb(255, 0, 43, 0) };
426
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0.25f,
Color
.FromArgb(255, 0, 13, 0) };
427
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0.25f,
Color
.FromArgb(255, 0, 4, 0) };
428
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0.25f,
Color
.FromArgb(255, 0, 0, 0) };
429
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0.25f,
Color
.FromArgb(255, 0, 0, 0) };
430
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0.25f,
Color
.FromArgb(255, 63, 20, 101) };
431
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0.25f,
Color
.FromArgb(255, 227, 0, 227) };
432
yield return new object[] { SystemColors.ControlDarkDark, 0.25f,
Color
.FromArgb(255, 53, 53, 53) };
433
yield return new object[] { SystemColors.ControlDark, 0.25f,
Color
.FromArgb(255, 79, 79, 79) };
434
yield return new object[] { SystemColors.Control, 0.25f,
Color
.FromArgb(255, 147, 147, 147) };
435
yield return new object[] { SystemColors.ControlLight, 0.25f,
Color
.FromArgb(255, 113, 113, 113) };
436
yield return new object[] { SystemColors.ControlLightLight, 0.25f,
Color
.FromArgb(255, 127, 127, 127) };
438
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0.5f,
Color
.FromArgb(255, 85, 0, 0) };
439
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0.5f,
Color
.FromArgb(255, 0, 85, 0) };
440
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0.5f,
Color
.FromArgb(255, 0, 0, 85) };
441
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0.5f,
Color
.FromArgb(255, 85, 85, 0) };
442
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0.5f,
Color
.FromArgb(255, 85, 0, 85) };
443
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0.5f,
Color
.FromArgb(255, 0, 85, 85) };
444
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0.5f,
Color
.FromArgb(255, 85, 85, 85) };
445
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0.5f,
Color
.FromArgb(255, 0, 28, 0) };
446
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0.5f,
Color
.FromArgb(255, 0, 9, 0) };
447
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0.5f,
Color
.FromArgb(255, 0, 2, 0) };
448
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0.5f,
Color
.FromArgb(255, 0, 0, 0) };
449
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0.5f,
Color
.FromArgb(255, 0, 0, 0) };
450
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0.5f,
Color
.FromArgb(255, 41, 14, 67) };
451
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0.5f,
Color
.FromArgb(255, 151, 0, 151) };
452
yield return new object[] { SystemColors.ControlDarkDark, 0.5f,
Color
.FromArgb(255, 35, 35, 35) };
453
yield return new object[] { SystemColors.ControlDark, 0.5f,
Color
.FromArgb(255, 53, 53, 53) };
454
yield return new object[] { SystemColors.Control, 0.5f,
Color
.FromArgb(255, 133, 133, 133) };
455
yield return new object[] { SystemColors.ControlLight, 0.5f,
Color
.FromArgb(255, 75, 75, 75) };
456
yield return new object[] { SystemColors.ControlLightLight, 0.5f,
Color
.FromArgb(255, 85, 85, 85) };
458
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
459
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
460
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
461
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
462
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
463
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
464
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
465
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
466
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
467
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
468
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
469
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
470
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 1f,
Color
.FromArgb(255, 0, 0, 0) };
471
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
472
yield return new object[] { SystemColors.ControlDarkDark, 1f,
Color
.FromArgb(255, 0, 0, 0) };
473
yield return new object[] { SystemColors.ControlDark, 1f,
Color
.FromArgb(255, 0, 0, 0) };
475
yield return new object[] { SystemColors.ControlLight, 1f,
Color
.FromArgb(255, 0, 0, 0) };
476
yield return new object[] { SystemColors.ControlLightLight, 1f,
Color
.FromArgb(255, 0, 0, 0) };
478
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 1.5f,
Color
.FromArgb(255, 173, 0, 0) };
479
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 1.5f,
Color
.FromArgb(255, 0, 173, 0) };
480
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 1.5f,
Color
.FromArgb(255, 0, 0, 173) };
481
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 1.5f,
Color
.FromArgb(255, 174, 173, 0) };
482
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 1.5f,
Color
.FromArgb(255, 173, 0, 174) };
483
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 1.5f,
Color
.FromArgb(255, 0, 174, 173) };
484
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 1.5f,
Color
.FromArgb(255, 171, 171, 171) };
485
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 1.5f,
Color
.FromArgb(255, 0, 230, 0) };
486
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 1.5f,
Color
.FromArgb(255, 0, 250, 0) };
487
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 1.5f,
Color
.FromArgb(255, 0, 0, 0) };
488
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 1.5f,
Color
.FromArgb(255, 0, 0, 0) };
489
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 1.5f,
Color
.FromArgb(255, 0, 0, 0) };
490
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 1.5f,
Color
.FromArgb(255, 218, 243, 192) };
491
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 1.5f,
Color
.FromArgb(255, 107, 0, 108) };
492
yield return new object[] { SystemColors.ControlDarkDark, 1.5f,
Color
.FromArgb(255, 221, 221, 221) };
493
yield return new object[] { SystemColors.ControlDark, 1.5f,
Color
.FromArgb(255, 203, 203, 203) };
494
yield return new object[] { SystemColors.Control, 1.5f,
Color
.FromArgb(255, 78, 78, 78) };
495
yield return new object[] { SystemColors.ControlLight, 1.5f,
Color
.FromArgb(255, 181, 181, 181) };
500
private void ControlPaint_Dark_InvokeColorFloat_ReturnsExpected(
Color
baseColor, float percOfDarkDark,
Color
expected)
510
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0),
Color
.FromArgb(255, 0, 0, 0) };
511
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0),
Color
.FromArgb(255, 0, 0, 0) };
512
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 0, 0, 0) };
513
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 0, 0, 0) };
514
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255),
Color
.FromArgb(255, 0, 0, 0) };
515
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255),
Color
.FromArgb(255, 0, 0, 0) };
516
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255),
Color
.FromArgb(255, 0, 0, 0) };
517
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0),
Color
.FromArgb(255, 0, 0, 0) };
518
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0),
Color
.FromArgb(255, 0, 0, 0) };
519
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0),
Color
.FromArgb(255, 0, 0, 0) };
520
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0),
Color
.FromArgb(255, 0, 0, 0) };
521
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 0, 0, 0) };
522
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200),
Color
.FromArgb(255, 0, 0, 0) };
523
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255),
Color
.FromArgb(255, 0, 0, 0) };
524
yield return new object[] { SystemColors.ControlDarkDark,
Color
.FromArgb(255, 0, 0, 0) };
525
yield return new object[] { SystemColors.ControlDark,
Color
.FromArgb(255, 0, 0, 0) };
527
yield return new object[] { SystemColors.ControlLight,
Color
.FromArgb(255, 0, 0, 0) };
528
yield return new object[] { SystemColors.ControlLightLight,
Color
.FromArgb(255, 0, 0, 0) };
533
private void ControlPaint_DarkDark_InvokeColorFloat_ReturnsExpected(
Color
baseColor,
Color
expected)
542
yield return new object[] { Rectangle.Empty,
Color
.Empty, style };
543
yield return new object[] { new Rectangle(1, 2, -3, -4),
Color
.Empty, style };
544
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, style };
548
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Black, style };
549
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.White, style };
550
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Transparent, style };
551
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Empty, style };
552
yield return new object[] { new Rectangle(1, 2, 4, 3),
Color
.Red, style };
553
yield return new object[] { new Rectangle(1, 2, 3, 3),
Color
.Red, style };
559
public void ControlPaint_DrawBorder_GraphicsRectangleColorButtonBorderStyle_Success(Rectangle bounds,
Color
color, ButtonBorderStyle style)
576
ControlPaint.DrawBorder(graphics, new Rectangle(1, 2, 3, 4),
Color
.Red, style);
579
ControlPaint.DrawBorder(graphics, new Rectangle(1, 2, 3, 4),
Color
.Red, style);
586
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
587
yield return new object[] { Rectangle.Empty,
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
588
yield return new object[] { new Rectangle(1, 2, -3, -4),
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
590
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 0, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
591
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 0, style,
Color
.Green, 0, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
592
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 0, style,
Color
.Green, 0, style,
Color
.Blue, 0, style,
Color
.Yellow, 4, style };
593
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 0, style,
Color
.Green, 0, style,
Color
.Blue, 3, style,
Color
.Yellow, 0, style };
594
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 0, style,
Color
.Green, 0, style,
Color
.Blue, 0, style,
Color
.Yellow, 0, style };
595
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 0, style,
Color
.Green, 2, style,
Color
.Blue, 0, style,
Color
.Yellow, 4, style };
596
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 0, style,
Color
.Green, 2, style,
Color
.Blue, 0, style,
Color
.Yellow, 0, style };
597
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 0, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, 0, style };
599
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 0, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
600
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 0, style,
Color
.Blue, 0, style,
Color
.Yellow, 4, style };
601
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 0, style,
Color
.Blue, 3, style,
Color
.Yellow, 0, style };
602
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 0, style,
Color
.Blue, 0, style,
Color
.Yellow, 0, style };
604
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, 0, style,
Color
.Yellow, 4, style };
605
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, 0, style,
Color
.Yellow, 0, style };
607
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, 0, style };
615
Color
leftColor, int leftWidth, ButtonBorderStyle leftStyle,
616
Color
topColor, int topWidth, ButtonBorderStyle topStyle,
617
Color
rightColor, int rightWidth, ButtonBorderStyle rightStyle,
618
Color
bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle)
632
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, -1, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
633
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, -1, style,
Color
.Green, -1, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
634
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, -1, style,
Color
.Green, -1, style,
Color
.Blue, -1, style,
Color
.Yellow, 4, style };
635
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, -1, style,
Color
.Green, -1, style,
Color
.Blue, 3, style,
Color
.Yellow, -1, style };
636
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, -1, style,
Color
.Green, -1, style,
Color
.Blue, -1, style,
Color
.Yellow, -1, style };
637
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, -1, style,
Color
.Green, 2, style,
Color
.Blue, -1, style,
Color
.Yellow, 4, style };
638
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, -1, style,
Color
.Green, 2, style,
Color
.Blue, -1, style,
Color
.Yellow, -1, style };
639
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, -1, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, -1, style };
641
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, -1, style,
Color
.Blue, 3, style,
Color
.Yellow, 4, style };
642
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, -1, style,
Color
.Blue, -1, style,
Color
.Yellow, 4, style };
643
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, -1, style,
Color
.Blue, 3, style,
Color
.Yellow, -1, style };
644
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, -1, style,
Color
.Blue, -1, style,
Color
.Yellow, -1, style };
646
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, -1, style,
Color
.Yellow, 4, style };
647
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, -1, style,
Color
.Yellow, -1, style };
649
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Green, 2, style,
Color
.Blue, 3, style,
Color
.Yellow, -1, style };
657
Color
leftColor, int leftWidth, ButtonBorderStyle leftStyle,
658
Color
topColor, int topWidth, ButtonBorderStyle topStyle,
659
Color
rightColor, int rightWidth, ButtonBorderStyle rightStyle,
660
Color
bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle)
675
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder(null, new Rectangle(1, 2, 3, 4),
Color
.Red, style));
683
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder(null, new Rectangle(1, 2, 3, 4),
Color
.Red, 1, style,
Color
.Red, 1, style,
Color
.Red, 1, style,
Color
.Red, 1, style));
1187
yield return new object[] { Rectangle.Empty,
Color
.Red,
Color
.Blue };
1188
yield return new object[] { new Rectangle(1, 2, -3, -4),
Color
.Red,
Color
.Blue };
1189
yield return new object[] { new Rectangle(0, 0, 3, 4),
Color
.Red,
Color
.Blue };
1190
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Blue };
1191
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Black,
Color
.Blue };
1192
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.White,
Color
.Blue };
1193
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Empty,
Color
.Blue };
1194
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Transparent,
Color
.Blue };
1195
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Black };
1196
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.White };
1197
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Empty };
1198
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Transparent };
1199
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Red };
1200
yield return new object[] { new Rectangle(1, 2, 4, 3),
Color
.Red,
Color
.Blue };
1201
yield return new object[] { new Rectangle(1, 2, 3, 3),
Color
.Red,
Color
.Blue };
1206
public void ControlPaint_DrawFocusRectangle_Invoke_Success(Rectangle rectangle,
Color
foreColor,
Color
backColor)
1220
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawFocusRectangle(null, new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Blue));
1263
yield return new object[] { Rectangle.Empty, new Size(1, 1),
Color
.Red };
1264
yield return new object[] { new Rectangle(1, 2, -3, -4), new Size(1, 1),
Color
.Red };
1265
yield return new object[] { new Rectangle(0, 0, 3, 4), new Size(1, 1),
Color
.Red };
1266
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Red };
1267
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Black };
1268
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.White };
1269
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Empty };
1270
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Transparent };
1271
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(10, 20),
Color
.Red };
1272
yield return new object[] { new Rectangle(1, 2, 4, 3), new Size(10, 20),
Color
.Red };
1273
yield return new object[] { new Rectangle(1, 2, 3, 3), new Size(10, 20),
Color
.Red };
1278
public void ControlPaint_DrawGrid_Invoke_Success(Rectangle area, Size pixelsBetweenDots,
Color
backColor)
1291
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawGrid(null, new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Red));
1303
Assert.Throws<ArgumentOutOfRangeException>("pixelsBetweenDots", () => ControlPaint.DrawGrid(graphics, new Rectangle(0, 0, width, height), new Size(width, height),
Color
.Red));
1308
yield return new object[] { new Bitmap(10, 10), -10, -20,
Color
.Red };
1309
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.Red };
1310
yield return new object[] { new Bitmap(10, 10), 1, 2,
Color
.Red };
1311
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.Black };
1312
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.White };
1313
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.Transparent };
1314
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.Empty };
1316
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), -10, -20,
Color
.Red };
1317
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.Red };
1318
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 1, 2,
Color
.Red };
1319
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.Black };
1320
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.White };
1321
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.Transparent };
1322
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.Empty };
1327
public void ControlPaint_DrawImageDisabled_Invoke_Success(Image image, int x, int y,
Color
background)
1341
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawImageDisabled(null, image, 0, 0,
Color
.Red));
1349
Assert.Throws<NullReferenceException>(() => ControlPaint.DrawImageDisabled(graphics, null, 0, 0,
Color
.Red));
1412
yield return new object[] { new Rectangle(0, 0, 3, 4), glyph,
Color
.Red,
Color
.Blue };
1413
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Blue };
1414
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Black,
Color
.Blue };
1415
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.White,
Color
.Blue };
1416
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Empty,
Color
.Blue };
1417
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Transparent,
Color
.Blue };
1418
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Black };
1419
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.White };
1420
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Empty };
1421
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Transparent };
1422
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Red };
1423
yield return new object[] { new Rectangle(1, 2, 4, 3), glyph,
Color
.Red,
Color
.Red };
1424
yield return new object[] { new Rectangle(1, 2, 3, 3), glyph,
Color
.Red,
Color
.Red };
1430
public void ControlPaint_DrawMenuGlyph_InvokeGraphicsRectangleMenuGlyphColorColor_Success(Rectangle rectangle, MenuGlyph glyph,
Color
foreColor,
Color
backColor)
1454
public void ControlPaint_DrawMenuGlyph_InvokeGraphicsIntIntIntIntMenuGlyphColorColor_Success(Rectangle rectangle, MenuGlyph glyph,
Color
foreColor,
Color
backColor)
1680
yield return new object[] { Rectangle.Empty,
Color
.Empty, style };
1681
yield return new object[] { new Rectangle(1, 2, -3, -4),
Color
.Empty, style };
1682
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, style };
1686
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Black, style };
1687
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.White, style };
1688
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Transparent, style };
1689
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Empty, style };
1690
yield return new object[] { new Rectangle(1, 2, 4, 3),
Color
.Red, style };
1691
yield return new object[] { new Rectangle(1, 2, 3, 3),
Color
.Red, style };
1697
public void ControlPaint_DrawReversibleFrame_Invoke_Success(Rectangle rectangle,
Color
backColor, FrameStyle style)
1707
yield return new object[] { Point.Empty, Point.Empty,
Color
.Red };
1708
yield return new object[] { new Point(1, 2), new Point(1, 2),
Color
.Red };
1709
yield return new object[] { new Point(2, 3), new Point(1, 2),
Color
.Red };
1710
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Empty };
1711
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Red };
1715
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Black };
1716
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.White };
1717
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Transparent };
1718
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Empty };
1723
public void ControlPaint_DrawReversibleLine_Invoke_Success(Point start, Point end,
Color
backColor)
1818
yield return new object[] { active, Rectangle.Empty, Rectangle.Empty,
Color
.Red };
1819
yield return new object[] { active, new Rectangle(1, 2, -3, -4), new Rectangle(1, 2, -3, -4),
Color
.Red };
1820
yield return new object[] { active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4),
Color
.Red };
1821
yield return new object[] { active, new Rectangle(1, 2, 3, 4), new Rectangle(0, 1, 4, 5),
Color
.Red };
1822
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.Red };
1823
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.Black };
1824
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.White };
1825
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.Transparent };
1826
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.Empty };
1832
public void ControlPaint_DrawSelectionFrame_Invoke_Success(bool active, Rectangle outsideRect, Rectangle insideRect,
Color
backColor)
1847
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSelectionFrame(null, active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4),
Color
.Red));
1852
yield return new object[] {
Color
.Red, Rectangle.Empty };
1853
yield return new object[] {
Color
.Red, new Rectangle(1, 2, -3, -4) };
1854
yield return new object[] {
Color
.Red, new Rectangle(0, 0, 3, 4) };
1855
yield return new object[] {
Color
.Red, new Rectangle(1, 2, 3, 4) };
1856
yield return new object[] {
Color
.Black, new Rectangle(1, 2, 3, 4) };
1857
yield return new object[] {
Color
.White, new Rectangle(1, 2, 3, 4) };
1858
yield return new object[] {
Color
.Empty, new Rectangle(1, 2, 3, 4) };
1859
yield return new object[] {
Color
.Transparent, new Rectangle(1, 2, 3, 4) };
1860
yield return new object[] {
Color
.Red, new Rectangle(1, 2, 3, 4) };
1861
yield return new object[] {
Color
.Red, new Rectangle(1, 2, 3, 4) };
1862
yield return new object[] {
Color
.Red, new Rectangle(1, 2, 4, 3) };
1867
public void ControlPaint_DrawSizeGrip_InvokeGraphicsColorRectangle_Success(
Color
backColor, Rectangle rectangle)
1879
public void ControlPaint_DrawSizeGrip_InvokeGraphicsColorIntIntIntInt_Success(
Color
backColor, Rectangle rectangle)
1892
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null,
Color
.Red, new Rectangle(1, 2, 3, 4)));
1893
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null,
Color
.Red, 1, 2, 3, 4));
1900
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new RectangleF(1, 2, 3, 4), null };
1901
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, RectangleF.Empty, new StringFormat() };
1902
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new RectangleF(1, 2, -3, -4), new StringFormat() };
1903
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new RectangleF(1, 2, 3, 4), new StringFormat() };
1904
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Black, new RectangleF(1, 2, 3, 4), new StringFormat() };
1905
yield return new object[] { s, SystemFonts.MenuFont,
Color
.White, new RectangleF(1, 2, 3, 4), new StringFormat() };
1906
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Transparent, new RectangleF(1, 2, 3, 4), new StringFormat() };
1907
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Empty, new RectangleF(1, 2, 3, 4), new StringFormat() };
1914
string s, Font font,
Color
color,
1931
ControlPaint.DrawStringDisabled(graphics, s, null,
Color
.Red, new RectangleF(1, 2, 3, 4), null);
1934
ControlPaint.DrawStringDisabled(graphics, s, null,
Color
.Red, new RectangleF(1, 2, 3, 4), null);
1941
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont,
Color
.Red, new RectangleF(1, 2, 3, 4), new StringFormat()));
1948
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default };
1949
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, Rectangle.Empty, TextFormatFlags.VerticalCenter };
1950
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new Rectangle(1, 2, -3, -4), TextFormatFlags.VerticalCenter };
1951
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1952
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Black, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1953
yield return new object[] { s, SystemFonts.MenuFont,
Color
.White, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1954
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Transparent, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1955
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Empty, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1962
string s, Font font,
Color
color,
1977
Assert.Throws<ArgumentNullException>("dc", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont,
Color
.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default));
2010
yield return new object[] { Rectangle.Empty,
Color
.Red };
2011
yield return new object[] { new Rectangle(1, 2, -3, -4),
Color
.Red };
2012
yield return new object[] { new Rectangle(0, 0, 3, 4),
Color
.Red };
2013
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red };
2014
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Black };
2015
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.White };
2016
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Empty };
2017
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Transparent };
2018
yield return new object[] { new Rectangle(1, 2, 4, 3),
Color
.Red };
2019
yield return new object[] { new Rectangle(1, 2, 3, 3),
Color
.Red };
2024
public void ControlPaint_FillReversibleRectangle_Invoke_Success(Rectangle rectangle,
Color
backColor)
2034
yield return new object[] {
Color
.White, false };
2035
yield return new object[] {
Color
.Black, true };
2040
public void ControlPaint_IsDark(
Color
color, bool expected)
2049
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0),
Color
.FromArgb(255, 255, 64, 64) };
2050
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0),
Color
.FromArgb(255, 64, 255, 64) };
2051
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 64, 64, 255) };
2052
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 255, 255, 64) };
2053
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255),
Color
.FromArgb(255, 255, 64, 255) };
2054
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255),
Color
.FromArgb(255, 64, 255, 255) };
2055
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255),
Color
.FromArgb(255, 255, 255, 255) };
2056
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0),
Color
.FromArgb(255, 0, 191, 0) };
2057
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0),
Color
.FromArgb(255, 0, 149, 0) };
2058
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0),
Color
.FromArgb(255, 0, 134, 0) };
2059
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0),
Color
.FromArgb(255, 0, 130, 0) };
2060
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 63, 63, 63) };
2061
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200),
Color
.FromArgb(255, 157, 87, 221) };
2062
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255),
Color
.FromArgb(255, 255, 213, 255) };
2063
yield return new object[] { SystemColors.ControlDarkDark,
Color
.FromArgb(255, 142, 142, 142) };
2064
yield return new object[] { SystemColors.ControlDark,
Color
.FromArgb(255, 183, 183, 183) };
2065
yield return new object[] { SystemColors.Control,
Color
.FromArgb(255, 241, 241, 241) };
2066
yield return new object[] { SystemColors.ControlLight,
Color
.FromArgb(255, 233, 233, 233) };
2067
yield return new object[] { SystemColors.ControlLightLight,
Color
.FromArgb(255, 255, 255, 255) };
2072
public void ControlPaint_Light_InvokeColor_ReturnsExpected(
Color
baseColor,
Color
expected)
2082
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -1.5f,
Color
.FromArgb(255, 64, 0, 0) };
2083
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -1.5f,
Color
.FromArgb(255, 0, 64, 0) };
2084
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -1.5f,
Color
.FromArgb(255, 0, 0, 64) };
2085
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -1.5f,
Color
.FromArgb(255, 64, 64, 0) };
2086
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -1.5f,
Color
.FromArgb(255, 64, 0, 64) };
2087
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -1.5f,
Color
.FromArgb(255, 0, 64, 64) };
2088
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -1.5f,
Color
.FromArgb(255, 255, 255, 255) };
2089
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -1.5f,
Color
.FromArgb(255, 0, 24, 0) };
2090
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -1.5f,
Color
.FromArgb(255, 0, 178, 0) };
2091
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -1.5f,
Color
.FromArgb(255, 0, 146, 0) };
2092
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -1.5f,
Color
.FromArgb(255, 0, 134, 0) };
2093
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -1.5f,
Color
.FromArgb(255, 65, 65, 65) };
2094
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -1.5f,
Color
.FromArgb(255, 19, 6, 30) };
2095
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -1.5f,
Color
.FromArgb(255, 255, 159, 255) };
2096
yield return new object[] { SystemColors.ControlDarkDark, -1.5f,
Color
.FromArgb(255, 249, 249, 249) };
2097
yield return new object[] { SystemColors.ControlDark, -1.5f,
Color
.FromArgb(255, 89, 89, 89) };
2098
yield return new object[] { SystemColors.Control, -1.5f,
Color
.FromArgb(255, 185, 185, 185) };
2099
yield return new object[] { SystemColors.ControlLight, -1.5f,
Color
.FromArgb(255, 207, 207, 207) };
2100
yield return new object[] { SystemColors.ControlLightLight, -1.5f,
Color
.FromArgb(255, 255, 255, 255) };
2102
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -1f,
Color
.FromArgb(255, 128, 0, 0) };
2103
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -1f,
Color
.FromArgb(255, 0, 128, 0) };
2104
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -1f,
Color
.FromArgb(255, 0, 0, 128) };
2105
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -1f,
Color
.FromArgb(255, 128, 128, 0) };
2106
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -1f,
Color
.FromArgb(255, 128, 0, 128) };
2107
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -1f,
Color
.FromArgb(255, 0, 128, 128) };
2108
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -1f,
Color
.FromArgb(255, 255, 255, 255) };
2109
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -1f,
Color
.FromArgb(255, 0, 131, 0) };
2110
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -1f,
Color
.FromArgb(255, 0, 43, 0) };
2111
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -1f,
Color
.FromArgb(255, 0, 16, 0) };
2112
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -1f,
Color
.FromArgb(255, 0, 5, 0) };
2113
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -1f,
Color
.FromArgb(255, 129, 129, 129) };
2114
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -1f,
Color
.FromArgb(255, 54, 17, 87) };
2115
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -1f,
Color
.FromArgb(255, 255, 172, 255) };
2116
yield return new object[] { SystemColors.ControlDarkDark, -1f,
Color
.FromArgb(255, 29, 29, 29) };
2117
yield return new object[] { SystemColors.ControlDark, -1f,
Color
.FromArgb(255, 112, 112, 112) };
2118
yield return new object[] { SystemColors.Control, -1f,
Color
.FromArgb(255, 199, 199, 199) };
2119
yield return new object[] { SystemColors.ControlLight, -1f,
Color
.FromArgb(255, 213, 213, 213) };
2120
yield return new object[] { SystemColors.ControlLightLight, -1f,
Color
.FromArgb(255, 255, 255, 255) };
2122
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -0.5f,
Color
.FromArgb(255, 191, 0, 0) };
2123
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -0.5f,
Color
.FromArgb(255, 0, 191, 0) };
2124
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -0.5f,
Color
.FromArgb(255, 0, 0, 191) };
2125
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -0.5f,
Color
.FromArgb(255, 191, 191, 0) };
2126
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -0.5f,
Color
.FromArgb(255, 191, 0, 191) };
2127
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -0.5f,
Color
.FromArgb(255, 0, 191, 191) };
2128
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -0.5f,
Color
.FromArgb(255, 255, 255, 255) };
2129
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -0.5f,
Color
.FromArgb(255, 0, 237, 0) };
2130
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -0.5f,
Color
.FromArgb(255, 0, 165, 0) };
2131
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -0.5f,
Color
.FromArgb(255, 0, 141, 0) };
2132
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -0.5f,
Color
.FromArgb(255, 0, 133, 0) };
2133
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -0.5f,
Color
.FromArgb(255, 193, 193, 193) };
2134
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -0.5f,
Color
.FromArgb(255, 89, 29, 143) };
2135
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -0.5f,
Color
.FromArgb(255, 255, 187, 255) };
2136
yield return new object[] { SystemColors.ControlDarkDark, -0.5f,
Color
.FromArgb(255, 68, 68, 68) };
2137
yield return new object[] { SystemColors.ControlDark, -0.5f,
Color
.FromArgb(255, 137, 137, 137) };
2138
yield return new object[] { SystemColors.Control, -0.5f,
Color
.FromArgb(255, 213, 213, 213) };
2139
yield return new object[] { SystemColors.ControlLight, -0.5f,
Color
.FromArgb(255, 221, 221, 221) };
2140
yield return new object[] { SystemColors.ControlLightLight, -0.5f,
Color
.FromArgb(255, 255, 255, 255) };
2142
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -0.25f,
Color
.FromArgb(255, 223, 0, 0) };
2143
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -0.25f,
Color
.FromArgb(255, 0, 223, 0) };
2144
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -0.25f,
Color
.FromArgb(255, 0, 0, 223) };
2145
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -0.25f,
Color
.FromArgb(255, 223, 223, 0) };
2146
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -0.25f,
Color
.FromArgb(255, 223, 0, 223) };
2147
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -0.25f,
Color
.FromArgb(255, 0, 223, 223) };
2148
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -0.25f,
Color
.FromArgb(255, 255, 255, 255) };
2149
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -0.25f,
Color
.FromArgb(255, 0, 32, 0) };
2150
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -0.25f,
Color
.FromArgb(255, 0, 226, 0) };
2151
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -0.25f,
Color
.FromArgb(255, 0, 205, 0) };
2152
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -0.25f,
Color
.FromArgb(255, 0, 196, 0) };
2153
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -0.25f,
Color
.FromArgb(255, 225, 225, 225) };
2154
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -0.25f,
Color
.FromArgb(255, 106, 34, 172) };
2155
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -0.25f,
Color
.FromArgb(255, 255, 193, 255) };
2156
yield return new object[] { SystemColors.ControlDarkDark, -0.25f,
Color
.FromArgb(255, 87, 87, 87) };
2157
yield return new object[] { SystemColors.ControlDark, -0.25f,
Color
.FromArgb(255, 148, 148, 148) };
2158
yield return new object[] { SystemColors.Control, -0.25f,
Color
.FromArgb(255, 220, 220, 220) };
2159
yield return new object[] { SystemColors.ControlLight, -0.25f,
Color
.FromArgb(255, 224, 224, 224) };
2160
yield return new object[] { SystemColors.ControlLightLight, -0.25f,
Color
.FromArgb(255, 255, 255, 255) };
2162
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0f,
Color
.FromArgb(255, 255, 0, 0) };
2163
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0f,
Color
.FromArgb(255, 0, 255, 0) };
2164
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0f,
Color
.FromArgb(255, 0, 0, 255) };
2165
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0f,
Color
.FromArgb(255, 255, 255, 0) };
2166
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0f,
Color
.FromArgb(255, 255, 0, 255) };
2167
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0f,
Color
.FromArgb(255, 0, 255, 255) };
2168
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0f,
Color
.FromArgb(255, 255, 255, 255) };
2169
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0f,
Color
.FromArgb(255, 0, 85, 0) };
2170
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0f,
Color
.FromArgb(255, 0, 28, 0) };
2171
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0f,
Color
.FromArgb(255, 0, 9, 0) };
2172
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0f,
Color
.FromArgb(255, 0, 2, 0) };
2173
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0f,
Color
.FromArgb(255, 0, 0, 0) };
2174
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0f,
Color
.FromArgb(255, 124, 40, 200) };
2175
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0f,
Color
.FromArgb(255, 255, 200, 255) };
2176
yield return new object[] { SystemColors.ControlDarkDark, 0f,
Color
.FromArgb(255, 105, 105, 105) };
2177
yield return new object[] { SystemColors.ControlDark, 0f,
Color
.FromArgb(255, 160, 160, 160) };
2179
yield return new object[] { SystemColors.ControlLight, 0f,
Color
.FromArgb(255, 227, 227, 227) };
2180
yield return new object[] { SystemColors.ControlLightLight, 0f,
Color
.FromArgb(255, 255, 255, 255) };
2182
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0.25f,
Color
.FromArgb(255, 255, 32, 32) };
2183
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0.25f,
Color
.FromArgb(255, 32, 255, 32) };
2184
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0.25f,
Color
.FromArgb(255, 32, 32, 255) };
2185
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0.25f,
Color
.FromArgb(255, 255, 255, 32) };
2186
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0.25f,
Color
.FromArgb(255, 255, 32, 255) };
2187
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0.25f,
Color
.FromArgb(255, 32, 255, 255) };
2188
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0.25f,
Color
.FromArgb(255, 255, 255, 255) };
2189
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0.25f,
Color
.FromArgb(255, 0, 138, 0) };
2190
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0.25f,
Color
.FromArgb(255, 0, 87, 0) };
2191
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0.25f,
Color
.FromArgb(255, 0, 70, 0) };
2192
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0.25f,
Color
.FromArgb(255, 0, 66, 0) };
2193
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0.25f,
Color
.FromArgb(255, 31, 31, 31) };
2194
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0.25f,
Color
.FromArgb(255, 141, 58, 216) };
2195
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0.25f,
Color
.FromArgb(255, 255, 206, 255) };
2196
yield return new object[] { SystemColors.ControlDarkDark, 0.25f,
Color
.FromArgb(255, 123, 123, 123) };
2197
yield return new object[] { SystemColors.ControlDark, 0.25f,
Color
.FromArgb(255, 172, 172, 172) };
2198
yield return new object[] { SystemColors.Control, 0.25f,
Color
.FromArgb(255, 234, 234, 234) };
2199
yield return new object[] { SystemColors.ControlLight, 0.25f,
Color
.FromArgb(255, 230, 230, 230) };
2200
yield return new object[] { SystemColors.ControlLightLight, 0.25f,
Color
.FromArgb(255, 255, 255, 255) };
2202
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0.5f,
Color
.FromArgb(255, 255, 64, 64) };
2203
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0.5f,
Color
.FromArgb(255, 64, 255, 64) };
2204
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0.5f,
Color
.FromArgb(255, 64, 64, 255) };
2205
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0.5f,
Color
.FromArgb(255, 255, 255, 64) };
2206
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0.5f,
Color
.FromArgb(255, 255, 64, 255) };
2207
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0.5f,
Color
.FromArgb(255, 64, 255, 255) };
2208
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0.5f,
Color
.FromArgb(255, 255, 255, 255) };
2209
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0.5f,
Color
.FromArgb(255, 0, 191, 0) };
2210
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0.5f,
Color
.FromArgb(255, 0, 149, 0) };
2211
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0.5f,
Color
.FromArgb(255, 0, 134, 0) };
2212
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0.5f,
Color
.FromArgb(255, 0, 130, 0) };
2213
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0.5f,
Color
.FromArgb(255, 63, 63, 63) };
2214
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0.5f,
Color
.FromArgb(255, 157, 87, 221) };
2215
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0.5f,
Color
.FromArgb(255, 255, 213, 255) };
2216
yield return new object[] { SystemColors.ControlDarkDark, 0.5f,
Color
.FromArgb(255, 142, 142, 142) };
2217
yield return new object[] { SystemColors.ControlDark, 0.5f,
Color
.FromArgb(255, 183, 183, 183) };
2218
yield return new object[] { SystemColors.Control, 0.5f,
Color
.FromArgb(255, 241, 241, 241) };
2219
yield return new object[] { SystemColors.ControlLight, 0.5f,
Color
.FromArgb(255, 233, 233, 233) };
2220
yield return new object[] { SystemColors.ControlLightLight, 0.5f,
Color
.FromArgb(255, 255, 255, 255) };
2222
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 1f,
Color
.FromArgb(255, 255, 128, 128) };
2223
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 1f,
Color
.FromArgb(255, 128, 255, 128) };
2224
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 1f,
Color
.FromArgb(255, 128, 128, 255) };
2225
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 1f,
Color
.FromArgb(255, 255, 255, 128) };
2226
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 1f,
Color
.FromArgb(255, 255, 128, 255) };
2227
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 1f,
Color
.FromArgb(255, 128, 255, 255) };
2228
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 1f,
Color
.FromArgb(255, 255, 255, 255) };
2229
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 1f,
Color
.FromArgb(255, 43, 255, 43) };
2230
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 1f,
Color
.FromArgb(255, 15, 255, 15) };
2231
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 1f,
Color
.FromArgb(255, 4, 255, 4) };
2232
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 1f,
Color
.FromArgb(255, 2, 255, 2) };
2233
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 1f,
Color
.FromArgb(255, 127, 127, 127) };
2234
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 1f,
Color
.FromArgb(255, 190, 143, 233) };
2235
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 1f,
Color
.FromArgb(255, 255, 227, 255) };
2236
yield return new object[] { SystemColors.ControlDarkDark, 1f,
Color
.FromArgb(255, 180, 180, 180) };
2237
yield return new object[] { SystemColors.ControlDark, 1f,
Color
.FromArgb(255, 208, 208, 208) };
2239
yield return new object[] { SystemColors.ControlLight, 1f,
Color
.FromArgb(255, 241, 241, 241) };
2240
yield return new object[] { SystemColors.ControlLightLight, 1f,
Color
.FromArgb(255, 255, 255, 255) };
2242
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 1.5f,
Color
.FromArgb(255, 255, 191, 191) };
2243
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 1.5f,
Color
.FromArgb(255, 191, 255, 191) };
2244
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 1.5f,
Color
.FromArgb(255, 191, 191, 255) };
2245
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 1.5f,
Color
.FromArgb(255, 255, 255, 191) };
2246
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 1.5f,
Color
.FromArgb(255, 255, 191, 255) };
2247
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 1.5f,
Color
.FromArgb(255, 191, 255, 255) };
2248
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 1.5f,
Color
.FromArgb(255, 255, 255, 255) };
2249
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 1.5f,
Color
.FromArgb(255, 149, 255, 149) };
2250
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 1.5f,
Color
.FromArgb(255, 136, 255, 136) };
2251
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 1.5f,
Color
.FromArgb(255, 130, 255, 130) };
2252
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 1.5f,
Color
.FromArgb(255, 130, 255, 130) };
2253
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 1.5f,
Color
.FromArgb(255, 191, 191, 191) };
2254
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 1.5f,
Color
.FromArgb(255, 223, 200, 244) };
2255
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 1.5f,
Color
.FromArgb(255, 255, 240, 255) };
2256
yield return new object[] { SystemColors.ControlDarkDark, 1.5f,
Color
.FromArgb(255, 217, 217, 217) };
2257
yield return new object[] { SystemColors.ControlDark, 1.5f,
Color
.FromArgb(255, 231, 231, 231) };
2258
yield return new object[] { SystemColors.Control, 1.5f,
Color
.FromArgb(255, 13, 13, 13) };
2259
yield return new object[] { SystemColors.ControlLight, 1.5f,
Color
.FromArgb(255, 247, 247, 247) };
2264
private void ControlPaint_Light_InvokeColorFloat_ReturnsExpected(
Color
baseColor, float percOfLightLight,
Color
expected)
2274
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0),
Color
.FromArgb(255, 255, 128, 128) };
2275
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0),
Color
.FromArgb(255, 128, 255, 128) };
2276
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 128, 128, 255) };
2277
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 255, 255, 128) };
2278
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255),
Color
.FromArgb(255, 255, 128, 255) };
2279
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255),
Color
.FromArgb(255, 128, 255, 255) };
2280
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255),
Color
.FromArgb(255, 255, 255, 255) };
2281
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0),
Color
.FromArgb(255, 43, 255, 43) };
2282
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0),
Color
.FromArgb(255, 15, 255, 15) };
2283
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0),
Color
.FromArgb(255, 4, 255, 4) };
2284
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0),
Color
.FromArgb(255, 2, 255, 2) };
2285
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 127, 127, 127) };
2286
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200),
Color
.FromArgb(255, 190, 143, 233) };
2287
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255),
Color
.FromArgb(255, 255, 227, 255) };
2288
yield return new object[] { SystemColors.ControlDarkDark,
Color
.FromArgb(255, 180, 180, 180) };
2289
yield return new object[] { SystemColors.ControlDark,
Color
.FromArgb(255, 208, 208, 208) };
2291
yield return new object[] { SystemColors.ControlLight,
Color
.FromArgb(255, 241, 241, 241) };
2292
yield return new object[] { SystemColors.ControlLightLight,
Color
.FromArgb(255, 255, 255, 255) };
2297
public void ControlPaint_LightLight_InvokeColor_ReturnsExpected(
Color
baseColor,
Color
expected)
System\Windows\Forms\ControlPaintTests.Rendering.cs (24)
22
ControlPaint.DrawBorder(graphics, bounds,
Color
.Blue, ButtonBorderStyle.Solid);
29
State.Pen(1,
Color
.Blue, PEN_STYLE.PS_SOLID)));
41
ControlPaint.DrawBorder(graphics, bounds,
Color
.Gray, ButtonBorderStyle.Inset);
58
State.Pen(16, ControlPaint.DarkDark(
Color
.Gray), penStyle),
64
State.Pen(16, ControlPaint.DarkDark(
Color
.Gray), penStyle),
70
State.Pen(16, ControlPaint.LightLight(
Color
.Gray), penStyle),
76
State.Pen(16, ControlPaint.LightLight(
Color
.Gray), penStyle),
82
State.Pen(16, ControlPaint.Light(
Color
.Gray), penStyle),
88
State.Pen(16, ControlPaint.Light(
Color
.Gray), penStyle),
176
ControlPaint.DrawBorder(graphics, bounds,
Color
.PeachPuff, ButtonBorderStyle.Outset);
195
State.Pen(16, ControlPaint.LightLight(
Color
.PeachPuff), penStyle),
201
State.Pen(16, ControlPaint.LightLight(
Color
.PeachPuff), penStyle),
207
State.Pen(16, ControlPaint.DarkDark(
Color
.PeachPuff), penStyle),
213
State.Pen(16, ControlPaint.DarkDark(
Color
.PeachPuff), penStyle),
219
State.Pen(16,
Color
.PeachPuff, penStyle),
225
State.Pen(16,
Color
.PeachPuff, penStyle),
231
State.Pen(16, ControlPaint.Dark(
Color
.PeachPuff), penStyle),
237
State.Pen(16, ControlPaint.Dark(
Color
.PeachPuff), penStyle),
324
ControlPaint.DrawBorder(graphics, bounds,
Color
.Green, ButtonBorderStyle.Dotted);
339
State.Pen(16,
Color
.Green, penStyle),
340
State.Brush(
Color
.Green, BRUSH_STYLE.BS_SOLID)));
352
ControlPaint.DrawBorder(graphics, bounds,
Color
.Pink, ButtonBorderStyle.Dashed);
367
State.Pen(16,
Color
.Pink, penStyle),
368
State.Brush(
Color
.Pink, BRUSH_STYLE.BS_SOLID)));
System\Windows\Forms\ControlTests.ControlCollection.cs (32)
652
owner.ForeColor =
Color
.Red;
654
owner.BackColor =
Color
.Blue;
762
Assert.Equal(
Color
.Red, control.ForeColor);
764
Assert.Equal(
Color
.Blue, control.BackColor);
802
owner.ForeColor =
Color
.Red;
804
owner.BackColor =
Color
.Blue;
921
Assert.Equal(
Color
.Red, control.ForeColor);
923
Assert.Equal(
Color
.Blue, control.BackColor);
955
owner.ForeColor =
Color
.Red;
957
owner.BackColor =
Color
.Blue;
998
Assert.Equal(
Color
.Red, control.ForeColor);
1000
Assert.Equal(
Color
.Blue, control.BackColor);
1028
owner.ForeColor =
Color
.Red;
1030
owner.BackColor =
Color
.Blue;
1078
Assert.Equal(
Color
.Red, control.ForeColor);
1080
Assert.Equal(
Color
.Blue, control.BackColor);
2355
owner.ForeColor =
Color
.Red;
2356
Assert.Equal(
Color
.Red, control.ForeColor);
2357
owner.BackColor =
Color
.Blue;
2358
Assert.Equal(
Color
.Blue, control.BackColor);
2499
owner.ForeColor =
Color
.Red;
2500
Assert.Equal(
Color
.Red, control.ForeColor);
2501
owner.BackColor =
Color
.Blue;
2502
Assert.Equal(
Color
.Blue, control.BackColor);
2631
owner.ForeColor =
Color
.Red;
2632
Assert.Equal(
Color
.Red, control.ForeColor);
2633
owner.BackColor =
Color
.Blue;
2634
Assert.Equal(
Color
.Blue, control.BackColor);
2695
owner.ForeColor =
Color
.Red;
2696
Assert.Equal(
Color
.Red, control.ForeColor);
2697
owner.BackColor =
Color
.Blue;
2698
Assert.Equal(
Color
.Blue, control.BackColor);
System\Windows\Forms\ControlTests.Handlers.cs (110)
180
BackColor =
Color
.Yellow
184
BackColor =
Color
.YellowGreen
2007
ForeColor =
Color
.Yellow
2011
ForeColor =
Color
.YellowGreen
2768
yield return new object[] { true,
Color
.Empty, null };
2769
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(Rectangle.Empty) };
2770
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2771
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2772
yield return new object[] { true,
Color
.Red, null };
2773
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(Rectangle.Empty) };
2774
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2775
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2776
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), null };
2777
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(Rectangle.Empty) };
2778
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2779
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2781
yield return new object[] { false,
Color
.Empty, null };
2782
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(Rectangle.Empty) };
2783
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2784
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2785
yield return new object[] { false,
Color
.Red, null };
2786
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(Rectangle.Empty) };
2787
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2788
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2793
public void Control_OnInvalidated_InvokeWithChildren_CallsInvalidated(bool supportsTransparentBackgroundColor,
Color
backColor, InvalidateEventArgs eventArgs)
2873
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(Rectangle.Empty), 0 };
2874
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2875
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2876
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(Rectangle.Empty), 0 };
2877
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2878
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2879
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(Rectangle.Empty), 0 };
2880
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2881
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 1 };
2883
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(Rectangle.Empty), 0 };
2884
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2885
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2886
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(Rectangle.Empty), 0 };
2887
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2888
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2893
public void Control_OnInvalidated_InvokeWithChildrenWithHandle_CallsInvalidated(bool supportsTransparentBackgroundColor,
Color
backColor, InvalidateEventArgs eventArgs, int expectedChildInvalidatedCallCount)
2984
child1.BackColor =
Color
.FromArgb(200, 50, 100, 150);
3276
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
3707
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
3840
yield return new object[] { true,
Color
.Empty, backgroundImage, backgroundImageLayout };
3841
yield return new object[] { true,
Color
.Red, backgroundImage, backgroundImageLayout };
3842
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout };
3843
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout };
3844
yield return new object[] { false,
Color
.Empty, backgroundImage, backgroundImageLayout };
3845
yield return new object[] { false,
Color
.Red, backgroundImage, backgroundImageLayout };
3852
public void Control_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
3903
yield return new object[] { parent, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
3904
yield return new object[] { parent, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
3905
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
3906
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
3907
yield return new object[] { parent, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
3908
yield return new object[] { parent, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
3912
yield return new object[] { parent, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3913
yield return new object[] { parent, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3914
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
3915
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
3916
yield return new object[] { parent, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3917
yield return new object[] { parent, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3919
yield return new object[] { parent, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3920
yield return new object[] { parent, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3921
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
3922
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
3923
yield return new object[] { parent, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3924
yield return new object[] { parent, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3947
yield return new object[] { parent, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
3948
yield return new object[] { parent, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
3949
yield return new object[] { parent, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
3950
yield return new object[] { parent, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
3951
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected1 };
3952
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected1 };
3956
yield return new object[] { parent, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3957
yield return new object[] { parent, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3958
yield return new object[] { parent, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3959
yield return new object[] { parent, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3960
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
3961
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
3963
yield return new object[] { parent, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3964
yield return new object[] { parent, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3965
yield return new object[] { parent, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3966
yield return new object[] { parent, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3967
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3968
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3974
public void Control_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
4024
public void Control_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
4075
yield return new object[] { true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4076
yield return new object[] { true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4077
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4078
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4079
yield return new object[] { false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4080
yield return new object[] { false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4084
yield return new object[] { true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4085
yield return new object[] { true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4086
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4087
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4088
yield return new object[] { false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4089
yield return new object[] { false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4091
yield return new object[] { true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4092
yield return new object[] { true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4093
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4094
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4095
yield return new object[] { false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4096
yield return new object[] { false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4101
public void Control_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
4227
BackColor =
Color
.Red
4543
ForeColor =
Color
.Red
System\Windows\Forms\ControlTests.Methods.cs (40)
4314
otherControl.BackColor =
Color
.FromArgb(100, 50, 100, 150);
4559
yield return new object[] { true,
Color
.Empty, null };
4560
yield return new object[] { true,
Color
.Empty, Rectangle.Empty };
4561
yield return new object[] { true,
Color
.Empty, new Rectangle(100, 200, 300, 400) };
4562
yield return new object[] { true,
Color
.Empty, new Rectangle(1, 2, 300, 400) };
4563
yield return new object[] { true,
Color
.Red, null };
4564
yield return new object[] { true,
Color
.Red, Rectangle.Empty };
4565
yield return new object[] { true,
Color
.Red, new Rectangle(100, 200, 300, 400) };
4566
yield return new object[] { true,
Color
.Red, new Rectangle(1, 2, 300, 400) };
4567
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), null };
4568
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), Rectangle.Empty };
4569
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new Rectangle(100, 200, 300, 400) };
4570
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new Rectangle(1, 2, 300, 400) };
4572
yield return new object[] { false,
Color
.Empty, null };
4573
yield return new object[] { false,
Color
.Empty, Rectangle.Empty };
4574
yield return new object[] { false,
Color
.Empty, new Rectangle(100, 200, 300, 400) };
4575
yield return new object[] { false,
Color
.Empty, new Rectangle(1, 2, 300, 400) };
4576
yield return new object[] { false,
Color
.Red, null };
4577
yield return new object[] { false,
Color
.Red, Rectangle.Empty };
4578
yield return new object[] { false,
Color
.Red, new Rectangle(100, 200, 300, 400) };
4579
yield return new object[] { false,
Color
.Red, new Rectangle(1, 2, 300, 400) };
4584
public void Control_NotifyInvalidate_InvokeWithChildren_CallsInvalidated(bool supportsTransparentBackgroundColor,
Color
backColor, Rectangle invalidatedArea)
4664
yield return new object[] { true,
Color
.Empty, Rectangle.Empty, 0 };
4665
yield return new object[] { true,
Color
.Empty, new Rectangle(100, 200, 300, 400), 0 };
4666
yield return new object[] { true,
Color
.Empty, new Rectangle(1, 2, 300, 400), 0 };
4667
yield return new object[] { true,
Color
.Red, Rectangle.Empty, 0 };
4668
yield return new object[] { true,
Color
.Red, new Rectangle(100, 200, 300, 400), 0 };
4669
yield return new object[] { true,
Color
.Red, new Rectangle(1, 2, 300, 400), 0 };
4670
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), Rectangle.Empty, 0 };
4671
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new Rectangle(100, 200, 300, 400), 0 };
4672
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new Rectangle(1, 2, 300, 400), 1 };
4674
yield return new object[] { false,
Color
.Empty, Rectangle.Empty, 0 };
4675
yield return new object[] { false,
Color
.Empty, new Rectangle(100, 200, 300, 400), 0 };
4676
yield return new object[] { false,
Color
.Empty, new Rectangle(1, 2, 300, 400), 0 };
4677
yield return new object[] { false,
Color
.Red, Rectangle.Empty, 0 };
4678
yield return new object[] { false,
Color
.Red, new Rectangle(100, 200, 300, 400), 0 };
4679
yield return new object[] { false,
Color
.Red, new Rectangle(1, 2, 300, 400), 0 };
4684
public void Control_NotifyInvalidate_InvokeWithChildrenWithHandle_CallsInvalidated(bool supportsTransparentBackgroundColor,
Color
backColor, Rectangle invalidatedArea, int expectedChildInvalidatedCallCount)
6386
control.BackColor =
Color
.Black;
6464
control.ForeColor =
Color
.Black;
System\Windows\Forms\ControlTests.Properties.cs (169)
1227
public void Control_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1244
public void Control_BackColor_SetWithCustomOldValue_GetReturnsExpected(
Color
value,
Color
expected)
1248
BackColor =
Color
.YellowGreen
1263
yield return new object[] {
Color
.Red,
Color
.Red };
1264
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1265
yield return new object[] {
Color
.Empty, Control.DefaultBackColor };
1270
public void Control_BackColor_SetTransparent_GetReturnsExpected(
Color
value,
Color
expected)
1287
public void Control_BackColor_SetWithChildren_GetReturnsExpected(
Color
value,
Color
expected)
1311
public void Control_BackColor_SetWithChildrenWithColor_GetReturnsExpected(
Color
value,
Color
expected)
1315
BackColor =
Color
.Yellow
1319
BackColor =
Color
.YellowGreen
1327
Assert.Equal(
Color
.Yellow, child1.BackColor);
1328
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1334
Assert.Equal(
Color
.Yellow, child1.BackColor);
1335
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1341
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1342
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
1347
public void Control_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1388
control.BackColor =
Color
.Red;
1389
Assert.Equal(
Color
.Red, control.BackColor);
1393
control.BackColor =
Color
.Red;
1394
Assert.Equal(
Color
.Red, control.BackColor);
1398
control.BackColor =
Color
.Empty;
1404
control.BackColor =
Color
.Red;
1405
Assert.Equal(
Color
.Red, control.BackColor);
1423
control.BackColor =
Color
.Red;
1424
Assert.Equal(
Color
.Red, control.BackColor);
1475
control.BackColor =
Color
.Red;
1476
Assert.Equal(
Color
.Red, control.BackColor);
1477
Assert.Equal(
Color
.Red, child1.BackColor);
1478
Assert.Equal(
Color
.Red, child2.BackColor);
1484
control.BackColor =
Color
.Red;
1485
Assert.Equal(
Color
.Red, control.BackColor);
1486
Assert.Equal(
Color
.Red, child1.BackColor);
1487
Assert.Equal(
Color
.Red, child2.BackColor);
1493
control.BackColor =
Color
.Empty;
1505
control.BackColor =
Color
.Red;
1506
Assert.Equal(
Color
.Red, control.BackColor);
1507
Assert.Equal(
Color
.Red, child1.BackColor);
1508
Assert.Equal(
Color
.Red, child2.BackColor);
1519
BackColor =
Color
.Yellow
1523
BackColor =
Color
.YellowGreen
1555
control.BackColor =
Color
.Red;
1556
Assert.Equal(
Color
.Red, control.BackColor);
1557
Assert.Equal(
Color
.Yellow, child1.BackColor);
1558
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1564
control.BackColor =
Color
.Red;
1565
Assert.Equal(
Color
.Red, control.BackColor);
1566
Assert.Equal(
Color
.Yellow, child1.BackColor);
1567
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1573
control.BackColor =
Color
.Empty;
1575
Assert.Equal(
Color
.Yellow, child1.BackColor);
1576
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1585
control.BackColor =
Color
.Red;
1586
Assert.Equal(
Color
.Red, control.BackColor);
1587
Assert.Equal(
Color
.Yellow, child1.BackColor);
1588
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1598
Assert.Throws<ArgumentException>(() => control.BackColor =
Color
.FromArgb(254, 1, 2, 3));
1608
control.BackColor =
Color
.Red;
1609
Assert.Equal(
Color
.Red, control.BackColor);
1624
control.BackColor =
Color
.Red;
1625
Assert.Equal(
Color
.Red, control.BackColor);
5291
public void Control_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
5308
public void Control_ForeColor_SetWithCustomOldValue_GetReturnsExpected(
Color
value,
Color
expected)
5312
ForeColor =
Color
.YellowGreen
5327
public void Control_ForeColor_SetWithChildren_GetReturnsExpected(
Color
value,
Color
expected)
5351
public void Control_ForeColor_SetWithChildrenWithColor_GetReturnsExpected(
Color
value,
Color
expected)
5355
ForeColor =
Color
.Yellow
5359
ForeColor =
Color
.YellowGreen
5367
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5368
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5374
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5375
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5381
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
5382
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
5383
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
5388
public void Control_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
5429
control.ForeColor =
Color
.Red;
5430
Assert.Equal(
Color
.Red, control.ForeColor);
5434
control.ForeColor =
Color
.Red;
5435
Assert.Equal(
Color
.Red, control.ForeColor);
5439
control.ForeColor =
Color
.Empty;
5445
control.ForeColor =
Color
.Red;
5446
Assert.Equal(
Color
.Red, control.ForeColor);
5464
control.ForeColor =
Color
.Red;
5465
Assert.Equal(
Color
.Red, control.ForeColor);
5516
control.ForeColor =
Color
.Red;
5517
Assert.Equal(
Color
.Red, control.ForeColor);
5518
Assert.Equal(
Color
.Red, child1.ForeColor);
5519
Assert.Equal(
Color
.Red, child2.ForeColor);
5525
control.ForeColor =
Color
.Red;
5526
Assert.Equal(
Color
.Red, control.ForeColor);
5527
Assert.Equal(
Color
.Red, child1.ForeColor);
5528
Assert.Equal(
Color
.Red, child2.ForeColor);
5534
control.ForeColor =
Color
.Empty;
5546
control.ForeColor =
Color
.Red;
5547
Assert.Equal(
Color
.Red, control.ForeColor);
5548
Assert.Equal(
Color
.Red, child1.ForeColor);
5549
Assert.Equal(
Color
.Red, child2.ForeColor);
5560
ForeColor =
Color
.Yellow
5564
ForeColor =
Color
.YellowGreen
5596
control.ForeColor =
Color
.Red;
5597
Assert.Equal(
Color
.Red, control.ForeColor);
5598
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5599
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5605
control.ForeColor =
Color
.Red;
5606
Assert.Equal(
Color
.Red, control.ForeColor);
5607
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5608
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5614
control.ForeColor =
Color
.Empty;
5616
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5617
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5626
control.ForeColor =
Color
.Red;
5627
Assert.Equal(
Color
.Red, control.ForeColor);
5628
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5629
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5642
control.ForeColor =
Color
.Red;
5643
Assert.Equal(
Color
.Red, control.ForeColor);
5658
control.ForeColor =
Color
.Red;
5659
Assert.Equal(
Color
.Red, control.ForeColor);
7061
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
7546
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
10724
BackColor =
Color
.Blue,
10727
ForeColor =
Color
.Red
10740
BackColor =
Color
.Blue,
10743
ForeColor =
Color
.Red
10756
BackColor =
Color
.Red,
10759
ForeColor =
Color
.Blue
10811
Assert.Equal(
Color
.Blue, control.BackColor);
10813
Assert.Equal(
Color
.Red, control.ForeColor);
10827
Assert.Equal(
Color
.Blue, control.BackColor);
10829
Assert.Equal(
Color
.Red, control.ForeColor);
10843
Assert.Equal(
Color
.Blue, control.BackColor);
10845
Assert.Equal(
Color
.Red, control.ForeColor);
10859
Assert.Equal(
Color
.Red, control.BackColor);
10861
Assert.Equal(
Color
.Blue, control.ForeColor);
10898
BackColor =
Color
.Blue,
10901
ForeColor =
Color
.Red
10914
BackColor =
Color
.Blue,
10917
ForeColor =
Color
.Red
10930
BackColor =
Color
.Red,
10933
ForeColor =
Color
.Blue
10957
BackColor =
Color
.Green,
10959
ForeColor =
Color
.Yellow,
10993
Assert.Equal(
Color
.Green, control.BackColor);
10995
Assert.Equal(
Color
.Yellow, control.ForeColor);
11009
Assert.Equal(
Color
.Green, control.BackColor);
11011
Assert.Equal(
Color
.Yellow, control.ForeColor);
11025
Assert.Equal(
Color
.Green, control.BackColor);
11027
Assert.Equal(
Color
.Yellow, control.ForeColor);
11041
Assert.Equal(
Color
.Green, control.BackColor);
11043
Assert.Equal(
Color
.Yellow, control.ForeColor);
12493
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
System\Windows\Forms\DataGridViewCellStyleTests.cs (96)
19
Assert.Equal(
Color
.Empty, style.BackColor);
22
Assert.Equal(
Color
.Empty, style.ForeColor);
30
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
31
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
43
BackColor =
Color
.Red,
46
ForeColor =
Color
.Blue,
51
SelectionBackColor =
Color
.Green,
52
SelectionForeColor =
Color
.Yellow,
60
Assert.Equal(
Color
.Red, style.BackColor);
63
Assert.Equal(
Color
.Blue, style.ForeColor);
71
Assert.Equal(
Color
.Green, style.SelectionBackColor);
72
Assert.Equal(
Color
.Yellow, style.SelectionForeColor);
86
Assert.Equal(
Color
.Empty, style.BackColor);
89
Assert.Equal(
Color
.Empty, style.ForeColor);
97
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
98
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
134
public void DataGridViewCellStyle_BackColor_Set_GetReturnsExpected(
Color
value)
152
BackColor =
Color
.Red
154
style.BackColor =
Color
.Empty;
155
Assert.Equal(
Color
.Empty, style.BackColor);
292
public void DataGridViewCellStyle_ForeColor_Set_GetReturnsExpected(
Color
value)
310
ForeColor =
Color
.Red
312
style.ForeColor =
Color
.Empty;
313
Assert.Equal(
Color
.Empty, style.ForeColor);
510
public void DataGridViewCellStyle_SelectionBackColor_Set_GetReturnsExpected(
Color
value)
528
SelectionBackColor =
Color
.Red
530
style.SelectionBackColor =
Color
.Empty;
531
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
536
public void DataGridViewCellStyle_SelectionForeColor_Set_GetReturnsExpected(
Color
value)
554
SelectionForeColor =
Color
.Red
556
style.SelectionForeColor =
Color
.Empty;
557
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
621
BackColor =
Color
.Red,
624
ForeColor =
Color
.Blue,
629
SelectionBackColor =
Color
.Green,
630
SelectionForeColor =
Color
.Yellow,
639
Assert.Equal(
Color
.Red, style.BackColor);
642
Assert.Equal(
Color
.Blue, style.ForeColor);
650
Assert.Equal(
Color
.Green, style.SelectionBackColor);
651
Assert.Equal(
Color
.Yellow, style.SelectionForeColor);
664
BackColor =
Color
.Red,
667
ForeColor =
Color
.Blue,
672
SelectionBackColor =
Color
.Green,
673
SelectionForeColor =
Color
.Yellow,
681
Assert.Equal(
Color
.Red, style.BackColor);
684
Assert.Equal(
Color
.Blue, style.ForeColor);
692
Assert.Equal(
Color
.Green, style.SelectionBackColor);
693
Assert.Equal(
Color
.Yellow, style.SelectionForeColor);
712
BackColor =
Color
.Red,
715
ForeColor =
Color
.Blue,
720
SelectionBackColor =
Color
.Green,
721
SelectionForeColor =
Color
.Yellow,
729
Assert.Equal(
Color
.Red, style.BackColor);
732
Assert.Equal(
Color
.Blue, style.ForeColor);
740
Assert.Equal(
Color
.Green, style.SelectionBackColor);
741
Assert.Equal(
Color
.Yellow, style.SelectionForeColor);
755
Assert.Equal(
Color
.Empty, style.BackColor);
758
Assert.Equal(
Color
.Empty, style.ForeColor);
766
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
767
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
779
BackColor =
Color
.Red,
782
ForeColor =
Color
.Blue,
787
SelectionBackColor =
Color
.Green,
788
SelectionForeColor =
Color
.Yellow,
796
Assert.Equal(
Color
.Red, style.BackColor);
799
Assert.Equal(
Color
.Blue, style.ForeColor);
807
Assert.Equal(
Color
.Green, style.SelectionBackColor);
808
Assert.Equal(
Color
.Yellow, style.SelectionForeColor);
822
Assert.Equal(
Color
.Empty, style.BackColor);
825
Assert.Equal(
Color
.Empty, style.ForeColor);
833
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
834
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
860
new DataGridViewCellStyle { BackColor =
Color
.Red },
861
new DataGridViewCellStyle { BackColor =
Color
.Red },
866
new DataGridViewCellStyle { BackColor =
Color
.Red },
867
new DataGridViewCellStyle { BackColor =
Color
.Blue },
896
new DataGridViewCellStyle { ForeColor =
Color
.Red },
897
new DataGridViewCellStyle { ForeColor =
Color
.Red },
902
new DataGridViewCellStyle { ForeColor =
Color
.Red },
903
new DataGridViewCellStyle { ForeColor =
Color
.Blue },
980
new DataGridViewCellStyle { SelectionBackColor =
Color
.Red },
981
new DataGridViewCellStyle { SelectionBackColor =
Color
.Red },
986
new DataGridViewCellStyle { SelectionBackColor =
Color
.Red },
987
new DataGridViewCellStyle { SelectionBackColor =
Color
.Blue },
992
new DataGridViewCellStyle { SelectionForeColor =
Color
.Red },
993
new DataGridViewCellStyle { SelectionForeColor =
Color
.Red },
998
new DataGridViewCellStyle { SelectionForeColor =
Color
.Red },
999
new DataGridViewCellStyle { SelectionForeColor =
Color
.Blue },
1053
new DataGridViewCellStyle { BackColor =
Color
.Red },
1068
new DataGridViewCellStyle { ForeColor =
Color
.Red },
1103
new DataGridViewCellStyle { SelectionBackColor =
Color
.Red },
1108
new DataGridViewCellStyle { SelectionForeColor =
Color
.Red },
1128
BackColor =
Color
.Red,
1131
ForeColor =
Color
.Blue,
1136
SelectionBackColor =
Color
.Green,
1137
SelectionForeColor =
Color
.Yellow,
System\Windows\Forms\DataGridViewRowTests.cs (16)
2064
BackColor =
Color
.Green,
2067
ForeColor =
Color
.Blue,
2072
SelectionForeColor =
Color
.Red,
2073
SelectionBackColor =
Color
.Yellow,
2080
BackColor =
Color
.Blue,
2083
ForeColor =
Color
.Green,
2088
SelectionForeColor =
Color
.Yellow,
2089
SelectionBackColor =
Color
.Red,
4186
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 };
4187
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 };
4188
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 };
4189
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 (19)
793
yield return new object[] { new DataGridViewCellStyle { BackColor =
Color
.Empty } };
794
yield return new object[] { new DataGridViewCellStyle { ForeColor =
Color
.Empty } };
795
yield return new object[] { new DataGridViewCellStyle { SelectionBackColor =
Color
.Empty } };
796
yield return new object[] { new DataGridViewCellStyle { SelectionForeColor =
Color
.Empty } };
2339
ForeColor =
Color
.Maroon,
2929
dataGrid.GridColor =
Color
.Red;
2932
Assert.Equal(
Color
.Red, dataGrid.GridColor);
3047
_dataGridView.AlternatingRowsDefaultCellStyle = new() { BackColor =
Color
.AliceBlue };
3087
_dataGridView.BackgroundColor =
Color
.AliceBlue;
3091
_dataGridView.BackgroundColor =
Color
.Azure;
3167
_dataGridView.ColumnHeadersDefaultCellStyle = new() { BackColor =
Color
.Red };
3227
_dataGridView.DefaultCellStyle = new() { BackColor =
Color
.Red };
3267
_dataGridView.GridColor =
Color
.Red;
3271
_dataGridView.GridColor =
Color
.Blue;
3367
_dataGridView.RowsDefaultCellStyle = new() { BackColor =
Color
.Red };
3480
TestEvent(nameof(DataGridView.BackColorChanged), nameof(DataGridView.BackColor),
Color
.Red,
Color
.Blue);
3501
TestEvent(nameof(DataGridView.ForeColorChanged), nameof(DataGridView.ForeColor),
Color
.Red,
Color
.Blue);
System\Windows\Forms\DataGridViewTests.Rendering.cs (9)
21
GridColor =
Color
.Blue,
56
State.Pen(1,
Color
.Empty, PEN_STYLE.PS_NULL),
63
State.Pen(16,
Color
.Blue, penStyle),
69
State.Pen(16,
Color
.Blue, penStyle),
75
State.Pen(16,
Color
.Blue, penStyle),
81
State.Pen(16,
Color
.Blue, penStyle),
87
State.Pen(1,
Color
.Empty, PEN_STYLE.PS_NULL),
95
State.Brush(
Color
.Empty, BRUSH_STYLE.BS_NULL),
124
ForeColor =
Color
.Maroon,
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (83)
546
yield return new object[] { new DataGridViewCellStyle(), null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false };
552
BackColor =
Color
.Gray,
553
ForeColor =
Color
.Green
555
yield return new object[] { customStyle, font,
Color
.Gray,
Color
.Green, false, HorizontalAlignment.Left, false };
560
BackColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
561
ForeColor =
Color
.FromArgb(0x23, 0x45, 0x67, 0x80)
563
yield return new object[] { transparentStyle, font,
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78),
Color
.FromArgb(0x23, 0x45, 0x67, 0x80), false, HorizontalAlignment.Left, false };
572
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
581
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true
590
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
599
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true
608
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
617
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true
627
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
636
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true
645
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
654
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true
663
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
672
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true
682
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
691
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, false
700
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
709
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, false
718
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
727
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, false
733
public void DataGridViewTextBoxEditingDataGridViewTextBoxEditingControl_ApplyCellStyleToEditingDataGridViewTextBoxEditingControl_Invoke_Success(DataGridViewCellStyle dataGridViewCellStyle, Font expectedFont,
Color
expectedBackColor,
Color
expectedForeColor, bool expectedWordWrap, HorizontalAlignment expectedTextAlign, bool expectedRepositionOnValueChange)
739
BackColor =
Color
.Red,
740
ForeColor =
Color
.Blue,
755
yield return new object[] { new DataGridViewCellStyle(), null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false };
761
BackColor =
Color
.Gray,
762
ForeColor =
Color
.Green
764
yield return new object[] { customStyle, font,
Color
.Gray, SystemColors.Control,
Color
.Green, false, HorizontalAlignment.Left, false };
769
BackColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
770
ForeColor =
Color
.FromArgb(0x23, 0x45, 0x67, 0x80)
772
yield return new object[] { transparentStyle, font,
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78),
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78),
Color
.FromArgb(0x23, 0x45, 0x67, 0x80), false, HorizontalAlignment.Left, false };
781
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
790
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true
799
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
808
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true
817
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
826
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true
836
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
845
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true
854
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
863
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true
872
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
881
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true
891
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
900
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, false
909
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
918
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, false
927
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
936
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, false
942
public void DataGridViewTextBoxEditingDataGridViewTextBoxEditingControl_ApplyCellStyleToEditingDataGridViewTextBoxEditingControl_InvokeWithDataGridView_Success(DataGridViewCellStyle dataGridViewCellStyle, Font expectedFont,
Color
expectedBackColor,
Color
expectedEditingPanelBackColor,
Color
expectedForeColor, bool expectedWordWrap, HorizontalAlignment expectedTextAlign, bool expectedRepositionOnValueChange)
950
BackColor =
Color
.Red,
951
ForeColor =
Color
.Blue,
System\Windows\Forms\DateTimePickerTests.cs (14)
175
var
expectedColor =
Color
.Red;
197
var
expectedColor =
Color
.Red;
219
var
expectedColor =
Color
.Red;
241
var
expectedColor =
Color
.Red;
263
var
expectedColor =
Color
.Red;
697
control.BackColor =
Color
.Red;
701
control.BackColor =
Color
.Green;
810
control.ForeColor =
Color
.Red;
814
control.ForeColor =
Color
.Blue;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
156
Assert.Equal(
Color
.Empty, control.TransparencyKey);
System\Windows\Forms\DrawItemEventArgsTests.cs (16)
22
public void DrawItemEventArgs_Ctor_Graphics_Font_Rectangle_Int_DrawItemState(Font font, Rectangle rect, int index, DrawItemState state,
Color
expectedForeColor,
Color
expectedBackColor)
38
yield return new object[] { null, Rectangle.Empty, -2, DrawItemState.None - 1,
Color
.Empty,
Color
.Empty };
39
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None,
Color
.Red,
Color
.Blue };
40
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected,
Color
.Red,
Color
.Blue };
41
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus,
Color
.Red,
Color
.Blue };
42
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect,
Color
.Red,
Color
.Blue };
47
public void DrawItemEventArgs_Ctor_Graphics_Font_Rectangle_Int_DrawItemState_Color_Color(Font font, Rectangle rect, int index, DrawItemState state,
Color
foreColor,
Color
backColor)
66
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None,
Color
.Red,
Color
.Blue));
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (32)
13
yield return new object[] { Rectangle.Empty, -2, null, (DrawItemState)(ListViewItemStates.Checked - 1),
Color
.Empty,
Color
.Empty, null };
14
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
15
yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
16
yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
21
public void DrawListViewColumnHeaderEventArgs_Ctor_Graphics_Rectangle_Int_ColumnHeader_ListViewItemStates_Color_Color_Font(Rectangle bounds, int columnIndex, ColumnHeader header, ListViewItemStates state,
Color
foreColor,
Color
backColor, Font font)
40
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont));
49
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont)
66
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
67
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
68
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
73
public void DrawListViewColumnHeaderEventArgs_DrawBackground_Invoke_Success(Rectangle bounds, ColumnHeader header, ListViewItemStates state,
Color
foreColor,
Color
backColor, Font font)
90
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont);
99
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont);
105
yield return new object[] { new Rectangle(-1, -2, -3, -4), 0, ListViewItemStates.Default,
Color
.Empty,
Color
.Empty, null };
106
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
111
public void DrawListViewColumnHeaderEventArgs_DrawText_NullHeader_Success(Rectangle bounds, int columnIndex, ListViewItemStates state,
Color
foreColor,
Color
backColor, Font font)
System\Windows\Forms\DrawToolTipEventArgsTests.cs (28)
13
yield return new object[] { null, null, Rectangle.Empty, null,
Color
.Empty,
Color
.Empty, null };
14
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "",
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
15
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(-1, -2, -3, -4), "toolTipText",
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
20
public void Ctor_Graphics_IWin32Window_Control_Rectangle_String_Color_Color_Font(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText,
Color
backColor,
Color
foreColor, Font font)
35
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), null,
Color
.Empty,
Color
.Empty, null };
36
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), string.Empty,
Color
.Empty,
Color
.Empty, null };
37
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), "tooltipText",
Color
.Empty,
Color
.Empty, null };
38
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
39
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
40
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), "tooltipText",
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
45
public void DrawBackground_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText,
Color
backColor,
Color
foreColor, Font font)
55
public void DrawText_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText,
Color
backColor,
Color
foreColor, Font font)
65
public void DrawText_InvokeTextFormatFlags_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText,
Color
backColor,
Color
foreColor, Font font)
75
public void DrawBorder_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText,
Color
backColor,
Color
foreColor, Font font)
System\Windows\Forms\FontDialogTests.cs (16)
20
Assert.Equal(
Color
.Black, dialog.Color);
50
Assert.Equal(
Color
.Empty, dialog.Color);
164
yield return new object[] {
Color
.Empty,
Color
.Black };
165
yield return new object[] {
Color
.Black,
Color
.Black };
166
yield return new object[] {
Color
.Red,
Color
.Red };
167
yield return new object[] {
Color
.FromArgb(1, 2, 3, 4),
Color
.FromArgb(1, 2, 3, 4) };
173
public void FontDialog_Color_Set_GetReturnsExpected(
Color
value,
Color
expected)
188
public void FontDialog_Color_SetWithCustomOldValue_GetReturnsExpected(
Color
value,
Color
expected)
192
Color =
Color
.Yellow
609
Assert.Equal(
Color
.Black, dialog.Color);
System\Windows\Forms\FormTests.cs (95)
158
Assert.Equal(
Color
.Empty, control.TransparencyKey);
315
Assert.Equal(
Color
.Empty, control.TransparencyKey);
322
Assert.Equal(
Color
.Empty, control.TransparencyKey);
329
Assert.Equal(
Color
.Empty, control.TransparencyKey);
336
yield return new object[] { true,
Color
.Red, 0.5 };
337
yield return new object[] { false,
Color
.Empty, 1 };
342
public void Form_AllowTransparency_SetWithOpacityAndTransparencyKey_GetReturnsExpected(bool value,
Color
expectedTransparencyKey, float expectedOpacity)
347
TransparencyKey =
Color
.Red,
365
Assert.Equal(
Color
.Empty, control.TransparencyKey);
380
Assert.Equal(
Color
.Empty, control.TransparencyKey);
387
Assert.Equal(
Color
.Empty, control.TransparencyKey);
394
Assert.Equal(
Color
.Empty, control.TransparencyKey);
415
Assert.Equal(
Color
.Empty, control.TransparencyKey);
425
Assert.Equal(
Color
.Empty, control.TransparencyKey);
435
Assert.Equal(
Color
.Empty, control.TransparencyKey);
445
yield return new object[] { true,
Color
.Red, 0.5, 0 };
446
yield return new object[] { false,
Color
.Empty, 1, 1 };
451
public void Form_AllowTransparency_SetWithOpacityAndTransparencyKeyWithHandle_GetReturnsExpected(bool value,
Color
expectedTransparencyKey, float expectedOpacity, int expectedStyleChangedCallCount)
456
TransparencyKey =
Color
.Red
488
Assert.Equal(
Color
.Empty, control.TransparencyKey);
515
Assert.Equal(
Color
.Empty, control.TransparencyKey);
525
Assert.Equal(
Color
.Empty, control.TransparencyKey);
535
Assert.Equal(
Color
.Empty, control.TransparencyKey);
630
Assert.Equal(
Color
.Empty, control.TransparencyKey);
637
Assert.Equal(
Color
.Empty, control.TransparencyKey);
660
TransparencyKey =
Color
.Red,
665
Assert.Equal(
Color
.Red, control.TransparencyKey);
672
Assert.Equal(
Color
.Red, control.TransparencyKey);
688
Assert.Equal(
Color
.Empty, control.TransparencyKey);
695
Assert.Equal(
Color
.Empty, control.TransparencyKey);
725
Assert.Equal(
Color
.Empty, control.TransparencyKey);
735
Assert.Equal(
Color
.Empty, control.TransparencyKey);
763
Assert.Equal(
Color
.Empty, control.TransparencyKey);
772
Assert.Equal(
Color
.Empty, control.TransparencyKey);
807
Assert.Equal(
Color
.Empty, control.TransparencyKey);
816
Assert.Equal(
Color
.Empty, control.TransparencyKey);
842
control.TransparencyKey =
Color
.Red;
853
Assert.Equal(
Color
.Red, control.TransparencyKey);
863
Assert.Equal(
Color
.Red, control.TransparencyKey);
905
Assert.Equal(
Color
.Empty, control.TransparencyKey);
915
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1268
yield return new object[] { allowTransparency,
Color
.Empty, allowTransparency };
1269
yield return new object[] { allowTransparency,
Color
.Red, true };
1270
yield return new object[] { allowTransparency,
Color
.Transparent, true };
1276
public void Form_TransparencyKey_Set_GetReturnsExpected(bool allowTransparency,
Color
value, bool expectedAllowTransparency)
1300
yield return new object[] { allowTransparency,
Color
.Empty };
1301
yield return new object[] { allowTransparency,
Color
.Red };
1302
yield return new object[] { allowTransparency,
Color
.Transparent };
1308
public void Form_TransparencyKey_SetWithCustomOldValue_GetReturnsExpected(bool allowTransparency,
Color
value)
1313
TransparencyKey =
Color
.Yellow
1334
yield return new object[] { allowTransparency,
Color
.Empty };
1335
yield return new object[] { allowTransparency,
Color
.Red };
1336
yield return new object[] { allowTransparency,
Color
.Transparent };
1342
public void Form_TransparencyKey_SetWithOpacity_GetReturnsExpected(bool allowTransparency,
Color
value)
1367
yield return new object[] { allowTransparency,
Color
.Empty };
1368
yield return new object[] { allowTransparency,
Color
.Red };
1369
yield return new object[] { allowTransparency,
Color
.Transparent };
1375
public void Form_TransparencyKey_SetMdiContainer_Nop(bool allowTransparency,
Color
value)
1397
public void Form_TransparencyKey_SetNotTopLevel_GetReturnsExpected(bool allowTransparency,
Color
value, bool expectedAllowTransparency)
1430
control.TransparencyKey =
Color
.Empty;
1433
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1440
control.TransparencyKey =
Color
.Empty;
1443
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1452
yield return new object[] {
Color
.Red, true, 2 };
1453
yield return new object[] {
Color
.Transparent, true, 2 };
1458
public void Form_TransparencyKey_SetTransparentWithHandleSetNotAllowTransparency_GetReturnsExpected(
Color
value, bool expectedAllowTransparency, int expectedStyleChangedCallCount)
1504
control.TransparencyKey =
Color
.Empty;
1507
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1514
control.TransparencyKey =
Color
.Empty;
1517
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1526
yield return new object[] {
Color
.Red };
1527
yield return new object[] {
Color
.Transparent };
1532
public void Form_TransparencyKey_SetTransparentWithHandleSetAllowTransparencyBefore_GetReturnsExpected(
Color
value)
1579
control.TransparencyKey =
Color
.Empty;
1582
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1589
control.TransparencyKey =
Color
.Empty;
1592
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1601
public void Form_TransparencyKey_SetTransparentWithHandleSetAllowTransparencyAfter_GetReturnsExpected(
Color
value)
1648
control.TransparencyKey =
Color
.Empty;
1651
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1658
control.TransparencyKey =
Color
.Empty;
1661
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1670
public void Form_TransparencyKey_SetTransparentWithHandleSetOpacityBefore_GetReturnsExpected(
Color
value)
1717
control.TransparencyKey =
Color
.Empty;
1720
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1727
control.TransparencyKey =
Color
.Empty;
1730
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1739
public void Form_TransparencyKey_SetTransparentWithHandleSetOpacityAfter_GetReturnsExpected(
Color
value)
1773
yield return new object[] { true,
Color
.Empty, true, 1 };
1774
yield return new object[] { true,
Color
.Red, true, 0 };
1775
yield return new object[] { true,
Color
.Transparent, true, 0 };
1777
yield return new object[] { false,
Color
.Empty, false, 0 };
1778
yield return new object[] { false,
Color
.Red, true, 2 };
1779
yield return new object[] { false,
Color
.Transparent, true, 2 };
1784
public void Form_TransparencyKey_SetNotTopLevelWithHandle_GetReturnsExpected(bool allowTransparency,
Color
value, bool expectedAllowTransparency, int expectedStyleChangedCallCount)
System\Windows\Forms\GroupBoxTests.cs (6)
1829
foreach (
Color
foreColor in new
Color
[] {
Color
.Red,
Color
.Empty })
1847
public void GroupBox_OnPaint_Invoke_CallsPaint(Size size, bool enabled, bool useCompatibleTextRendering, RightToLeft rightToLeft,
Color
foreColor, string text)
1885
public void GroupBox_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabled, bool useCompatibleTextRendering, RightToLeft rightToLeft,
Color
foreColor, string text)
System\Windows\Forms\HtmlDocumentTests.cs (163)
26
Assert.Equal(
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF), document.ActiveLinkColor);
31
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
32
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
33
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
34
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
35
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
36
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
37
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
38
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
39
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
40
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
41
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
42
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
43
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
48
public async Task HtmlDocument_ActiveLinkColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
63
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
64
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
65
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
66
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
67
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
68
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
69
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
70
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
71
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
72
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
73
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
74
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
75
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
80
public async Task HtmlDocument_ActiveLinkColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
104
public async Task HtmlDocument_ActiveLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
243
Assert.Equal(
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), document.BackColor);
248
yield return new object[] { null,
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
249
yield return new object[] { "",
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
250
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
251
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
252
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
253
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
254
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
255
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
256
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
257
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
258
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
259
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
260
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
265
public async Task HtmlDocument_BackColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
280
yield return new object[] { null,
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
281
yield return new object[] { "",
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
282
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
283
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
284
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
285
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
286
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
287
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
288
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
289
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
290
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
291
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
292
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
297
public async Task HtmlDocument_BackColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
319
yield return new object[] {
Color
.Empty,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), "#000000" };
320
yield return new object[] {
Color
.Red,
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00), "#ff0000" };
321
yield return new object[] {
Color
.White,
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), "#ffffff" };
322
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78), "#345678" };
327
public async Task HtmlDocument_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
723
Assert.Equal(
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), document.ForeColor);
728
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
729
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
730
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
731
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
732
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
733
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
734
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
735
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
736
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
737
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
738
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
739
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
740
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
745
public async Task HtmlDocument_ForeColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
760
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
761
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
762
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
763
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
764
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
765
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
766
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
767
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
768
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
769
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
770
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
771
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
772
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
777
public async Task HtmlDocument_ForeColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
799
public async Task HtmlDocument_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
912
Assert.Equal(
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF), document.LinkColor);
917
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
918
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
919
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
920
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
921
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
922
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
923
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
924
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
925
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
926
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
927
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
928
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
929
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
934
public async Task HtmlDocument_LinkColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
949
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
950
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
951
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
952
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
953
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
954
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
955
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
956
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
957
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
958
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
959
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
960
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
961
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
966
public async Task HtmlDocument_LinkColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
988
public async Task HtmlDocument_LinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
1275
Assert.Equal(
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80), document.VisitedLinkColor);
1280
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1281
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1282
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
1283
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
1284
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
1285
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
1286
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
1287
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
1288
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
1289
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
1290
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
1291
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
1292
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
1297
public async Task HtmlDocument_VisitedLinkColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
1312
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1313
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1314
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
1315
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
1316
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
1317
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
1318
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1319
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
1320
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
1321
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
1322
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
1323
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
1324
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
1329
public async Task HtmlDocument_VisitedLinkColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
1351
public async Task HtmlDocument_VisitedLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
System\Windows\Forms\ImageList.ImageCollectionTests.cs (112)
55
image32bppArgbTransparent.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
103
image32bppArgbTransparent.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
153
yield return new object[] { pixelFormat,
Color
.Empty,
Color
.Empty };
154
yield return new object[] { PixelFormat.Format24bppRgb,
Color
.Red,
Color
.FromArgb(200, 50, 75, 100) };
161
yield return new object[] { PixelFormat.Format1bppIndexed,
Color
.Empty,
Color
.Empty,
Color
.FromArgb(255, 0, 0, 0) };
167
yield return new object[] { PixelFormat.Format24bppRgb,
Color
.Red,
Color
.FromArgb(200, 50, 75, 100),
Color
.FromArgb(255, 50, 75, 100) };
168
yield return new object[] { PixelFormat.Format32bppRgb,
Color
.Red,
Color
.FromArgb(200, 50, 75, 100),
Color
.FromArgb(255, 50, 75, 100) };
184
public void ImageCollection_Item_Get32bppColorDepth_Success(PixelFormat pixelFormat,
Color
pixel00Color,
Color
givenPixel10Color,
Color
expectedPixel10Color)
190
if (pixel00Color !=
Color
.Empty)
192
if (givenPixel10Color !=
Color
.Empty)
240
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
248
bitmap.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
257
public void ImageCollection_Item_Set_GetReturnsExpected(
Color
transparentColor, Image value)
278
public void ImageCollection_Item_SetWithHandle_GetReturnsExpected(
Color
transparentColor, Image value)
351
image1.SetPixel(0, 0,
Color
.Red);
353
image2.SetPixel(0, 0,
Color
.Blue);
420
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
428
bitmap.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
437
public void ImageCollection_Add_InvokeStringImage_Success(
Color
transparentColor, Image value)
481
public void ImageCollection_Add_InvokeStringImageWithHandle_Success(
Color
transparentColor, Image value)
526
public void ImageCollection_Add_InvokeImage_Success(
Color
transparentColor, Image value)
550
public void ImageCollection_Add_InvokeImageWithHandle_Success(
Color
transparentColor, Image value)
575
foreach (
Color
listTransparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
577
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
585
bitmap.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
595
public void ImageCollection_Add_InvokeImageColor_Success(
Color
listTransparentColor, Image value,
Color
transparentColor)
619
public void ImageCollection_Add_InvokeImageColorWithHandle_Success(
Color
listTransparentColor, Image value,
Color
transparentColor)
644
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
652
public void ImageCollection_Add_InvokeStringIcon_Success(
Color
transparentColor, Icon value)
696
public void ImageCollection_Add_InvokeStringIconWithHandle_Success(
Color
transparentColor, Icon value)
741
public void ImageCollection_Add_InvokeIcon_Success(
Color
transparentColor, Icon value)
765
public void ImageCollection_Add_InvokeIconWithHandle_Success(
Color
transparentColor, Icon value)
794
Assert.Throws<ArgumentNullException>("value", () => collection.Add(null,
Color
.Transparent));
808
Assert.Throws<ArgumentException>(() => collection.Add(value,
Color
.Transparent));
814
public void ImageCollection_AddRange_Invoke_Success(
Color
transparentColor, Image value)
838
public void ImageCollection_AddRange_InvokeWithHandle_Success(
Color
transparentColor, Image value)
889
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
896
bitmap.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
903
public void ImageCollection_AddStrip_Invoke_Success(
Color
transparentColor, Image value, int expectedCount)
920
public void ImageCollection_AddStrip_InvokeWithHandle_Success(
Color
transparentColor, Image value, int expectedCount)
1156
image1.SetPixel(0, 0,
Color
.Red);
1158
image2.SetPixel(0, 0,
Color
.Blue);
1193
image1.SetPixel(0, 0,
Color
.Red);
1195
image2.SetPixel(0, 0,
Color
.Blue);
1305
image1.SetPixel(0, 0,
Color
.Red);
1307
image2.SetPixel(0, 0,
Color
.Blue);
1309
image3.SetPixel(0, 0,
Color
.Yellow);
1339
image1.SetPixel(0, 0,
Color
.Red);
1341
image2.SetPixel(0, 0,
Color
.Blue);
1343
image3.SetPixel(0, 0,
Color
.Yellow);
1348
Color
color1 = ((Bitmap)collection[0]).GetPixel(0, 0);
1349
Color
color2 = ((Bitmap)collection[1]).GetPixel(0, 0);
1350
Color
color3 = ((Bitmap)collection[2]).GetPixel(0, 0);
1403
image1.SetPixel(0, 0,
Color
.Red);
1405
image2.SetPixel(0, 0,
Color
.Blue);
1407
image3.SetPixel(0, 0,
Color
.Yellow);
1443
image1.SetPixel(0, 0,
Color
.Red);
1445
image2.SetPixel(0, 0,
Color
.Blue);
1447
image3.SetPixel(0, 0,
Color
.Yellow);
1452
Color
color1 = ((Bitmap)collection[0]).GetPixel(0, 0);
1453
Color
color2 = ((Bitmap)collection[1]).GetPixel(0, 0);
1454
Color
color3 = ((Bitmap)collection[2]).GetPixel(0, 0);
1495
image1.SetPixel(0, 0,
Color
.Red);
1497
image2.SetPixel(0, 0,
Color
.Blue);
1499
image3.SetPixel(0, 0,
Color
.Yellow);
1504
Color
color1 = ((Bitmap)collection[0]).GetPixel(0, 0);
1505
Color
color2 = ((Bitmap)collection[1]).GetPixel(0, 0);
1506
Color
color3 = ((Bitmap)collection[2]).GetPixel(0, 0);
1630
public void ImageCollection_IListItem_Set_GetReturnsExpected(
Color
transparentColor, Image value)
1651
public void ImageCollection_IListItem_SetWithHandle_GetReturnsExpected(
Color
transparentColor, Image value)
System\Windows\Forms\ImageListTests.cs (30)
25
Assert.Equal(
Color
.Transparent, list.TransparentColor);
43
Assert.Equal(
Color
.Transparent, list.TransparentColor);
667
foreach (
Color
testData in CommonTestHelper.GetColorWithEmptyTheoryData())
672
yield return new object[] {
Color
.LightGray };
677
public void ImageList_TransparentColor_SetWithoutHandle_GetReturnsExpected(
Color
value)
700
list.TransparentColor =
Color
.Red;
701
Assert.Equal(
Color
.Red, list.TransparentColor);
706
list.TransparentColor =
Color
.Red;
707
Assert.Equal(
Color
.Red, list.TransparentColor);
712
list.TransparentColor =
Color
.Blue;
713
Assert.Equal(
Color
.Blue, list.TransparentColor);
719
list.TransparentColor =
Color
.Red;
720
Assert.Equal(
Color
.Red, list.TransparentColor);
727
public void ImageList_TransparentColor_SetWithHandle_GetReturnsExpected(
Color
value)
751
list.TransparentColor =
Color
.Red;
752
Assert.Equal(
Color
.Red, list.TransparentColor);
757
list.TransparentColor =
Color
.Red;
758
Assert.Equal(
Color
.Red, list.TransparentColor);
763
list.TransparentColor =
Color
.Blue;
764
Assert.Equal(
Color
.Blue, list.TransparentColor);
770
list.TransparentColor =
Color
.Red;
771
Assert.Equal(
Color
.Red, list.TransparentColor);
781
Assert.Equal(
Color
.Transparent, list.TransparentColor);
784
list.TransparentColor =
Color
.Red;
785
Assert.Equal(
Color
.Red, list.TransparentColor);
789
Assert.Equal(
Color
.LightGray, list.TransparentColor);
798
Assert.Equal(
Color
.Transparent, list.TransparentColor);
801
list.TransparentColor =
Color
.Red;
802
Assert.Equal(
Color
.Red, list.TransparentColor);
806
Assert.Equal(
Color
.LightGray, list.TransparentColor);
System\Windows\Forms\ListBoxTests.cs (56)
349
yield return new object[] {
Color
.Empty, SystemColors.Window };
350
yield return new object[] {
Color
.Red,
Color
.Red };
355
public void ListBox_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
372
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
373
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
378
public void ListBox_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
419
control.BackColor =
Color
.Red;
420
Assert.Equal(
Color
.Red, control.BackColor);
424
control.BackColor =
Color
.Red;
425
Assert.Equal(
Color
.Red, control.BackColor);
429
control.BackColor =
Color
.Empty;
435
control.BackColor =
Color
.Red;
436
Assert.Equal(
Color
.Red, control.BackColor);
447
control.BackColor =
Color
.Red;
448
Assert.Equal(
Color
.Red, control.BackColor);
463
control.BackColor =
Color
.Red;
464
Assert.Equal(
Color
.Red, control.BackColor);
1240
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1241
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1242
yield return new object[] {
Color
.White,
Color
.White };
1243
yield return new object[] {
Color
.Black,
Color
.Black };
1244
yield return new object[] {
Color
.Red,
Color
.Red };
1249
public void ListBox_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1266
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1267
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1268
yield return new object[] {
Color
.White,
Color
.White, 1 };
1269
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1270
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1275
public void ListBox_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1316
control.ForeColor =
Color
.Red;
1317
Assert.Equal(
Color
.Red, control.ForeColor);
1321
control.ForeColor =
Color
.Red;
1322
Assert.Equal(
Color
.Red, control.ForeColor);
1326
control.ForeColor =
Color
.Empty;
1332
control.ForeColor =
Color
.Red;
1333
Assert.Equal(
Color
.Red, control.ForeColor);
1344
control.ForeColor =
Color
.Red;
1345
Assert.Equal(
Color
.Red, control.ForeColor);
1360
control.ForeColor =
Color
.Red;
1361
Assert.Equal(
Color
.Red, control.ForeColor);
5981
control.BackColor =
Color
.Black;
6000
control.ForeColor =
Color
.Black;
System\Windows\Forms\ListViewInsertionMarkTests.cs (8)
141
control.InsertionMark.Color =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
284
Assert.NotEqual(
Color
.Empty, insertionMark.Color);
302
Assert.NotEqual(
Color
.Empty, insertionMark.Color);
312
public void ListViewInsertionMark_Color_SetWithoutHandle_ReturnsExpected(
Color
value)
329
public void ListViewInsertionMark_Color_SetWithHandle_ReturnsExpected(
Color
value)
370
control.InsertionMark.Color =
Color
.Empty;
382
control.InsertionMark.Color =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
518
insertionMark.Color =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
System\Windows\Forms\ListViewItemConverterTests.cs (50)
55
ForeColor =
Color
.Blue
59
BackColor =
Color
.Blue
192
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
193
new object[] { new string[] { "text3" }, 1,
Color
.Blue,
Color
.Empty, null }
198
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
199
new object[] { new string[] { "text4" }, 1,
Color
.Empty,
Color
.Blue, null }
204
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
205
new object[] { new string[] { "text5" }, 1,
Color
.Empty,
Color
.Empty, SystemFonts.MenuFont }
210
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
211
new object[] { new string[] { "text3" }, "imageKey",
Color
.Blue,
Color
.Empty, null }
216
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
217
new object[] { new string[] { "text4" }, "imageKey",
Color
.Empty,
Color
.Blue, null }
222
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
223
new object[] { new string[] { "text5" }, "imageKey",
Color
.Empty,
Color
.Empty, SystemFonts.MenuFont }
229
new ListViewItem(["text"], "imageKey",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont),
230
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
231
new object[] { new string[] { "text" }, "imageKey",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
235
new ListViewItem(["text"], 1,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont),
236
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
237
new object[] { new string[] { "text" }, 1,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
241
new ListViewItem(["text"], "imageKey",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont, group),
242
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
243
new object[] { new string[] { "text" }, "imageKey",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
247
new ListViewItem(["text"], 1,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont, group),
248
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
249
new object[] { new string[] { "text" }, 1,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
System\Windows\Forms\ListViewItemTests.cs (78)
44
yield return new object[] { null, null,
Color
.Empty,
Color
.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
45
yield return new object[] { Array.Empty<string>(), null,
Color
.Empty,
Color
.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
46
yield return new object[] { new string[] { null }, string.Empty,
Color
.Empty,
Color
.Empty, null, new ListViewGroup(), string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
47
yield return new object[] { new string[] { "text" }, "imageKey",
Color
.Blue,
Color
.Red, SystemFonts.MenuFont, new ListViewGroup(), "imageKey",
Color
.Blue,
Color
.Red, "text" };
52
public void ListViewItem_Ctor_StringArray_String_Color_Color_Font_ListViewGroup(string[] subItems, string imageKey,
Color
foreColor,
Color
backColor, Font font, ListViewGroup group, string expectedImageKey,
Color
expectedForeColor,
Color
expectedBackColor, string expectedText)
82
yield return new object[] { null, -1,
Color
.Empty,
Color
.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
83
yield return new object[] { Array.Empty<string>(), 0,
Color
.Empty,
Color
.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
84
yield return new object[] { new string[] { null }, 1,
Color
.Empty,
Color
.Empty, null, new ListViewGroup(), SystemColors.WindowText, SystemColors.Window, string.Empty };
85
yield return new object[] { new string[] { "text" }, 2,
Color
.Blue,
Color
.Red, SystemFonts.MenuFont, new ListViewGroup(),
Color
.Blue,
Color
.Red, "text" };
90
public void ListViewItem_Ctor_StringArray_Int_Color_Color_Font_ListViewGroup(string[] subItems, int imageIndex,
Color
foreColor,
Color
backColor, Font font, ListViewGroup group,
Color
expectedForeColor,
Color
expectedBackColor, string expectedText)
120
yield return new object[] { null, null,
Color
.Empty,
Color
.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
121
yield return new object[] { Array.Empty<string>(), null,
Color
.Empty,
Color
.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
122
yield return new object[] { new string[] { null }, string.Empty,
Color
.Empty,
Color
.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
123
yield return new object[] { new string[] { "text" }, "imageKey",
Color
.Blue,
Color
.Red, SystemFonts.MenuFont, "imageKey",
Color
.Blue,
Color
.Red, "text" };
128
public void ListViewItem_Ctor_StringArray_String_Color_Color_Font(string[] subItems, string imageKey,
Color
foreColor,
Color
backColor, Font font, string expectedImageKey,
Color
expectedForeColor,
Color
expectedBackColor, string expectedText)
158
yield return new object[] { null, -1,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
159
yield return new object[] { Array.Empty<string>(), 0,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
160
yield return new object[] { new string[] { null }, 1,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
161
yield return new object[] { new string[] { "text" }, 2,
Color
.Blue,
Color
.Red, SystemFonts.MenuFont,
Color
.Blue,
Color
.Red, "text" };
166
public void ListViewItem_Ctor_StringArray_Int_Color_Color_Font(string[] subItems, int imageIndex,
Color
foreColor,
Color
backColor, Font font,
Color
expectedForeColor,
Color
expectedBackColor, string expectedText)
849
yield return new object[] {
Color
.Empty, SystemColors.Window };
850
yield return new object[] {
Color
.Red,
Color
.Red };
855
public void ListViewItem_BackColor_GetWithOwner_ReturnsExpected(
Color
value,
Color
expected)
873
public void ListViewItem_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
888
public void ListViewItem_BackColor_SetWithOwner_GetReturnsExpected(
Color
value,
Color
expected)
904
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
905
yield return new object[] {
Color
.White,
Color
.White };
906
yield return new object[] {
Color
.Black,
Color
.Black };
907
yield return new object[] {
Color
.Red,
Color
.Red };
912
public void ListViewItem_ForeColor_GetWithOwner_ReturnsExpected(
Color
value,
Color
expected)
930
public void ListViewItem_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
946
public void ListViewItem_ForeColor_SetWithOwner_GetReturnsExpected(
Color
value,
Color
expected)
System\Windows\Forms\ListViewSubItemCollectionTests.cs (34)
258
yield return new object[] { null,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
259
yield return new object[] { string.Empty,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, string.Empty };
260
yield return new object[] { "reasonable",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, "reasonable" };
265
public void ListViewSubItemCollection_Add_String_Color_Color_Font_Success(string text,
Color
foreColor,
Color
backColor, Font font,
Color
expectedForeColor,
Color
expectedBackColor, string expectedText)
388
yield return new object[] {
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window };
389
yield return new object[] {
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue };
390
yield return new object[] {
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue };
395
public void ListViewSubItemCollection_AddRange_StringArrayWithStyles_Success(
Color
foreColor,
Color
backColor, Font font,
Color
expectedForeColor,
Color
expectedBackColor)
420
Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((string[])null,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont));
904
listViewItem.SubItems.Add("Test",
Color
.White,
Color
.Black, SystemFonts.MenuFont);
941
listViewItem.SubItems.AddRange(["Test 1", "Test 2"],
Color
.White,
Color
.Black, SystemFonts.MenuFont);
System\Windows\Forms\ListViewSubItemConverterTests.cs (6)
60
new ListViewItem.ListViewSubItem(null, "text",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont),
61
new Type[] { typeof(ListViewItem), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
62
new object[] { null, "text",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
System\Windows\Forms\ListViewSubItemTests.cs (78)
31
yield return new object[] { new ListViewItem() { BackColor =
Color
.Yellow, ForeColor =
Color
.Yellow, Font = SystemFonts.StatusFont }, "reasonable", "reasonable" };
55
yield return new object[] { null, null,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
56
yield return new object[] { new ListViewItem(), string.Empty,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, string.Empty };
57
yield return new object[] { new ListViewItem(), "reasonable",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, "reasonable" };
58
yield return new object[] { new ListViewItem() { BackColor =
Color
.Yellow, ForeColor =
Color
.Yellow, Font = SystemFonts.StatusFont }, string.Empty,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, string.Empty };
62
yield return new object[] { item, "reasonable",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, "reasonable" };
67
public void ListViewSubItem_Ctor_ListViewItem_String_Color_Color_Font(ListViewItem owner, string text,
Color
foreColor,
Color
backColor, Font font,
Color
expectedForeColor,
Color
expectedBackColor, string expectedText)
84
BackColor =
Color
.Red
90
Assert.Equal(
Color
.Red, subItem.BackColor);
102
BackColor =
Color
.Red
117
BackColor =
Color
.Red
121
BackColor =
Color
.Blue
126
Assert.Equal(
Color
.Red, subItem.BackColor);
135
yield return new object[] {
Color
.Red,
Color
.Red };
136
yield return new object[] {
Color
.Empty, SystemColors.Window };
141
public void ListViewSubItem_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
156
yield return new object[] {
Color
.Green,
Color
.Green };
157
yield return new object[] {
Color
.Empty,
Color
.Red };
162
public void ListViewSubItem_BackColor_SetWithListViewItemWithListView_GetReturnsExpected(
Color
value,
Color
expected)
166
BackColor =
Color
.Red
170
BackColor =
Color
.Blue
186
public void ListViewSubItem_BackColor_SetWithListViewItem_GetReturnsExpected(
Color
value,
Color
expected)
190
BackColor =
Color
.Blue
333
ForeColor =
Color
.Red
339
Assert.Equal(
Color
.Red, subItem.ForeColor);
351
ForeColor =
Color
.Red
366
ForeColor =
Color
.Red
370
ForeColor =
Color
.Blue
375
Assert.Equal(
Color
.Red, subItem.ForeColor);
384
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
385
yield return new object[] {
Color
.White,
Color
.White };
386
yield return new object[] {
Color
.Black,
Color
.Black };
387
yield return new object[] {
Color
.Red,
Color
.Red };
392
public void ListViewSubItem_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
407
yield return new object[] {
Color
.Green,
Color
.Green };
408
yield return new object[] {
Color
.Empty,
Color
.Red };
413
public void ListViewSubItem_ForeColor_SetWithListViewItemWithListView_GetReturnsExpected(
Color
value,
Color
expected)
417
ForeColor =
Color
.Red
421
ForeColor =
Color
.Blue
437
public void ListViewSubItem_ForeColor_SetWithListViewItem_GetReturnsExpected(
Color
value,
Color
expected)
441
ForeColor =
Color
.Blue
557
var subItem = new ListViewItem.ListViewSubItem(owner, "text",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont);
573
yield return new object[] { new ListViewItem.ListViewSubItem(null, "header",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont) { Name = "name", Tag = "tag" } };
System\Windows\Forms\ListViewTests.cs (51)
452
yield return new object[] {
Color
.Empty, SystemColors.Window };
453
yield return new object[] {
Color
.Red,
Color
.Red };
458
public void ListView_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
475
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
476
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
481
public void ListView_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
514
control.BackColor =
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56);
532
control.BackColor =
Color
.Red;
533
Assert.Equal(
Color
.Red, control.BackColor);
537
control.BackColor =
Color
.Red;
538
Assert.Equal(
Color
.Red, control.BackColor);
542
control.BackColor =
Color
.Empty;
548
control.BackColor =
Color
.Red;
549
Assert.Equal(
Color
.Red, control.BackColor);
1308
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1309
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1310
yield return new object[] {
Color
.White,
Color
.White };
1311
yield return new object[] {
Color
.Black,
Color
.Black };
1312
yield return new object[] {
Color
.Red,
Color
.Red };
1317
public void ListView_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1334
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1335
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1336
yield return new object[] {
Color
.White,
Color
.White, 1 };
1337
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1338
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1343
public void ListView_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1376
control.ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
1394
control.ForeColor =
Color
.Red;
1395
Assert.Equal(
Color
.Red, control.ForeColor);
1399
control.ForeColor =
Color
.Red;
1400
Assert.Equal(
Color
.Red, control.ForeColor);
1404
control.ForeColor =
Color
.Empty;
1410
control.ForeColor =
Color
.Red;
1411
Assert.Equal(
Color
.Red, control.ForeColor);
1844
BackColor =
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56)
1855
ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
5053
imagecollection.TransparentColor =
Color
.Transparent;
System\Windows\Forms\MdiClientTests.cs (13)
92
public void MdiClient_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
121
control.BackColor =
Color
.Red;
122
Assert.Equal(
Color
.Red, control.BackColor);
126
control.BackColor =
Color
.Red;
127
Assert.Equal(
Color
.Red, control.BackColor);
131
control.BackColor =
Color
.Empty;
137
control.BackColor =
Color
.Red;
138
Assert.Equal(
Color
.Red, control.BackColor);
149
control.BackColor =
Color
.Red;
150
Assert.Equal(
Color
.Red, control.BackColor);
165
control.BackColor =
Color
.Red;
166
Assert.Equal(
Color
.Red, control.BackColor);
System\Windows\Forms\MonthCalendarTests.cs (75)
281
yield return new object[] {
Color
.Empty, SystemColors.Window };
282
yield return new object[] {
Color
.Red,
Color
.Red };
287
public void MonthCalendar_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
304
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
305
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
310
public void MonthCalendar_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
351
control.BackColor =
Color
.Red;
352
Assert.Equal(
Color
.Red, control.BackColor);
356
control.BackColor =
Color
.Red;
357
Assert.Equal(
Color
.Red, control.BackColor);
361
control.BackColor =
Color
.Empty;
367
control.BackColor =
Color
.Red;
368
Assert.Equal(
Color
.Red, control.BackColor);
921
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
922
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
923
yield return new object[] {
Color
.White,
Color
.White };
924
yield return new object[] {
Color
.Black,
Color
.Black };
925
yield return new object[] {
Color
.Red,
Color
.Red };
930
public void MonthCalendar_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
947
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
948
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
949
yield return new object[] {
Color
.White,
Color
.White, 1 };
950
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
951
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
956
public void MonthCalendar_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
997
control.ForeColor =
Color
.Red;
998
Assert.Equal(
Color
.Red, control.ForeColor);
1002
control.ForeColor =
Color
.Red;
1003
Assert.Equal(
Color
.Red, control.ForeColor);
1007
control.ForeColor =
Color
.Empty;
1013
control.ForeColor =
Color
.Red;
1014
Assert.Equal(
Color
.Red, control.ForeColor);
1084
ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
1095
BackColor =
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56)
1106
TitleBackColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
1117
TitleForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
1128
TrailingForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
2714
yield return new object[] {
Color
.Red };
2715
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
2720
public void MonthCalendar_TitleBackColor_Set_GetReturnsExpected(
Color
value)
2737
public void MonthCalendar_TitleBackColor_SetWithHandle_GetReturnsExpected(
Color
value)
2768
Assert.Throws<ArgumentException>("value", () => calendar.TitleBackColor =
Color
.Empty);
2773
yield return new object[] {
Color
.Red };
2774
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
2779
public void MonthCalendar_TitleForeColor_Set_GetReturnsExpected(
Color
value)
2796
public void MonthCalendar_TitleForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
2827
Assert.Throws<ArgumentException>("value", () => calendar.TitleForeColor =
Color
.Empty);
2927
yield return new object[] {
Color
.Red };
2928
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
2933
public void MonthCalendar_TrailingForeColor_Set_GetReturnsExpected(
Color
value)
2950
public void MonthCalendar_TrailingForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
2981
Assert.Throws<ArgumentException>("value", () => calendar.TrailingForeColor =
Color
.Empty);
4520
ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTrailingForeColor(), () => calendar.TrailingForeColor =
Color
.Red);
4521
ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTitleForeColor(), () => calendar.TitleForeColor =
Color
.Red);
4522
ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTitleBackColor(), () => calendar.TitleBackColor =
Color
.Red);
4574
private void TestResetColorProperty(Func<MonthCalendar,
Color
> getColor, Action<MonthCalendar,
Color
> setColor, Action<dynamic> resetColor)
4579
Color
originalColor = getColor(calendar);
4581
setColor(calendar,
Color
.Red);
4582
getColor(calendar).Should().Be(
Color
.Red);
4587
setColor(calendar,
Color
.Red);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (14)
17
Assert.Equal(
Color
.Empty, bag.BackColor);
19
Assert.Equal(
Color
.Empty, bag.ForeColor);
25
public void OwnerDrawPropertyBag_BackColor_Set_GetReturnsExpected(
Color
value)
59
public void OwnerDrawPropertyBag_ForeColor_Set_GetReturnsExpected(
Color
value)
79
value.BackColor =
Color
.Blue;
81
value.ForeColor =
Color
.Red;
85
Assert.Equal(
Color
.Blue, bag.BackColor);
87
Assert.Equal(
Color
.Red, bag.ForeColor);
98
Assert.Equal(
Color
.Empty, bag.BackColor);
100
Assert.Equal(
Color
.Empty, bag.ForeColor);
110
original.BackColor =
Color
.Blue;
112
original.ForeColor =
Color
.Red;
124
Assert.Equal(
Color
.Blue, bag.BackColor);
126
Assert.Equal(
Color
.Red, bag.ForeColor);
System\Windows\Forms\PictureBoxTests.cs (9)
419
public void PictureBox_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
446
control.ForeColor =
Color
.Red;
447
Assert.Equal(
Color
.Red, control.ForeColor);
451
control.ForeColor =
Color
.Red;
452
Assert.Equal(
Color
.Red, control.ForeColor);
456
control.ForeColor =
Color
.Empty;
462
control.ForeColor =
Color
.Red;
463
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\Printing\PrintPreviewControlTests.cs (1)
29
control.BackColor =
Color
.FromArgb(customBackColorArgb);
System\Windows\Forms\ProfessionalColorsTests.cs (4)
73
public void ProfessionalColors_Properties_Get_ReturnsExpected(Func<
Color
> factory)
75
Color
result = factory();
81
public void ProfessionalColors_Properties_GetToolStripManagerVisualStylesEnabled_ReturnsExpected(Func<
Color
> factory)
88
Color
result = factory();
System\Windows\Forms\ProfessionalColorTableTests.cs (8)
83
public void ProfessionalColorTable_Properties_Get_ReturnsExpected(Func<ProfessionalColorTable,
Color
> factory)
86
Color
result = factory(table);
92
public void ProfessionalColorTable_Properties_GetUseSystemColors_ReturnsExpected(Func<ProfessionalColorTable,
Color
> factory)
98
Color
result = factory(table);
104
public void ProfessionalColorTable_Properties_GetToolStripManagerVisualStylesEnabled_ReturnsExpected(Func<ProfessionalColorTable,
Color
> factory)
112
Color
result = factory(table);
159
Color
result = table.ButtonCheckedGradientBegin;
193
Color
color = table.ButtonSelectedHighlight;
System\Windows\Forms\ProgressBarTests.cs (21)
535
public void ProgressBar_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
552
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
553
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
554
yield return new object[] {
Color
.Empty, ProgressBar.DefaultForeColor, 1 };
559
public void ProgressBar_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
600
control.ForeColor =
Color
.Red;
601
Assert.Equal(
Color
.Red, control.ForeColor);
605
control.ForeColor =
Color
.Red;
606
Assert.Equal(
Color
.Red, control.ForeColor);
610
control.ForeColor =
Color
.Empty;
616
control.ForeColor =
Color
.Red;
617
Assert.Equal(
Color
.Red, control.ForeColor);
628
control.ForeColor =
Color
.Red;
629
Assert.Equal(
Color
.Red, control.ForeColor);
644
control.ForeColor =
Color
.Red;
645
Assert.Equal(
Color
.Red, control.ForeColor);
2566
control.ForeColor =
Color
.Black;
System\Windows\Forms\PropertyGridInternal\PropertyGridView.DropDownHolderTests.cs (2)
15
propertyGridView.BackColor =
Color
.Green;
18
Assert.Equal(
Color
.Green, dropDownHolder.BackColor);
System\Windows\Forms\PropertyGridTests.cs (217)
61
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
64
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
66
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
284
public void PropertyGrid_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
303
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
304
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
309
public void PropertyGrid_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
354
control.BackColor =
Color
.Red;
355
Assert.Equal(
Color
.Red, control.BackColor);
359
control.BackColor =
Color
.Red;
360
Assert.Equal(
Color
.Red, control.BackColor);
364
control.BackColor =
Color
.Empty;
370
control.BackColor =
Color
.Red;
371
Assert.Equal(
Color
.Red, control.BackColor);
382
control.BackColor =
Color
.Red;
383
Assert.Equal(
Color
.Red, control.BackColor);
398
control.BackColor =
Color
.Red;
399
Assert.Equal(
Color
.Red, control.BackColor);
698
yield return new object[] {
Color
.Empty };
699
yield return new object[] {
Color
.Red };
700
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
705
public void PropertyGrid_CategoryForeColor_Set_GetReturnsExpected(
Color
value)
722
public void PropertyGrid_CategoryForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
756
control.CategoryForeColor =
Color
.Red;
757
Assert.Equal(
Color
.Red, control.CategoryForeColor);
772
control.CategoryForeColor =
Color
.Red;
773
Assert.Equal(
Color
.Red, control.CategoryForeColor);
783
public void PropertyGrid_CategorySplitterColor_Set_GetReturnsExpected(
Color
value)
800
public void PropertyGrid_CategorySplitterColor_SetWithHandle_GetReturnsExpected(
Color
value)
834
control.CategorySplitterColor =
Color
.Red;
835
Assert.Equal(
Color
.Red, control.CategorySplitterColor);
850
control.CategorySplitterColor =
Color
.Red;
851
Assert.Equal(
Color
.Red, control.CategorySplitterColor);
861
yield return new object[] {
Color
.Empty,
Color
.Red };
862
yield return new object[] {
Color
.Red,
Color
.Red };
863
yield return new object[] {
Color
.Blue,
Color
.Blue };
868
public void PropertyGrid_CommandsActiveLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
885
public void PropertyGrid_CommandsActiveLinkColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
919
control.CommandsActiveLinkColor =
Color
.Black;
920
Assert.Equal(
Color
.Black, control.CommandsActiveLinkColor);
924
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
935
control.CommandsActiveLinkColor =
Color
.Black;
936
Assert.Equal(
Color
.Black, control.CommandsActiveLinkColor);
940
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
946
public void PropertyGrid_CommandsBackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
963
public void PropertyGrid_CommandsBackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
997
control.CommandsBackColor =
Color
.Red;
998
Assert.Equal(
Color
.Red, control.CommandsBackColor);
1013
control.CommandsBackColor =
Color
.Red;
1014
Assert.Equal(
Color
.Red, control.CommandsBackColor);
1026
Assert.Throws<ArgumentException>(() => control.CommandsBackColor =
Color
.FromArgb(254, 1, 2, 3));
1031
public void PropertyGrid_CommandsBorderColor_Set_GetReturnsExpected(
Color
value)
1048
public void PropertyGrid_CommandsBorderColor_SetWithHandle_GetReturnsExpected(
Color
value)
1082
control.CommandsBorderColor =
Color
.Red;
1083
Assert.Equal(
Color
.Red, control.CommandsBorderColor);
1098
control.CommandsBorderColor =
Color
.Red;
1099
Assert.Equal(
Color
.Red, control.CommandsBorderColor);
1109
yield return new object[] {
Color
.Empty,
Color
.FromArgb(255, 133, 133, 133) };
1110
yield return new object[] {
Color
.Red,
Color
.Red };
1111
yield return new object[] {
Color
.Blue,
Color
.Blue };
1116
public void PropertyGrid_CommandsDisabledLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1133
public void PropertyGrid_CommandsDisabledLinkColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1167
control.CommandsDisabledLinkColor =
Color
.Red;
1168
Assert.Equal(
Color
.Red, control.CommandsDisabledLinkColor);
1172
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
1183
control.CommandsDisabledLinkColor =
Color
.Red;
1184
Assert.Equal(
Color
.Red, control.CommandsDisabledLinkColor);
1188
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
1194
public void PropertyGrid_CommandsForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1211
public void PropertyGrid_CommandsForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1245
control.CommandsForeColor =
Color
.Red;
1246
Assert.Equal(
Color
.Red, control.CommandsForeColor);
1261
control.CommandsForeColor =
Color
.Red;
1262
Assert.Equal(
Color
.Red, control.CommandsForeColor);
1272
yield return new object[] {
Color
.Empty,
Color
.FromArgb(255, 0, 0, 255) };
1273
yield return new object[] {
Color
.Red,
Color
.Red };
1274
yield return new object[] {
Color
.Blue,
Color
.Blue };
1279
public void PropertyGrid_CommandsLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1296
public void PropertyGrid_CommandsLinkColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1330
control.CommandsLinkColor =
Color
.Red;
1331
Assert.Equal(
Color
.Red, control.CommandsLinkColor);
1335
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
1346
control.CommandsLinkColor =
Color
.Red;
1347
Assert.Equal(
Color
.Red, control.CommandsLinkColor);
1351
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
1443
public void PropertyGrid_DisabledItemForeColor_Set_GetReturnsExpected(
Color
value)
1460
public void PropertyGrid_DisabledItemForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
1494
control.DisabledItemForeColor =
Color
.Red;
1495
Assert.Equal(
Color
.Red, control.DisabledItemForeColor);
1510
control.DisabledItemForeColor =
Color
.Red;
1511
Assert.Equal(
Color
.Red, control.DisabledItemForeColor);
1546
CommandsBackColor =
Color
.FromArgb(255, 0, 0, 1),
1547
CommandsForeColor =
Color
.FromArgb(255, 0, 0, 2),
1548
CommandsLinkColor =
Color
.FromArgb(255, 0, 0, 3),
1549
CommandsActiveLinkColor =
Color
.FromArgb(255, 0, 0, 4),
1550
CommandsDisabledLinkColor =
Color
.FromArgb(255, 0, 0, 5)
1556
Assert.Equal(
Color
.FromArgb(255, 0, 0, 1), control.CommandsBackColor);
1557
Assert.Equal(
Color
.FromArgb(255, 0, 0, 2), control.CommandsForeColor);
1558
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
1559
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
1560
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
1566
Assert.Equal(
Color
.FromArgb(255, 0, 0, 1), control.CommandsBackColor);
1567
Assert.Equal(
Color
.FromArgb(255, 0, 0, 2), control.CommandsForeColor);
1568
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
1569
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
1570
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
1613
public void PropertyGrid_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1630
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1631
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1632
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
1637
public void PropertyGrid_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1679
control.ForeColor =
Color
.Red;
1680
Assert.Equal(
Color
.Red, control.ForeColor);
1684
control.ForeColor =
Color
.Red;
1685
Assert.Equal(
Color
.Red, control.ForeColor);
1689
control.ForeColor =
Color
.Empty;
1695
control.ForeColor =
Color
.Red;
1696
Assert.Equal(
Color
.Red, control.ForeColor);
1707
control.ForeColor =
Color
.Red;
1708
Assert.Equal(
Color
.Red, control.ForeColor);
1723
control.ForeColor =
Color
.Red;
1724
Assert.Equal(
Color
.Red, control.ForeColor);
1734
public void PropertyGrid_HelpBackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1751
public void PropertyGrid_HelpBackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1785
control.HelpBackColor =
Color
.Red;
1786
Assert.Equal(
Color
.Red, control.HelpBackColor);
1801
control.HelpBackColor =
Color
.Red;
1802
Assert.Equal(
Color
.Red, control.HelpBackColor);
1814
Assert.Throws<ArgumentException>(() => control.HelpBackColor =
Color
.FromArgb(254, 1, 2, 3));
1819
public void PropertyGrid_HelpBorderColor_Set_GetReturnsExpected(
Color
value)
1836
public void PropertyGrid_HelpBorderColor_SetWithHandle_GetReturnsExpected(
Color
value)
1870
control.HelpBorderColor =
Color
.Red;
1871
Assert.Equal(
Color
.Red, control.HelpBorderColor);
1886
control.HelpBorderColor =
Color
.Red;
1887
Assert.Equal(
Color
.Red, control.HelpBorderColor);
1897
public void PropertyGrid_HelpForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1914
public void PropertyGrid_HelpForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1948
control.HelpForeColor =
Color
.Red;
1949
Assert.Equal(
Color
.Red, control.HelpForeColor);
1964
control.HelpForeColor =
Color
.Red;
1965
Assert.Equal(
Color
.Red, control.HelpForeColor);
2153
public void PropertyGrid_LineColor_Set_GetReturnsExpected(
Color
value)
2170
public void PropertyGrid_LineColor_SetWithHandle_GetReturnsExpected(
Color
value)
2204
control.LineColor =
Color
.Red;
2205
Assert.Equal(
Color
.Red, control.LineColor);
2220
control.LineColor =
Color
.Red;
2221
Assert.Equal(
Color
.Red, control.LineColor);
2400
public void PropertyGrid_SelectedItemWithFocusBackColor_Set_GetReturnsExpected(
Color
value)
2417
public void PropertyGrid_SelectedItemWithFocusBackColor_SetWithHandle_GetReturnsExpected(
Color
value)
2451
control.SelectedItemWithFocusBackColor =
Color
.Red;
2452
Assert.Equal(
Color
.Red, control.SelectedItemWithFocusBackColor);
2467
control.SelectedItemWithFocusBackColor =
Color
.Red;
2468
Assert.Equal(
Color
.Red, control.SelectedItemWithFocusBackColor);
2478
public void PropertyGrid_SelectedItemWithFocusForeColor_Set_GetReturnsExpected(
Color
value)
2495
public void PropertyGrid_SelectedItemWithFocusForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
2529
control.SelectedItemWithFocusForeColor =
Color
.Red;
2530
Assert.Equal(
Color
.Red, control.SelectedItemWithFocusForeColor);
2545
control.SelectedItemWithFocusForeColor =
Color
.Red;
2546
Assert.Equal(
Color
.Red, control.SelectedItemWithFocusForeColor);
3203
public void PropertyGrid_ViewBackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
3221
public void PropertyGrid_ViewBackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
3255
control.ViewBackColor =
Color
.Red;
3256
Assert.Equal(
Color
.Red, control.ViewBackColor);
3271
control.ViewBackColor =
Color
.Red;
3272
Assert.Equal(
Color
.Red, control.ViewBackColor);
3284
Assert.Throws<ArgumentException>(() => control.ViewBackColor =
Color
.FromArgb(254, 1, 2, 3));
3289
public void PropertyGrid_ViewBorderColor_Set_GetReturnsExpected(
Color
value)
3306
public void PropertyGrid_ViewBorderColor_SetWithHandle_GetReturnsExpected(
Color
value)
3340
control.ViewBorderColor =
Color
.Red;
3341
Assert.Equal(
Color
.Red, control.ViewBorderColor);
3356
control.ViewBorderColor =
Color
.Red;
3357
Assert.Equal(
Color
.Red, control.ViewBorderColor);
3367
yield return new object[] {
Color
.Empty, SystemColors.ControlText };
3368
yield return new object[] {
Color
.Red,
Color
.Red };
3369
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
3374
public void PropertyGrid_ViewForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
3391
public void PropertyGrid_ViewForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
3425
control.ViewForeColor =
Color
.Red;
3426
Assert.Equal(
Color
.Red, control.ViewForeColor);
3441
control.ViewForeColor =
Color
.Red;
3442
Assert.Equal(
Color
.Red, control.ViewForeColor);
System\Windows\Forms\PropertyStoreTests.cs (7)
30
{ 15,
Color
.Red },
84
store.TryGetValue(1, out
Color
outValue).Should().BeFalse();
85
Color
color = default;
115
Action action = () => store.TryGetValue(1, out
Color
outValue);
143
store.TryGetValue(1, out
Color
? outValue).Should().BeFalse();
376
Color
value = default;
380
value.Should().Be(store.GetValueOrDefault<
Color
>(1));
System\Windows\Forms\RichTextBoxTests.cs (112)
119
Assert.Equal(
Color
.Empty, control.SelectionBackColor);
646
yield return new object[] {
Color
.Empty, SystemColors.Window };
647
yield return new object[] {
Color
.Red,
Color
.Red };
652
public void RichTextBox_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
669
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
670
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
675
public void Control_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
716
control.BackColor =
Color
.Red;
717
Assert.Equal(
Color
.Red, control.BackColor);
721
control.BackColor =
Color
.Red;
722
Assert.Equal(
Color
.Red, control.BackColor);
726
control.BackColor =
Color
.Empty;
732
control.BackColor =
Color
.Red;
733
Assert.Equal(
Color
.Red, control.BackColor);
1677
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1678
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1679
yield return new object[] {
Color
.White,
Color
.White };
1680
yield return new object[] {
Color
.Black,
Color
.Black };
1681
yield return new object[] {
Color
.Red,
Color
.Red };
1686
public void RichTextBox_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1703
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1704
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1705
yield return new object[] {
Color
.White,
Color
.White, 1 };
1706
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1707
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1712
public void RichTextBox_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1745
control.ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
1760
control.ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
1769
control.ForeColor =
Color
.FromArgb(0x34, 0x56, 0x78, 0x90);
1792
control.ForeColor =
Color
.Red;
1793
Assert.Equal(
Color
.Red, control.ForeColor);
1797
control.ForeColor =
Color
.Red;
1798
Assert.Equal(
Color
.Red, control.ForeColor);
1802
control.ForeColor =
Color
.Empty;
1808
control.ForeColor =
Color
.Red;
1809
Assert.Equal(
Color
.Red, control.ForeColor);
3838
yield return new object[] { 0, 0, 0x78563412,
Color
.Empty };
3839
yield return new object[] { 0, CFE_EFFECTS.CFE_AUTOBACKCOLOR, 0x78563412,
Color
.Red };
3840
yield return new object[] { 0, CFE_EFFECTS.CFE_AUTOBACKCOLOR | CFE_EFFECTS.CFE_ALLCAPS, 0x78563412,
Color
.Red };
3841
yield return new object[] { CFM_MASK.CFM_BACKCOLOR, 0, 0x78563412,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
3842
yield return new object[] { CFM_MASK.CFM_BACKCOLOR, 0, 0x785634,
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78) };
3843
yield return new object[] { CFM_MASK.CFM_BACKCOLOR | CFM_MASK.CFM_ANIMATION, 0, 0x78563412,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
3844
yield return new object[] { CFM_MASK.CFM_BACKCOLOR, CFE_EFFECTS.CFE_AUTOBACKCOLOR, 0x78563412,
Color
.Red };
3845
yield return new object[] { CFM_MASK.CFM_ALLCAPS, 0, 0x78563412,
Color
.Empty };
3850
public void RichTextBox_SelectionBackColor_CustomGetCharFormat_ReturnsExpected(uint mask, uint effects, int backColor,
Color
expected)
3861
BackColor =
Color
.Red
3870
public void RichTextBox_SelectionBackColor_CustomGetCharFormatWithBackColor_ReturnsExpected(uint mask, uint effects, int backColor,
Color
expected)
3881
BackColor =
Color
.Red
3884
control.SelectionBackColor =
Color
.Yellow;
3893
Assert.Equal(
Color
.Empty, control.SelectionBackColor);
3902
Assert.Equal(
Color
.Empty, control.SelectionBackColor);
3907
yield return new object[] {
Color
.Empty };
3908
yield return new object[] {
Color
.Red };
3909
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78) };
3914
public void RichTextBox_SelectionBackColor_Set_GetReturnsExpected(
Color
value)
3931
yield return new object[] {
Color
.Empty, SystemColors.Window };
3932
yield return new object[] {
Color
.Red,
Color
.Red };
3933
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78) };
3938
public void RichTextBox_SelectionBackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
3971
control.SelectionBackColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
3982
yield return new object[] {
Color
.Empty };
3983
yield return new object[] {
Color
.Red };
3984
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78) };
3989
public void RichTextBox_SelectionBackColor_SetCantCreateHandle_GetReturnsExpected(
Color
value)
4004
public void RichTextBox_SelectionBackColor_SetDisposed_ThrowsObjectDisposedException(
Color
value)
4477
Assert.Equal(
Color
.Black, control.SelectionColor);
4481
Assert.Equal(
Color
.Black, control.SelectionColor);
4497
Assert.Equal(
Color
.Black, control.SelectionColor);
4504
Assert.Equal(
Color
.Black, control.SelectionColor);
4513
yield return new object[] { CFM_MASK.CFM_COLOR, 0x785634,
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78) };
4514
yield return new object[] { CFM_MASK.CFM_COLOR, 0x78563412,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
4515
yield return new object[] { CFM_MASK.CFM_COLOR, 0,
Color
.Black };
4517
yield return new object[] { 0, 0x785634,
Color
.Empty };
4518
yield return new object[] { 0, 0x78563412,
Color
.Empty };
4519
yield return new object[] { 0, 0,
Color
.Empty };
4524
public void RichTextBox_SelectionColor_CustomGetCharFormat_Success(uint mask, int textColor,
Color
expected)
4545
Assert.Equal(
Color
.Empty, control.SelectionColor);
4559
yield return new object[] {
Color
.Empty,
Color
.Black };
4560
yield return new object[] {
Color
.Red,
Color
.Red };
4561
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78) };
4566
public void RichTextBox_SelectionColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
4583
public void RichTextBox_SelectionColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
4616
control.SelectionColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
4627
yield return new object[] {
Color
.Empty };
4628
yield return new object[] {
Color
.Red };
4629
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78) };
4634
public void RichTextBox_SelectionColor_SetCantCreateHandle_GetReturnsExpected(
Color
value)
4638
Assert.Equal(
Color
.Empty, control.SelectionColor);
4643
Assert.Equal(
Color
.Empty, control.SelectionColor);
4649
public void RichTextBox_SelectionColor_SetDisposed_ThrowsObjectDisposedException(
Color
value)
System\Windows\Forms\ScrollableControlTests.cs (64)
1514
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout };
1515
yield return new object[] { hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout };
1516
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout };
1517
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout };
1518
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout };
1519
yield return new object[] { hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout };
1528
public void ScrollableControl_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
1587
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1588
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1589
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1590
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1591
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1592
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1596
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1597
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1598
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
1599
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
1600
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1601
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1603
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1604
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1605
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
1606
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
1607
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1608
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1630
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1631
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1632
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1633
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1641
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1642
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1646
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1647
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1648
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
1649
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
1650
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1651
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1653
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1654
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1655
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1656
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1657
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1658
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1675
public void ScrollableControl_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
1727
public void ScrollableControl_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
1787
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1788
yield return new object[] { hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1789
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1790
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1791
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1792
yield return new object[] { hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1796
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1797
yield return new object[] { hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1798
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
1799
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
1800
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1801
yield return new object[] { hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1803
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1804
yield return new object[] { hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1805
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1806
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1807
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1808
yield return new object[] { hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1815
public void ScrollableControl_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ScrollBarTests.cs (18)
194
public void ScrollBar_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
223
control.BackColor =
Color
.Red;
224
Assert.Equal(
Color
.Red, control.BackColor);
228
control.BackColor =
Color
.Red;
229
Assert.Equal(
Color
.Red, control.BackColor);
233
control.BackColor =
Color
.Empty;
239
control.BackColor =
Color
.Red;
240
Assert.Equal(
Color
.Red, control.BackColor);
543
public void ScrollBar_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
572
control.ForeColor =
Color
.Red;
573
Assert.Equal(
Color
.Red, control.ForeColor);
577
control.ForeColor =
Color
.Red;
578
Assert.Equal(
Color
.Red, control.ForeColor);
582
control.ForeColor =
Color
.Empty;
588
control.ForeColor =
Color
.Red;
589
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\SplitterTests.cs (16)
795
public void Splitter_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
812
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
813
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
814
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
819
public void Splitter_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
860
control.ForeColor =
Color
.Red;
861
Assert.Equal(
Color
.Red, control.ForeColor);
865
control.ForeColor =
Color
.Red;
866
Assert.Equal(
Color
.Red, control.ForeColor);
870
control.ForeColor =
Color
.Empty;
876
control.ForeColor =
Color
.Red;
877
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\StatusStripTests.cs (1)
1187
Assert.Equal(
Color
.Transparent, grip.BackColor);
System\Windows\Forms\StatusStripTests.Rendering.cs (5)
17
BackColor =
Color
.Blue,
45
Validate.BitBltValidator(bitBltBounds, State.BrushColor(
Color
.Blue)),
46
Validate.Polyline16(polylineBounds, null, State.Pen(16,
Color
.Green, penStyle)));
53
public override
Color
StatusStripBorder =>
Color
.Green;
System\Windows\Forms\TabControlTests.cs (25)
528
yield return new object[] {
Color
.Red };
529
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
530
yield return new object[] {
Color
.Empty };
535
public void TabControl_BackColor_Set_GetReturnsExpected(
Color
value)
552
public void TabControl_BackColor_SetWithHandle_GetReturnsExpected(
Color
value)
594
control.BackColor =
Color
.Red;
599
control.BackColor =
Color
.Red;
604
control.BackColor =
Color
.Empty;
610
control.BackColor =
Color
.Red;
922
public void TabControl_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
939
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
940
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
941
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
946
public void TabControl_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
988
control.ForeColor =
Color
.Red;
989
Assert.Equal(
Color
.Red, control.ForeColor);
993
control.ForeColor =
Color
.Red;
994
Assert.Equal(
Color
.Red, control.ForeColor);
998
control.ForeColor =
Color
.Empty;
1004
control.ForeColor =
Color
.Red;
1005
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\TabPageTests.cs (74)
599
Assert.Equal(
Color
.Transparent, control.BackColor);
611
yield return new object[] { true, TabAppearance.Normal,
Color
.Transparent };
619
public static void TabPage_BackColor_GetVisualStylesWithParent_ReturnsExpected(bool useVisualStyleBackColorParam, TabAppearance parentAppearanceParam,
Color
expectedParam)
626
Color
expected =
Color
.FromArgb(int.Parse(expectedString));
645
public void TabPage_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
662
public void TabPage_BackColor_SetWithUseVisualStyleBackColor_GetReturnsExpected(
Color
value,
Color
expected)
682
public void TabPage_BackColor_SetDesignMode_GetReturnsExpected(
Color
value,
Color
expected)
724
public void TabPage_BackColor_SetDesignModeWithUseVisualStyleBackColor_GetReturnsExpected(
Color
value,
Color
expected)
767
public void TabPage_BackColor_SetDesignModeWithInvalidDescriptor_GetReturnsExpected(
Color
value,
Color
expected)
826
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
827
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
832
public void TabPage_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
873
control.BackColor =
Color
.Red;
874
Assert.Equal(
Color
.Red, control.BackColor);
878
control.BackColor =
Color
.Red;
879
Assert.Equal(
Color
.Red, control.BackColor);
883
control.BackColor =
Color
.Empty;
889
control.BackColor =
Color
.Red;
890
Assert.Equal(
Color
.Red, control.BackColor);
2284
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
3962
yield return new object[] { true,
Color
.Empty, backgroundImage, backgroundImageLayout };
3963
yield return new object[] { true,
Color
.Red, backgroundImage, backgroundImageLayout };
3964
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout };
3965
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout };
3966
yield return new object[] { false,
Color
.Empty, backgroundImage, backgroundImageLayout };
3967
yield return new object[] { false,
Color
.Red, backgroundImage, backgroundImageLayout };
3974
public void TabPage_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
4016
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4017
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4018
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4019
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4020
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4021
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4025
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4026
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4027
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4028
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4029
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4030
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4032
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4033
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4034
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4035
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4036
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4037
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4044
public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
4100
public void TabPage_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
4155
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4156
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4157
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4158
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4159
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4160
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4164
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4165
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4166
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4167
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4168
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4169
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4171
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4172
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4173
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4174
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4175
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4176
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4183
public void TabPage_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\TextRendererTests.cs (220)
21
yield return new object[] { hint, text, null, Point.Empty,
Color
.Red };
22
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Red };
23
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Black };
24
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.White };
25
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Transparent };
26
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Empty };
33
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt,
Color
foreColor)
50
yield return new object[] { hint, text, null, Point.Empty,
Color
.Red,
Color
.Blue };
51
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Red,
Color
.Blue };
52
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Black,
Color
.Blue };
53
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.White,
Color
.Blue };
54
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Transparent,
Color
.Blue };
55
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Empty,
Color
.Blue };
56
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Red };
57
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Black };
58
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.White };
59
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Transparent };
60
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Empty };
67
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt,
Color
foreColor,
Color
backColor)
84
yield return new object[] { hint, text, null, Point.Empty,
Color
.Red, TextFormatFlags.Default, };
85
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Red, TextFormatFlags.Default, };
86
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Black, TextFormatFlags.Default, };
87
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.White, TextFormatFlags.Default, };
88
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Transparent, TextFormatFlags.Default, };
89
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Empty, TextFormatFlags.Default, };
91
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.HorizontalCenter };
92
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
93
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.Bottom | TextFormatFlags.Right };
94
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.SingleLine };
95
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, (TextFormatFlags)1024 };
96
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.RightToLeft };
97
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, (TextFormatFlags)int.MaxValue };
104
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt,
Color
foreColor, TextFormatFlags flags)
121
yield return new object[] { hint, text, null, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
122
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
123
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Black,
Color
.Blue, TextFormatFlags.Default, };
124
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.White,
Color
.Blue, TextFormatFlags.Default, };
125
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Transparent,
Color
.Blue, TextFormatFlags.Default, };
126
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Empty,
Color
.Blue, TextFormatFlags.Default, };
127
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Red, TextFormatFlags.Default, };
128
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Black, TextFormatFlags.Default, };
129
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.White, TextFormatFlags.Default, };
130
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Transparent, TextFormatFlags.Default, };
131
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Empty, TextFormatFlags.Default, };
133
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
134
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right };
135
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.SingleLine };
136
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, (TextFormatFlags)1024 };
137
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.RightToLeft };
138
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, (TextFormatFlags)int.MaxValue };
145
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt,
Color
foreColor,
Color
backColor, TextFormatFlags flags)
162
yield return new object[] { hint, text, null, Rectangle.Empty,
Color
.Red };
163
yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4),
Color
.Red };
164
yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red };
165
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 3, 4),
Color
.Red };
166
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red };
167
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Black };
168
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.White };
169
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Transparent };
170
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Empty };
177
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle bounds,
Color
foreColor)
194
yield return new object[] { hint, text, null, Rectangle.Empty,
Color
.Red,
Color
.Blue };
195
yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4),
Color
.Red,
Color
.Blue };
196
yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red,
Color
.Blue };
197
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue };
198
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Black,
Color
.Blue };
199
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.White,
Color
.Blue };
200
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Transparent,
Color
.Blue };
201
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Empty,
Color
.Blue };
202
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Red };
203
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Black };
204
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.White };
205
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Transparent };
206
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Empty };
213
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle,
Color
foreColor,
Color
backColor)
230
yield return new object[] { hint, text, null, Rectangle.Empty,
Color
.Red, TextFormatFlags.Default, };
231
yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4),
Color
.Red, TextFormatFlags.Default, };
232
yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red, TextFormatFlags.Default, };
233
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.Default, };
234
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Black, TextFormatFlags.Default, };
235
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.White, TextFormatFlags.Default, };
236
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Transparent, TextFormatFlags.Default, };
237
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Empty, TextFormatFlags.Default, };
239
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.HorizontalCenter };
240
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
241
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.Bottom | TextFormatFlags.Right };
242
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.SingleLine };
243
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red, TextFormatFlags.SingleLine };
244
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, (TextFormatFlags)1024 };
245
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.RightToLeft };
246
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, (TextFormatFlags)int.MaxValue };
253
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle,
Color
foreColor, TextFormatFlags flags)
270
yield return new object[] { hint, text, null, Rectangle.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
271
yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4),
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
272
yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Blue,
Color
.Blue, TextFormatFlags.Default, };
273
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
274
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Black,
Color
.Blue, TextFormatFlags.Default, };
275
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.White,
Color
.Blue, TextFormatFlags.Default, };
276
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Transparent,
Color
.Blue, TextFormatFlags.Default, };
277
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Empty,
Color
.Blue, TextFormatFlags.Default, };
278
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Red, TextFormatFlags.Default, };
279
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Black, TextFormatFlags.Default, };
280
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.White, TextFormatFlags.Default, };
281
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Transparent, TextFormatFlags.Default, };
282
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Empty, TextFormatFlags.Default, };
284
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
285
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right };
286
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.SingleLine };
287
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red,
Color
.Blue, TextFormatFlags.SingleLine };
288
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, (TextFormatFlags)1024 };
289
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.RightToLeft };
290
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, (TextFormatFlags)int.MaxValue };
297
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle,
Color
foreColor,
Color
backColor, TextFormatFlags flags)
323
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red);
327
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue);
331
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.Default);
335
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Default);
339
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red);
343
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.Default);
347
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue);
351
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.Default);
355
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty,
Color
.Red);
359
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue);
363
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.Default);
367
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Default);
371
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red);
375
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.Default);
379
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue);
383
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.Default);
391
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.DrawText(null, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red));
583
State.TextColor(
Color
.Blue),
592
pt: default,
Color
.Blue),
595
pt: default,
Color
.Blue, flags: default),
598
bounds: new Rectangle(0, 0, int.MaxValue, int.MaxValue),
Color
.Blue),
601
bounds: new Rectangle(0, 0, int.MaxValue, int.MaxValue),
Color
.Blue, flags: default),
620
Color
.Empty,
627
Color
.Empty,
628
Color
.Empty,
635
Color
.Empty,
642
Color
.Empty,
643
Color
.Empty,
678
Color
.Red,
687
State.TextColor(
Color
.Red)));
701
Color
.Red,
710
State.TextColor(
Color
.Red)));
771
Color
.Red,
786
State.TextColor(
Color
.Red)));
System\Windows\Forms\ToolStripArrowRenderEventArgsTests.cs (11)
14
Assert.Throws<ArgumentNullException>(() => new ToolStripArrowRenderEventArgs(null, toolStripButton, Rectangle.Empty,
Color
.Empty, ArrowDirection.Up));
21
yield return new object[] { graphics, null, Rectangle.Empty,
Color
.Empty, ArrowDirection.Down + 1 };
22
yield return new object[] { graphics, new ToolStripButton(), new Rectangle(1, 2, 3, 4),
Color
.Blue, ArrowDirection.Down };
23
yield return new object[] { graphics, new ToolStripButton(), new Rectangle(-1, -2, -3, -4),
Color
.Blue, ArrowDirection.Down };
28
public void Ctor_Graphics_ToolStripItem_Rectangle_Color_ArrowDirection(Graphics g, ToolStripItem toolStripItem, Rectangle arrowRectangle,
Color
arrowColor, ArrowDirection arrowDirection)
52
ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4),
Color
.Blue, ArrowDirection.Down)
61
yield return new object[] {
Color
.Empty };
62
yield return new object[] {
Color
.Red };
67
public void ArrowColor_Set_GetReturnsExpected(
Color
value)
72
ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4),
Color
.Blue, ArrowDirection.Down)
87
ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4),
Color
.Blue, ArrowDirection.Down)
System\Windows\Forms\ToolStripButtonTests.cs (11)
64
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
145
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
232
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
322
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
410
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
508
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
1278
ForeColor =
Color
.Red,
1316
Assert.Equal(
Color
.Red, e.TextColor);
1369
ForeColor =
Color
.Red,
1407
Assert.Equal(
Color
.Red, e.TextColor);
1468
ForeColor =
Color
.Red,
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (2)
44
BackColor =
Color
.Blue,
60
State.Brush(
Color
.Blue, BRUSH_STYLE.BS_SOLID)));
System\Windows\Forms\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapterTests.cs (7)
55
Color
result = (
Color
)_adapter.TestAccessor().Dynamic.GetOuterBorderColor(_comboBox);
57
result.Should().Be(
Color
.FromKnownColor(expectedColor));
69
Color
result = (
Color
)_adapter.TestAccessor().Dynamic.GetPopupOuterBorderColor(_comboBox, focused);
71
result.Should().Be(
Color
.FromKnownColor(expectedColor));
83
bitmap.GetPixel(50, 50).Should().NotBe(
Color
.Empty);
System\Windows\Forms\ToolStripContentPanelTests.cs (33)
608
public void ToolStripContentPanel_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
625
yield return new object[] {
Color
.Empty,
Color
.Blue };
626
yield return new object[] {
Color
.Red,
Color
.Red };
627
yield return new object[] {
Color
.Transparent,
Color
.Transparent };
632
public void ToolStripContentPanel_BackColor_SetWithParent_GetReturnsExpected(
Color
value,
Color
expected)
636
BackColor =
Color
.Blue
644
Assert.Equal(
Color
.Blue, parent.BackColor);
650
Assert.Equal(
Color
.Blue, parent.BackColor);
657
yield return new object[] {
Color
.Empty,
Color
.Blue,
Color
.Blue };
658
yield return new object[] {
Color
.Red,
Color
.Red,
Color
.Blue };
659
yield return new object[] {
Color
.Transparent,
Color
.Transparent,
Color
.Transparent };
664
public void ToolStripContentPanel_BackColor_SetWithToolStripContainerParent_GetReturnsExpected(
Color
value,
Color
expected,
Color
expectedBackColor)
668
BackColor =
Color
.Blue
699
control.BackColor =
Color
.Red;
700
Assert.Equal(
Color
.Red, control.BackColor);
704
control.BackColor =
Color
.Red;
705
Assert.Equal(
Color
.Red, control.BackColor);
709
control.BackColor =
Color
.Empty;
715
control.BackColor =
Color
.Red;
716
Assert.Equal(
Color
.Red, control.BackColor);
System\Windows\Forms\ToolStripControlHostTests.cs (49)
27
BackColor =
Color
.Red,
32
ForeColor =
Color
.Blue,
93
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
264
public void ToolStripControlHost_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
297
item.BackColor =
Color
.Red;
298
Assert.Equal(
Color
.Red, item.BackColor);
302
item.BackColor =
Color
.Red;
303
Assert.Equal(
Color
.Red, item.BackColor);
307
item.BackColor =
Color
.Empty;
313
item.BackColor =
Color
.Red;
314
Assert.Equal(
Color
.Red, item.BackColor);
325
Assert.Throws<ObjectDisposedException>(() => item.BackColor =
Color
.Red);
336
item.BackColor =
Color
.Red;
337
Assert.Equal(
Color
.Red, item.BackColor);
367
item.BackColor =
Color
.Red;
368
Assert.Equal(
Color
.Red, item.BackColor);
546
c.BackColor =
Color
.Red;
547
Assert.Equal(
Color
.Red, c.BackColor);
548
Assert.Equal(
Color
.Red, item.BackColor);
629
c.ForeColor =
Color
.Red;
630
Assert.Equal(
Color
.Red, c.ForeColor);
631
Assert.Equal(
Color
.Red, item.ForeColor);
1083
public void ToolStripControlHost_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1116
item.ForeColor =
Color
.Red;
1117
Assert.Equal(
Color
.Red, item.ForeColor);
1121
item.ForeColor =
Color
.Red;
1122
Assert.Equal(
Color
.Red, item.ForeColor);
1126
item.ForeColor =
Color
.Empty;
1132
item.ForeColor =
Color
.Red;
1133
Assert.Equal(
Color
.Red, item.ForeColor);
1144
Assert.Throws<ObjectDisposedException>(() => item.ForeColor =
Color
.Red);
1155
item.ForeColor =
Color
.Red;
1156
Assert.Equal(
Color
.Red, item.ForeColor);
1186
item.ForeColor =
Color
.Red;
1187
Assert.Equal(
Color
.Red, item.ForeColor);
1207
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
1218
public void ToolStripControlHost_Image_Set_GetReturnsExpected(
Color
imageTransparentColor, Image value)
1333
foreach (
Color
color in new
Color
[] {
Color
.Empty,
Color
.Red })
1344
public void ToolStripControlHost_ImageTransparentColor_Set_GetReturnsExpected(Image image,
Color
value)
4397
item.BackColor =
Color
.Black;
4430
item.ForeColor =
Color
.Black;
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
64
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
153
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
252
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
360
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
System\Windows\Forms\ToolStripDropDownTests.cs (9)
1707
public void ToolStripDropDown_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1736
control.ForeColor =
Color
.Red;
1737
Assert.Equal(
Color
.Red, control.ForeColor);
1741
control.ForeColor =
Color
.Red;
1742
Assert.Equal(
Color
.Red, control.ForeColor);
1746
control.ForeColor =
Color
.Empty;
1752
control.ForeColor =
Color
.Red;
1753
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\ToolStripItemTests.cs (120)
63
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
148
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
243
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
1548
BackColor =
Color
.Red
1562
BackColor =
Color
.Red
1568
Assert.Equal(
Color
.Red, item.BackColor);
1573
public void ToolStripItem_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1588
public void ToolStripItem_BackColor_SetWithOwner_GetReturnsExpected(
Color
value,
Color
expected)
1608
public void ToolStripItem_BackColor_SetWithOwnerWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1641
public void ToolStripItem_BackColor_SetWithParent_GetReturnsExpected(
Color
value,
Color
expected)
1661
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
1662
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1667
public void ToolStripItem_BackColor_SetWithParentWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1712
item.BackColor =
Color
.Red;
1713
Assert.Equal(
Color
.Red, item.BackColor);
1717
item.BackColor =
Color
.Red;
1718
Assert.Equal(
Color
.Red, item.BackColor);
1722
item.BackColor =
Color
.Empty;
1728
item.BackColor =
Color
.Red;
1729
Assert.Equal(
Color
.Red, item.BackColor);
1740
item.BackColor =
Color
.Red;
1741
Assert.Equal(
Color
.Red, item.BackColor);
1756
item.BackColor =
Color
.Red;
1757
Assert.Equal(
Color
.Red, item.BackColor);
3238
ForeColor =
Color
.Red
3252
ForeColor =
Color
.Red
3258
Assert.Equal(
Color
.Red, item.ForeColor);
3263
public void ToolStripItem_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
3278
public void ToolStripItem_ForeColor_SetWithOwner_GetReturnsExpected(
Color
value,
Color
expected)
3298
public void ToolStripItem_ForeColor_SetWithOwnerWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
3331
public void ToolStripItem_ForeColor_SetWithParent_GetReturnsExpected(
Color
value,
Color
expected)
3351
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
3352
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
3353
yield return new object[] {
Color
.White,
Color
.White, 1 };
3354
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
3355
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
3360
public void ToolStripItem_ForeColor_SetWithParentWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
3405
item.ForeColor =
Color
.Red;
3406
Assert.Equal(
Color
.Red, item.ForeColor);
3410
item.ForeColor =
Color
.Red;
3411
Assert.Equal(
Color
.Red, item.ForeColor);
3415
item.ForeColor =
Color
.Empty;
3421
item.ForeColor =
Color
.Red;
3422
Assert.Equal(
Color
.Red, item.ForeColor);
3433
item.ForeColor =
Color
.Red;
3434
Assert.Equal(
Color
.Red, item.ForeColor);
3449
item.ForeColor =
Color
.Red;
3450
Assert.Equal(
Color
.Red, item.ForeColor);
3781
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
3792
public void ToolStripItem_Image_Set_GetReturnsExpected(
Color
imageTransparentColor, Image value)
3811
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
3822
public void ToolStripItem_Image_SetWithImageIndex_GetReturnsExpected(
Color
imageTransparentColor, Image value, int expectedImageIndex)
3842
public void ToolStripItem_Image_SetWithNonNullOldValue_GetReturnsExpected(
Color
imageTransparentColor, Image value)
3863
public void ToolStripItem_Image_SetWithNonNullOldValueWithImageIndex_GetReturnsExpected(
Color
imageTransparentColor, Image value, int expectedImageIndex)
3885
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
3896
public void ToolStripItem_Image_SetWithOwner_GetReturnsExpected(
Color
imageTransparentColor, Image value, int expectedOwnerLayoutCallCount)
3941
public void ToolStripItem_Image_SetWithOwnerWithHandle_GetReturnsExpected(
Color
imageTransparentColor, Image value, int expectedOwnerLayoutCallCount)
3999
public void ToolStripItem_Image_SetWithParent_GetReturnsExpected(
Color
imageTransparentColor, Image value)
4034
public void ToolStripItem_Image_SetWithParentWithHandle_GetReturnsExpected(
Color
imageTransparentColor, Image value)
5599
foreach (
Color
color in new
Color
[] {
Color
.Empty,
Color
.Red })
5610
public void ToolStripItem_ImageTransparentColor_Set_GetReturnsExpected(Image image,
Color
value)
5627
public void ToolStripItem_ImageTransparentColor_SetWithCustomOldValue_GetReturnsExpected(Image image,
Color
value)
5632
ImageTransparentColor =
Color
.Red
5645
public void ToolStripItem_ImageTransparentColor_SetWithOwner_GetReturnsExpected(Image image,
Color
value)
5666
yield return new object[] { null,
Color
.Empty, 0 };
5667
yield return new object[] { null,
Color
.Red, 0 };
5668
yield return new object[] { new Bitmap(10, 10),
Color
.Empty, 0 };
5669
yield return new object[] { new Bitmap(10, 10),
Color
.Red, 1 };
5670
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")),
Color
.Empty, 0 };
5671
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")),
Color
.Red, 1 };
5672
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")),
Color
.Empty, 0 };
5673
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")),
Color
.Red, 1 };
5678
public void ToolStripItem_ImageTransparentColor_SetWithOwnerWithHandle_GetReturnsExpected(Image image,
Color
value, int expectedInvalidatedCallCount)
5712
public void ToolStripItem_ImageTransparentColor_SetWithParent_GetReturnsExpected(Image image,
Color
value)
5733
yield return new object[] { null,
Color
.Empty, 0 };
5734
yield return new object[] { null,
Color
.Red, 1 };
5735
yield return new object[] { new Bitmap(10, 10),
Color
.Empty, 0 };
5736
yield return new object[] { new Bitmap(10, 10),
Color
.Red, 1 };
5737
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")),
Color
.Empty, 0 };
5738
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")),
Color
.Red, 1 };
5739
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")),
Color
.Empty, 0 };
5740
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")),
Color
.Red, 1 };
5745
public void ToolStripItem_ImageTransparentColor_SetWithParentWithHandle_GetReturnsExpected(Image image,
Color
value, int expectedParentInvalidatedCallCount)
5784
item.ImageTransparentColor =
Color
.Red;
5785
Assert.Equal(
Color
.Red, item.ImageTransparentColor);
5789
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
5800
item.ImageTransparentColor =
Color
.Red;
5801
Assert.Equal(
Color
.Red, item.ImageTransparentColor);
5805
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
12525
item.BackColor =
Color
.Red;
12619
item.ForeColor =
Color
.Red;
14105
item.BackColor =
Color
.Black;
14168
item.ForeColor =
Color
.Black;
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (15)
12
yield return new object[] { new ToolStripButton(), null, Rectangle.Empty,
Color
.Empty, null, TextFormatFlags.Top - 1 };
13
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, TextFormatFlags.Top };
14
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, TextFormatFlags.Bottom };
19
public void Ctor_ToolStripItem_String_Rectangle_Color_Font_TextFormatFlags(ToolStripItem item, string text, Rectangle textRectangle,
Color
textColor, Font textFont, TextFormatFlags format)
37
yield return new object[] { new ToolStripButton(), null, Rectangle.Empty,
Color
.Empty, null, ContentAlignment.TopLeft - 1, TextFormatFlags.Default | TextFormatFlags.Top | TextFormatFlags.HidePrefix };
38
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, ContentAlignment.MiddleCenter, TextFormatFlags.Default | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
39
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, ContentAlignment.BottomRight, TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.HidePrefix };
40
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, (ContentAlignment)(-1), TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.RightToLeft | TextFormatFlags.HidePrefix };
45
public void Ctor_ToolStripItem_String_Rectangle_Color_Font_ContentAlignment(ToolStripItem item, string text, Rectangle textRectangle,
Color
textColor, Font textFont, ContentAlignment textAlign, TextFormatFlags expectedTextFormat)
66
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, TextFormatFlags.Top));
67
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, ContentAlignment.TopLeft));
72
yield return new object[] {
Color
.Empty };
73
yield return new object[] {
Color
.Red };
78
public void TextColor_Set_GetReturnsExpected(
Color
value)
82
ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4),
Color
.Blue, SystemFonts.DefaultFont, TextFormatFlags.Top)
System\Windows\Forms\ToolStripLabelTests.cs (19)
106
Color
expectedColor =
Color
.Red;
144
Color
expectedColor =
Color
.Green;
154
Color
defaultColor = accessor.IEVisitedLinkColor;
162
Color
expectedColor =
Color
.Blue;
197
_toolStripLabel.ActiveLinkColor =
Color
.Red;
202
Color
defaultColor = accessor.IEActiveLinkColor;
210
_toolStripLabel.LinkColor =
Color
.Blue;
215
Color
defaultColor = accessor.IELinkColor;
220
public static TheoryData<string,
Color
, bool> ShouldSerializeColorData =>
223
{ nameof(ToolStripLabel.ActiveLinkColor),
Color
.Red, true },
224
{ nameof(ToolStripLabel.ActiveLinkColor),
Color
.Empty, false },
225
{ nameof(ToolStripLabel.LinkColor),
Color
.Blue, true },
226
{ nameof(ToolStripLabel.LinkColor),
Color
.Empty, false },
227
{ nameof(ToolStripLabel.VisitedLinkColor),
Color
.Green, true },
228
{ nameof(ToolStripLabel.VisitedLinkColor),
Color
.Empty, false }
233
public void ToolStripLabel_ShouldSerializeColor_ReturnsExpected(string propertyName,
Color
color, bool expected)
System\Windows\Forms\ToolStripMenuItemTests.cs (4)
68
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
276
BackColor =
Color
.Red,
287
ForeColor =
Color
.Blue,
291
ImageTransparentColor =
Color
.Green,
System\Windows\Forms\ToolStripRendererTests.cs (21)
30
yield return new object[] { null, Rectangle.Empty,
Color
.Empty, arrowDirection };
31
yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4),
Color
.Red, arrowDirection };
34
yield return new object[] { null, Rectangle.Empty,
Color
.Empty, ArrowDirection.Left - 1 };
35
yield return new object[] { null, Rectangle.Empty,
Color
.Empty, ArrowDirection.Up + 1 };
36
yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4),
Color
.Red, ArrowDirection.Left - 1 };
37
yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4),
Color
.Red, ArrowDirection.Up + 1 };
42
public void ToolStripRenderer_DrawArrow_Invoke_CallsRenderArrow(ToolStripItem toolStripItem, Rectangle arrowRectangle,
Color
arrowColor, ArrowDirection arrowDirection)
294
yield return new object[] { new SubToolStripItem(), null, Rectangle.Empty,
Color
.Empty, null, TextFormatFlags.Left };
295
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 0, 4),
Color
.Empty, null, TextFormatFlags.Left };
296
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 0),
Color
.Empty, null, TextFormatFlags.Left };
297
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 4),
Color
.Empty, null, TextFormatFlags.Left };
299
yield return new object[] { new SubToolStripItem(), "Text", Rectangle.Empty,
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
300
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 0, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
301
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 0),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
302
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
303
yield return new object[] { new SubToolStripItem() { Enabled = false }, "Text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
304
yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical270 }, "Text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
305
yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical90 }, "Text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
310
public void ToolStripRenderer_DrawItemText_Invoke_CallsRenderItemText(ToolStripItem item, string text, Rectangle textRectangle,
Color
textColor, Font textFont, TextFormatFlags format)
722
public void ToolStripRenderer_OnRenderArrow_Invoke_Nop(ToolStripItem toolStripItem, Rectangle arrowRectangle,
Color
arrowColor, ArrowDirection arrowDirection)
839
public void ToolStripRenderer_OnRenderItemText_Invoke_Nop(ToolStripItem item, string text, Rectangle textRectangle,
Color
textColor, Font textFont, TextFormatFlags format)
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (15)
30
yield return new object[] { new ToolStrip() { BackColor =
Color
.Red }, new Rectangle(0, 0, 100, 25),
Color
.Red };
37
public void ToolStripRenderEventArgs_Ctor_Graphics_ToolStrip(ToolStrip toolStrip, Rectangle expectedAffectedBounds,
Color
expectedBackColor)
52
yield return new object[] { new ToolStrip(), new Rectangle(1, 2, 3, 4),
Color
.Empty, SystemColors.Control };
53
yield return new object[] { new ToolStrip() { BackColor =
Color
.Red }, new Rectangle(1, 2, 3, 4),
Color
.Empty,
Color
.Red };
54
yield return new object[] { new ToolStripDropDown(), new Rectangle(1, 2, 3, 4),
Color
.Empty, SystemColors.Menu };
55
yield return new object[] { new MenuStrip(), new Rectangle(1, 2, 3, 4),
Color
.Empty, SystemColors.MenuBar };
56
yield return new object[] { new ToolStrip() { BackColor =
Color
.Red }, new Rectangle(1, 2, 3, 4),
Color
.Blue,
Color
.Blue };
61
public void ToolStripRenderEventArgs_Ctor_Graphics_ToolStrip_Rectangle_Color(ToolStrip toolStrip, Rectangle affectedBounds,
Color
backColor,
Color
expectedBackColor)
94
ToolStripRenderEventArgs e = new(graphics, toolStrip, new Rectangle(1, 2, 3, 4),
Color
.Empty);
System\Windows\Forms\ToolStripSeparatorTests.cs (24)
61
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
335
public void ToolStripSeparator_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
362
item.ForeColor =
Color
.Red;
363
Assert.Equal(
Color
.Red, item.ForeColor);
367
item.ForeColor =
Color
.Red;
368
Assert.Equal(
Color
.Red, item.ForeColor);
372
item.ForeColor =
Color
.Empty;
378
item.ForeColor =
Color
.Red;
379
Assert.Equal(
Color
.Red, item.ForeColor);
390
item.ForeColor =
Color
.Red;
391
Assert.Equal(
Color
.Red, item.ForeColor);
406
item.ForeColor =
Color
.Red;
407
Assert.Equal(
Color
.Red, item.ForeColor);
417
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
428
public void ToolStripSeparator_Image_Set_GetReturnsExpected(
Color
imageTransparentColor, Image value)
527
foreach (
Color
color in new
Color
[] {
Color
.Empty,
Color
.Red })
538
public void ToolStripSeparator_ImageTransparentColor_Set_GetReturnsExpected(Image image,
Color
value)
System\Windows\Forms\ToolStripTests.cs (78)
1059
yield return new object[] {
Color
.Empty, Control.DefaultBackColor };
1060
yield return new object[] {
Color
.Red,
Color
.Red };
1065
public void ToolStrip_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
2672
public void ToolStrip_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
2701
control.ForeColor =
Color
.Red;
2702
Assert.Equal(
Color
.Red, control.ForeColor);
2706
control.ForeColor =
Color
.Red;
2707
Assert.Equal(
Color
.Red, control.ForeColor);
2711
control.ForeColor =
Color
.Empty;
2717
control.ForeColor =
Color
.Red;
2718
Assert.Equal(
Color
.Red, control.ForeColor);
5855
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout };
5856
yield return new object[] { hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout };
5857
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout };
5858
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout };
5859
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout };
5860
yield return new object[] { hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout };
5869
public void ToolStrip_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
5929
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
5930
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
5931
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
5932
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
5933
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
5934
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
5938
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5939
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5940
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
5941
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
5942
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5943
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5945
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5946
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5947
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
5948
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
5949
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5950
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5980
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, expected1 };
5981
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, expected1 };
5982
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, expected1 };
5983
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, expected1 };
5991
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
5992
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
5996
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
5997
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
5998
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
5999
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
6000
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected2 };
6001
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected2 };
6003
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6004
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6005
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6006
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6007
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6008
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6016
public void ToolStrip_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
6067
public void ToolStrip_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
6126
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
6127
yield return new object[] { hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
6128
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
6129
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
6130
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
6131
yield return new object[] { hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
6135
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6136
yield return new object[] { hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6137
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
6138
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
6139
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6140
yield return new object[] { hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6142
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6143
yield return new object[] { hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6144
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6145
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6146
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6147
yield return new object[] { hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6154
public void ToolStrip_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ToolStripTests.Rendering.cs (2)
17
BackColor =
Color
.Blue,
49
State.BrushColor(
Color
.Blue)),
System\Windows\Forms\ToolTipTests.cs (3)
280
public void ToolTip_BackColor_Set_GetReturnsExpected(
Color
value)
336
public void ToolTip_ForeColor_Set_GetReturnsExpected(
Color
value)
353
Assert.Throws<ArgumentException>("value", () => toolTip.ForeColor =
Color
.Empty);
System\Windows\Forms\TreeNodeCollectionTests.cs (2)
19
Assert.Equal(
Color
.Empty, treeNode.BackColor);
27
Assert.Equal(
Color
.Empty, treeNode.ForeColor);
System\Windows\Forms\TreeNodeTests.cs (56)
17
Assert.Equal(
Color
.Empty, node.BackColor);
22
Assert.Equal(
Color
.Empty, node.ForeColor);
57
Assert.Equal(
Color
.Empty, node.BackColor);
62
Assert.Equal(
Color
.Empty, node.ForeColor);
105
Assert.Equal(
Color
.Empty, node.BackColor);
110
Assert.Equal(
Color
.Empty, node.ForeColor);
148
Assert.Equal(
Color
.Empty, node.BackColor);
153
Assert.Equal(
Color
.Empty, node.ForeColor);
196
Assert.Equal(
Color
.Empty, node.BackColor);
201
Assert.Equal(
Color
.Empty, node.ForeColor);
263
public void TreeNode_BackColor_Set_GetReturnsExpected(
Color
value)
278
public void TreeNode_BackColor_SetWithTreeView_GetReturnsExpected(
Color
value)
296
yield return new object[] {
Color
.Empty, 0 };
297
yield return new object[] {
Color
.Red, 1 };
302
public void TreeNode_BackColor_SetWithTreeViewWithHandle_GetReturnsExpected(
Color
value, int expectedInvalidatedCallCount)
333
yield return new object[] {
Color
.Empty };
334
yield return new object[] {
Color
.Blue };
335
yield return new object[] {
Color
.Red };
340
public void TreeNode_BackColor_SetWithCustomOldValue_GetReturnsExpected(
Color
value)
344
BackColor =
Color
.Blue
357
public void TreeNode_BackColor_SetWithCustomOldValueWithTreeView_GetReturnsExpected(
Color
value)
362
BackColor =
Color
.Blue
378
yield return new object[] {
Color
.Empty, 1 };
379
yield return new object[] {
Color
.Red, 1 };
380
yield return new object[] {
Color
.Blue, 0 };
385
public void TreeNode_BackColor_SetWithCustomOldValueWithTreeViewWithHandle_GetReturnsExpected(
Color
value, int expectedInvalidatedCallCount)
390
BackColor =
Color
.Blue
424
node.BackColor =
Color
.Red;
425
Assert.Equal(
Color
.Red, node.BackColor);
429
Assert.Equal(
Color
.Red, node.BackColor);
440
node.BackColor =
Color
.Red;
441
Assert.Equal(
Color
.Red, node.BackColor);
445
Assert.Equal(
Color
.Red, node.BackColor);
704
public void TreeNode_ForeColor_Set_GetReturnsExpected(
Color
value)
719
public void TreeNode_ForeColor_SetWithTreeView_GetReturnsExpected(
Color
value)
737
yield return new object[] {
Color
.Empty, 0 };
738
yield return new object[] {
Color
.Red, 1 };
743
public void TreeNode_ForeColor_SetWithTreeViewWithHandle_GetReturnsExpected(
Color
value, int expectedInvalidatedCallCount)
774
yield return new object[] {
Color
.Empty };
775
yield return new object[] {
Color
.Blue };
776
yield return new object[] {
Color
.Red };
781
public void TreeNode_ForeColor_SetWithCustomOldValue_GetReturnsExpected(
Color
value)
785
ForeColor =
Color
.Blue
798
public void TreeNode_ForeColor_SetWithCustomOldValueWithTreeView_GetReturnsExpected(
Color
value)
803
ForeColor =
Color
.Blue
819
yield return new object[] {
Color
.Empty, 1 };
820
yield return new object[] {
Color
.Red, 1 };
821
yield return new object[] {
Color
.Blue, 0 };
826
public void TreeNode_ForeColor_SetWithCustomOldValueWithTreeViewWithHandle_GetReturnsExpected(
Color
value, int expectedInvalidatedCallCount)
831
ForeColor =
Color
.Blue
865
node.ForeColor =
Color
.Red;
866
Assert.Equal(
Color
.Red, node.ForeColor);
870
Assert.Equal(
Color
.Red, node.ForeColor);
881
node.ForeColor =
Color
.Red;
882
Assert.Equal(
Color
.Red, node.ForeColor);
886
Assert.Equal(
Color
.Red, node.ForeColor);
System\Windows\Forms\TreeViewTests.cs (57)
86
Assert.Equal(
Color
.Empty, control.LineColor);
698
yield return new object[] {
Color
.Empty, SystemColors.Window };
699
yield return new object[] {
Color
.Red,
Color
.Red };
704
public void TreeView_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
721
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
722
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
727
public void TreeView_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
768
control.BackColor =
Color
.Red;
769
Assert.Equal(
Color
.Red, control.BackColor);
773
control.BackColor =
Color
.Red;
774
Assert.Equal(
Color
.Red, control.BackColor);
778
control.BackColor =
Color
.Empty;
784
control.BackColor =
Color
.Red;
785
Assert.Equal(
Color
.Red, control.BackColor);
1459
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1460
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1461
yield return new object[] {
Color
.White,
Color
.White };
1462
yield return new object[] {
Color
.Black,
Color
.Black };
1463
yield return new object[] {
Color
.Red,
Color
.Red };
1468
public void ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1483
public void ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1510
control.ForeColor =
Color
.Red;
1511
Assert.Equal(
Color
.Red, control.ForeColor);
1515
control.ForeColor =
Color
.Red;
1516
Assert.Equal(
Color
.Red, control.ForeColor);
1520
control.ForeColor =
Color
.Empty;
1526
control.ForeColor =
Color
.Red;
1527
Assert.Equal(
Color
.Red, control.ForeColor);
2956
public void LineColor_Set_GetReturnsExpected(
Color
value)
6020
BackColor =
Color
.Red,
6021
ForeColor =
Color
.Blue,
6022
LineColor =
Color
.Yellow,
6048
Assert.Equal(
Color
.Red, control.BackColor);
6049
Assert.Equal(
Color
.Blue, control.ForeColor);
6050
Assert.Equal(
Color
.Yellow, control.LineColor);
6066
Assert.Equal(
Color
.Red, control.BackColor);
6067
Assert.Equal(
Color
.Blue, control.ForeColor);
6068
Assert.Equal(
Color
.Yellow, control.LineColor);
6100
BackColor =
Color
.Red,
6101
ForeColor =
Color
.Blue,
6102
LineColor =
Color
.Yellow,
6129
Assert.Equal(
Color
.Red, control.BackColor);
6130
Assert.Equal(
Color
.Blue, control.ForeColor);
6131
Assert.Equal(
Color
.Yellow, control.LineColor);
6147
Assert.Equal(
Color
.Red, control.BackColor);
6148
Assert.Equal(
Color
.Blue, control.ForeColor);
6149
Assert.Equal(
Color
.Yellow, control.LineColor);
System\Windows\Forms\UpDownBaseTests.cs (43)
509
yield return new object[] {
Color
.Red,
Color
.Red };
510
yield return new object[] {
Color
.Empty, SystemColors.Window };
515
public void UpDownBase_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
532
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
533
yield return new object[] {
Color
.Empty, SystemColors.Window, 1 };
538
public void UpDownBase_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
579
control.BackColor =
Color
.Red;
580
Assert.Equal(
Color
.Red, control.BackColor);
584
control.BackColor =
Color
.Red;
585
Assert.Equal(
Color
.Red, control.BackColor);
589
control.BackColor =
Color
.Empty;
595
control.BackColor =
Color
.Red;
596
Assert.Equal(
Color
.Red, control.BackColor);
935
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
936
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
937
yield return new object[] {
Color
.White,
Color
.White };
938
yield return new object[] {
Color
.Black,
Color
.Black };
939
yield return new object[] {
Color
.Red,
Color
.Red };
944
public void UpDownBase_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
961
public void UpDownBase_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1002
control.ForeColor =
Color
.Red;
1003
Assert.Equal(
Color
.Red, control.ForeColor);
1007
control.ForeColor =
Color
.Red;
1008
Assert.Equal(
Color
.Red, control.ForeColor);
1012
control.ForeColor =
Color
.Empty;
1018
control.ForeColor =
Color
.Red;
1019
Assert.Equal(
Color
.Red, control.ForeColor);
2229
foreach (
Color
backColor in new
Color
[] {
Color
.Red,
Color
.Empty })
2243
public void UpDownBase_OnPaint_Invoke_CallsPaint(Size size, bool enabled, BorderStyle borderStyle,
Color
backColor)
2279
public void UpDownBase_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabled, BorderStyle borderStyle,
Color
backColor)
System\Windows\Forms\VisualStyles\VisualStyleInformationTests.cs (4)
54
Color
color = VisualStyleInformation.ControlHighlightHot;
55
Assert.NotEqual(
Color
.Empty, color);
141
Color
color = VisualStyleInformation.TextControlBorder;
142
Assert.NotEqual(
Color
.Empty, color);
TextBoxBaseTests.cs (41)
383
yield return new object[] {
Color
.Empty, SystemColors.Window };
384
yield return new object[] {
Color
.Red,
Color
.Red };
389
public void TextBoxBase_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
418
control.BackColor =
Color
.Red;
419
Assert.Equal(
Color
.Red, control.BackColor);
423
control.BackColor =
Color
.Red;
424
Assert.Equal(
Color
.Red, control.BackColor);
428
control.BackColor =
Color
.Empty;
434
control.BackColor =
Color
.Red;
435
Assert.Equal(
Color
.Red, control.BackColor);
1161
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1162
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1163
yield return new object[] {
Color
.White,
Color
.White };
1164
yield return new object[] {
Color
.Black,
Color
.Black };
1165
yield return new object[] {
Color
.Red,
Color
.Red };
1170
public void TextBoxBase_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1187
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1188
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1189
yield return new object[] {
Color
.White,
Color
.White, 1 };
1190
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1191
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1196
public void TextBoxBase_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1237
control.ForeColor =
Color
.Red;
1238
Assert.Equal(
Color
.Red, control.ForeColor);
1242
control.ForeColor =
Color
.Red;
1243
Assert.Equal(
Color
.Red, control.ForeColor);
1247
control.ForeColor =
Color
.Empty;
1253
control.ForeColor =
Color
.Red;
1254
Assert.Equal(
Color
.Red, control.ForeColor);
ToolStripContainerTests.cs (8)
60
_toolStripContainer.BackColor =
Color
.Red;
65
_toolStripContainer.BackColor =
Color
.Blue;
193
[InlineData(typeof(
Color
), "Red")]
194
[InlineData(typeof(
Color
), "Blue")]
195
[InlineData(typeof(
Color
), "Black")]
202
Color
colorValue = (
Color
)colorType.GetProperty(colorName).GetValue(null);
208
_toolStripContainer.ForeColor =
Color
.Red;
TrackBarTests.cs (11)
684
yield return new object[] {
Color
.Red };
685
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
686
yield return new object[] {
Color
.White };
687
yield return new object[] {
Color
.Black };
688
yield return new object[] {
Color
.Empty };
693
public void TrackBar_ForeColor_Set_Nop(
Color
value)
710
public void TrackBar_ForeColor_SetWithHandle_Nop(
Color
value)
751
control.ForeColor =
Color
.Red;
756
control.ForeColor =
Color
.Red;
761
control.ForeColor =
Color
.Empty;
767
control.ForeColor =
Color
.Red;
System.Windows.Forms.TestUtilities (20)
CommonTestHelperEx.cs (20)
13
public static TheoryData<
Color
,
Color
> GetBackColorTheoryData()
15
return new TheoryData<
Color
,
Color
>
17
{
Color
.Red,
Color
.Red },
18
{
Color
.Empty, Control.DefaultBackColor }
22
public static TheoryData<
Color
,
Color
> GetForeColorTheoryData()
24
return new TheoryData<
Color
,
Color
>
26
{
Color
.Red,
Color
.Red },
27
{
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) },
28
{
Color
.White,
Color
.White },
29
{
Color
.Black,
Color
.Black },
30
{
Color
.Empty, Control.DefaultForeColor }
System.Windows.Forms.UI.IntegrationTests (37)
PropertyGridTests.cs (37)
109
_propertyGrid.CommandsBorderColor =
Color
.Red;
110
_propertyGrid.CommandsBorderColor.Should().Be(
Color
.Red);
118
_propertyGrid.HelpBorderColor =
Color
.Blue;
119
_propertyGrid.HelpBorderColor.Should().Be(
Color
.Blue);
127
_propertyGrid.SelectedItemWithFocusBackColor =
Color
.Green;
128
_propertyGrid.SelectedItemWithFocusBackColor.Should().Be(
Color
.Green);
136
_propertyGrid.SelectedItemWithFocusForeColor =
Color
.Red;
137
_propertyGrid.SelectedItemWithFocusForeColor.Should().Be(
Color
.Red);
145
_propertyGrid.DisabledItemForeColor =
Color
.Blue;
146
_propertyGrid.DisabledItemForeColor.Should().Be(
Color
.Blue);
154
_propertyGrid.CategorySplitterColor =
Color
.Green;
155
_propertyGrid.CategorySplitterColor.Should().Be(
Color
.Green);
163
_propertyGrid.ForeColor =
Color
.Red;
164
_propertyGrid.ForeColor.Should().Be(
Color
.Red);
191
_propertyGrid.BackColor =
Color
.Blue;
192
_propertyGrid.BackColor.Should().Be(
Color
.Blue);
210
_propertyGrid.CommandsBackColor =
Color
.Green;
211
_propertyGrid.CommandsBackColor.Should().Be(
Color
.Green);
219
_propertyGrid.CommandsForeColor =
Color
.Red;
220
_propertyGrid.CommandsForeColor.Should().Be(
Color
.Red);
251
_propertyGrid.HelpBackColor =
Color
.Blue;
252
_propertyGrid.HelpBackColor.Should().Be(
Color
.Blue);
260
_propertyGrid.HelpForeColor =
Color
.Green;
261
_propertyGrid.HelpForeColor.Should().Be(
Color
.Green);
269
_propertyGrid.LineColor =
Color
.Red;
270
_propertyGrid.LineColor.Should().Be(
Color
.Red);
340
_propertyGrid.ViewBackColor =
Color
.Red;
341
_propertyGrid.ViewBackColor.Should().Be(
Color
.Red);
349
_propertyGrid.ViewBorderColor =
Color
.Blue;
350
_propertyGrid.ViewBorderColor.Should().Be(
Color
.Blue);
358
_propertyGrid.ViewForeColor =
Color
.Green;
359
_propertyGrid.ViewForeColor.Should().Be(
Color
.Green);
379
_propertyGrid.CommandsLinkColor =
Color
.Silver;
380
_propertyGrid.CommandsLinkColor.Should().Be(
Color
.Silver);
386
_propertyGrid.CommandsActiveLinkColor.Should().Be(
Color
.Red);
400
_propertyGrid.CommandsDisabledLinkColor =
Color
.Orange;
401
_propertyGrid.CommandsDisabledLinkColor.Should().Be(
Color
.Orange);
TrimTestBinaryDeserialization (1)
Form1.Designer.cs (1)
42
imageList1.TransparentColor =
Color
.Transparent;
WindowsFormsIntegration (10)
System\Windows\Integration\Convert.cs (2)
324
internal static SD.
Color
ToSystemDrawingColor(SWM.Color color)
326
return SD.
Color
.FromArgb(color.A, color.R, color.G, color.B);
System\Windows\Integration\ElementHost.cs (3)
1545
private static SD.
Color
FindSolidColorParent(Control whichControl)
1551
if (control.BackColor != SD.
Color
.Empty && control.BackColor.A == 255)
1556
return SD.
Color
.Empty;
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (5)
85
SD.
Color
wfColor = WindowsFormsHostPropertyMap.TranslateSolidOrGradientBrush(brush, out ignore);
223
SD.
Color
wfColor = WindowsFormsHostPropertyMap.TranslateSolidOrGradientBrush(brush, out defined);
375
private static SD.
Color
TranslateSolidOrGradientBrush(SWM.Brush brush, out bool defined)
378
SD.
Color
wfColor = SD.
Color
.Empty;
WinFormsControlsTest (89)
ChartControl.Designer.cs (67)
97
this.chart1.BackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240)))));
99
this.chart1.BackSecondaryColor = System.Drawing.
Color
.White;
100
this.chart1.BorderlineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
111
chartArea1.AxisX.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
112
chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
115
chartArea1.AxisY.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
116
chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
118
chartArea1.BackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228)))));
120
chartArea1.BackSecondaryColor = System.Drawing.
Color
.White;
121
chartArea1.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
128
chartArea1.ShadowColor = System.Drawing.
Color
.Transparent;
131
legend1.BackColor = System.Drawing.
Color
.Transparent;
144
series1.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
149
series1.MarkerBorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
150
series1.MarkerColor = System.Drawing.
Color
.LightSkyBlue;
156
series2.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
161
series2.MarkerBorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
162
series2.MarkerColor = System.Drawing.
Color
.Gold;
173
title1.ForeColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
175
title1.ShadowColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
182
this.chart2.BackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(223)))), ((int)(((byte)(193)))));
184
this.chart2.BorderlineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(64)))), ((int)(((byte)(1)))));
198
chartArea2.AxisX.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
199
chartArea2.AxisX.MajorGrid.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
203
chartArea2.AxisY.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
204
chartArea2.AxisY.MajorGrid.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
205
chartArea2.BackColor = System.Drawing.
Color
.OldLace;
207
chartArea2.BackSecondaryColor = System.Drawing.
Color
.White;
208
chartArea2.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
210
chartArea2.ShadowColor = System.Drawing.
Color
.Transparent;
217
series3.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
229
series4.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
247
title2.ForeColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
249
title2.ShadowColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
256
this.chart3.BackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240)))));
258
this.chart3.BackSecondaryColor = System.Drawing.
Color
.White;
259
this.chart3.BorderlineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
270
chartArea3.AxisX.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
271
chartArea3.AxisX.MajorGrid.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
273
chartArea3.AxisY.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
274
chartArea3.AxisY.MajorGrid.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
275
chartArea3.BackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228)))));
277
chartArea3.BackSecondaryColor = System.Drawing.
Color
.White;
278
chartArea3.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
280
chartArea3.ShadowColor = System.Drawing.
Color
.Transparent;
282
legend3.BackColor = System.Drawing.
Color
.Transparent;
290
series5.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
294
series6.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
297
series6.Color = System.Drawing.
Color
.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(180)))), ((int)(((byte)(65)))));
299
series6.MarkerBorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
309
title3.ForeColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
311
title3.ShadowColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
318
this.chart4.BackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240)))));
320
this.chart4.BorderlineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
330
chartArea4.AxisX.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
332
chartArea4.AxisX.MajorGrid.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
337
chartArea4.AxisY.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
339
chartArea4.AxisY.MajorGrid.LineColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
343
chartArea4.BackColor = System.Drawing.
Color
.Transparent;
345
chartArea4.BackSecondaryColor = System.Drawing.
Color
.Transparent;
346
chartArea4.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
348
chartArea4.ShadowColor = System.Drawing.
Color
.Transparent;
351
legend4.BackColor = System.Drawing.
Color
.Transparent;
359
series7.BorderColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
362
series7.Color = System.Drawing.
Color
.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240)))));
403
title4.ForeColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
405
title4.ShadowColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
DataGridViewTest.Designer.cs (1)
77
dataGridViewCellStyle3.ForeColor = System.Drawing.
Color
.Maroon;
ListViewTest.Designer.cs (3)
52
this.imageList1.TransparentColor = System.Drawing.
Color
.Transparent;
103
this.imageList2.TransparentColor = System.Drawing.
Color
.Transparent;
131
this.LargeImageList.TransparentColor = System.Drawing.
Color
.Transparent;
MenuStripAndCheckedListBox.Designer.cs (1)
65
this.menuStrip1.BackColor = System.Drawing.
Color
.IndianRed;
Panels.Designer.cs (4)
50
this.tableLayoutPanel1.BackColor = System.Drawing.
Color
.FromArgb((int)(byte)128, (int)(byte)255, (int)(byte)128);
57
this.tableLayoutPanel2.BackColor = System.Drawing.
Color
.FromArgb((int)(byte)255, (int)(byte)255, (int)(byte)128);
65
this.tableLayoutPanel3.BackColor = System.Drawing.
Color
.FromArgb((int)(byte)128, (int)(byte)255, (int)(byte)255);
84
this.currentDPILabel1.BackColor = System.Drawing.
Color
.FromArgb((int)(byte)255, (int)(byte)128, (int)(byte)255);
Splitter.Designer.cs (2)
48
this.splitContainer1.Panel1.BackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
52
this.splitContainer1.Panel2.BackColor = System.Drawing.
Color
.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
ToolStripTests.Designer.cs (9)
163
this.toolStrip2_Button1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
172
this.toolStrip2_Button2.ImageTransparentColor = System.Drawing.
Color
.Magenta;
180
this.toolStrip2_Button3.ImageTransparentColor = System.Drawing.
Color
.Magenta;
189
this.toolStrip2_Button4.ImageTransparentColor = System.Drawing.
Color
.Magenta;
196
this.toolStrip2_Button5.ImageTransparentColor = System.Drawing.
Color
.Magenta;
288
this.toolStrip2_SplitButton2.ImageTransparentColor = System.Drawing.
Color
.Magenta;
305
this.toolStrip2_DropDownButton2.ImageTransparentColor = System.Drawing.
Color
.Magenta;
349
this.toolStrip2_SplitButton1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
371
this.toolStrip2_DropDownButton1.ImageTransparentColor = System.Drawing.
Color
.Magenta;
TreeViewTest.Designer.cs (2)
56
this.imageList1.TransparentColor = System.Drawing.
Color
.Transparent;
64
this.BackColor = System.Drawing.
Color
.FromArgb((int)(byte)0, (int)(byte)192, (int)(byte)0);