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);
8922 references to Color
BinaryFormatTests (14)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
57
typeof(
Color
)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (11)
85
if (value is
Color
color)
87
deserialized.Should().BeOfType<
Color
>().Which.Should().BeEquivalentTo(color);
141
if (value is
Color
color)
143
deserialized.Should().BeOfType<
Color
>().Which.Should().BeEquivalentTo(color);
203
Color
.Empty,
204
Color
.AliceBlue,
205
Color
.FromKnownColor(KnownColor.ActiveCaption),
206
Color
.FromArgb(1, 2, 3),
207
Color
.FromArgb(4,
Color
.Yellow),
208
Color
.FromName("Blue"),
SerializationRecordExtensionsTests.cs (2)
72
if (value is
Color
color)
74
deserialized.Should().BeOfType<
Color
>().Which.Should().BeEquivalentTo(color);
DesignSurface (32)
CustomControls\CustomButtonDesignerActionList.cs (7)
52
Color
backColor = (
Color
)dockProp.GetValue(Component);
53
if (backColor !=
Color
.Yellow)
75
Color
backColor = _control.BackColor;
76
_control.BackColor = backColor !=
Color
.Yellow ?
Color
.Yellow :
Color
.Blue;
MainForm.cs (20)
116
rootComponent.BackColor =
Color
.Gray;
125
b1.BackColor =
Color
.LightGray;
126
b2.BackColor =
Color
.LightGreen;
145
pnl.BackColor =
Color
.Aquamarine;
156
l1.BackColor =
Color
.Coral;
157
l2.BackColor =
Color
.LightGreen;
161
sct.BackColor =
Color
.White;
177
rootComponent.BackColor =
Color
.Yellow;
186
b1.BackColor =
Color
.Coral;
188
l1.BackColor =
Color
.Coral;
206
rootComponent.BackColor =
Color
.YellowGreen;
218
b3.BackColor =
Color
.LightGray;
228
rootComponent.BackColor =
Color
.Orange;
236
b1.BackColor =
Color
.Gold;
237
b2.BackColor =
Color
.LightGreen;
263
rootComponent.BackColor =
Color
.Orange;
285
rootComponent.BackColor =
Color
.Pink;
332
splitContainer.BackColor =
Color
.Red;
341
userControl.BackColor =
Color
.LightSkyBlue;
357
splitter.BackColor =
Color
.Green;
MainForm.Designer.cs (3)
212
this.ToolStripMenuItemCut.ImageTransparentColor = System.Drawing.
Color
.Magenta;
222
this.ToolStripMenuItemCopy.ImageTransparentColor = System.Drawing.
Color
.Magenta;
232
this.ToolStripMenuItemPaste.ImageTransparentColor = System.Drawing.
Color
.Magenta;
MainForm.MyScrollableControl.cs (1)
17
BackColor =
Color
.Red;
MainForm.MyUserControl.cs (1)
20
BackColor =
Color
.LightBlue;
DesignSurfaceExt (3)
DesignSurfaceExt.cs (3)
118
ctrl.BackColor =
Color
.LightGray;
128
ctrl.BackColor =
Color
.DarkGray;
138
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)
58
typeof(
Color
)
BinaryFormat\DataObjectTests.cs (1)
51
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 (87)
Special\NotSupported.cs (87)
34
public System.IntPtr GetHbitmap(System.Drawing.
Color
background) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
37
public System.Drawing.
Color
GetPixel(int x, int y) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
41
public void MakeTransparent(System.Drawing.
Color
transparentColor) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
42
public void SetPixel(int x, int y, System.Drawing.
Color
color) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
254
public static System.Drawing.
Color
FromHtml(string htmlColor) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
255
public static System.Drawing.
Color
FromOle(int oleColor) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
256
public static System.Drawing.
Color
FromWin32(int win32Color) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
257
public static string ToHtml(System.Drawing.
Color
c) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
258
public static int ToOle(System.Drawing.
Color
c) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
259
public static int ToWin32(System.Drawing.
Color
c) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
456
public void Clear(System.Drawing.
Color
color) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
630
public System.Drawing.
Color
GetNearestColor(System.Drawing.
Color
color) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
846
public Pen(System.Drawing.
Color
color) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
847
public Pen(System.Drawing.
Color
color, float width) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
850
public System.Drawing.
Color
Color { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1108
public SolidBrush(System.Drawing.
Color
color) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1109
public System.Drawing.
Color
Color { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1225
public static System.Drawing.Brush FromSystemColor(System.Drawing.
Color
c) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1230
public static System.Drawing.
Color
ActiveBorder { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1231
public static System.Drawing.
Color
ActiveCaption { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1232
public static System.Drawing.
Color
ActiveCaptionText { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1233
public static System.Drawing.
Color
AppWorkspace { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1234
public static System.Drawing.
Color
ButtonFace { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1235
public static System.Drawing.
Color
ButtonHighlight { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1236
public static System.Drawing.
Color
ButtonShadow { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1237
public static System.Drawing.
Color
Control { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1238
public static System.Drawing.
Color
ControlDark { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1239
public static System.Drawing.
Color
ControlDarkDark { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1240
public static System.Drawing.
Color
ControlLight { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1241
public static System.Drawing.
Color
ControlLightLight { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1242
public static System.Drawing.
Color
ControlText { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1243
public static System.Drawing.
Color
Desktop { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1244
public static System.Drawing.
Color
GradientActiveCaption { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1245
public static System.Drawing.
Color
GradientInactiveCaption { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1246
public static System.Drawing.
Color
GrayText { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1247
public static System.Drawing.
Color
Highlight { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1248
public static System.Drawing.
Color
HighlightText { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1249
public static System.Drawing.
Color
HotTrack { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1250
public static System.Drawing.
Color
InactiveBorder { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1251
public static System.Drawing.
Color
InactiveCaption { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1252
public static System.Drawing.
Color
InactiveCaptionText { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1253
public static System.Drawing.
Color
Info { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1254
public static System.Drawing.
Color
InfoText { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1255
public static System.Drawing.
Color
Menu { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1256
public static System.Drawing.
Color
MenuBar { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1257
public static System.Drawing.
Color
MenuHighlight { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1258
public static System.Drawing.
Color
MenuText { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1259
public static System.Drawing.
Color
ScrollBar { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1260
public static System.Drawing.
Color
Window { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1261
public static System.Drawing.
Color
WindowFrame { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1262
public static System.Drawing.
Color
WindowText { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1327
public static System.Drawing.Pen FromSystemColor(System.Drawing.
Color
c) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1410
public System.Drawing.
Color
[] Colors { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1623
public HatchBrush(System.Drawing.Drawing2D.HatchStyle hatchstyle, System.Drawing.
Color
foreColor) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1624
public HatchBrush(System.Drawing.Drawing2D.HatchStyle hatchstyle, System.Drawing.
Color
foreColor, System.Drawing.
Color
backColor) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1625
public System.Drawing.
Color
BackgroundColor { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1626
public System.Drawing.
Color
ForegroundColor { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1706
public LinearGradientBrush(System.Drawing.Point point1, System.Drawing.Point point2, System.Drawing.
Color
color1, System.Drawing.
Color
color2) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1707
public LinearGradientBrush(System.Drawing.PointF point1, System.Drawing.PointF point2, System.Drawing.
Color
color1, System.Drawing.
Color
color2) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1708
public LinearGradientBrush(System.Drawing.Rectangle rect, System.Drawing.
Color
color1, System.Drawing.
Color
color2, System.Drawing.Drawing2D.LinearGradientMode linearGradientMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1709
public LinearGradientBrush(System.Drawing.Rectangle rect, System.Drawing.
Color
color1, System.Drawing.
Color
color2, float angle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1710
public LinearGradientBrush(System.Drawing.Rectangle rect, System.Drawing.
Color
color1, System.Drawing.
Color
color2, float angle, bool isAngleScaleable) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1711
public LinearGradientBrush(System.Drawing.RectangleF rect, System.Drawing.
Color
color1, System.Drawing.
Color
color2, System.Drawing.Drawing2D.LinearGradientMode linearGradientMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1712
public LinearGradientBrush(System.Drawing.RectangleF rect, System.Drawing.
Color
color1, System.Drawing.
Color
color2, float angle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1713
public LinearGradientBrush(System.Drawing.RectangleF rect, System.Drawing.
Color
color1, System.Drawing.
Color
color2, float angle, bool isAngleScaleable) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1717
public System.Drawing.
Color
[] LinearColors { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1826
public System.Drawing.
Color
CenterColor { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1831
public System.Drawing.
Color
[] SurroundColors { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1966
public System.Drawing.
Color
NewColor { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1967
public System.Drawing.
Color
OldColor { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
2025
public System.Drawing.
Color
[] Entries { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
2426
public void SetColorKey(System.Drawing.
Color
colorLow, System.Drawing.
Color
colorHigh) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2427
public void SetColorKey(System.Drawing.
Color
colorLow, System.Drawing.
Color
colorHigh, System.Drawing.Imaging.ColorAdjustType type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2447
public void SetWrapMode(System.Drawing.Drawing2D.WrapMode mode, System.Drawing.
Color
color) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2448
public void SetWrapMode(System.Drawing.Drawing2D.WrapMode mode, System.Drawing.
Color
color, bool clamp) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (1366)
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;
459
Color
c =
Color
.FromArgb(255, 100, 200, 250);
490
Color
clr = bmp.GetPixel(x, y);
669
Color
pixel_colour;
671
Color
red =
Color
.FromArgb(
Color
.Red.A,
Color
.Red.R,
Color
.Red.G,
Color
.Red.B);
672
Color
blue =
Color
.FromArgb(
Color
.Blue.A,
Color
.Blue.R,
Color
.Blue.G,
Color
.Blue.B);
688
pixel_colour =
Color
.FromArgb(pixel_value);
690
pixel_colour =
Color
.FromArgb(red.A, pixel_colour.R, pixel_colour.G, pixel_colour.B);
704
pixel_colour =
Color
.FromArgb(red.A, pixel_colour.R, pixel_colour.G, pixel_colour.B);
723
pixel_colour =
Color
.FromArgb(blue.A, pixel_colour.R, pixel_colour.G, pixel_colour.B);
739
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);
2243
using Pen pen = new(
Color
.Red, 3.0f);
2270
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\ImageTests.cs (1)
675
using CreatePenScope pen = new(
Color
.Red);
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\Imaging\MetafileTests.cs (2)
1026
using CreatePenScope pen = new(
Color
.Blue);
1027
using CreateBrushScope brush = new(
Color
.Green);
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\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\Nrbf\CoreNrbfSerializer.cs (2)
93
{ Types.ToTypeName($"{Types.ColorType}"), typeof(
Color
) },
160
|| type == typeof(
Color
);
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (3)
243
/// Tries to get this object as a <see cref="
Color
"/>.
254
|| !classInfo.TypeNameMatches(typeof(
Color
))
263
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\PInvokeCore.GetSysColorBrush.cs (1)
11
public static HBRUSH GetSysColorBrush(
Color
systemColor)
System.Private.Windows.Core.Tests (3)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (3)
62
Color
.Red
1008
public
Color
Color =
Color
.Red;
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.Private.Windows.GdiPlus (3)
Windows\Win32\Graphics\GdiPlus\GpBitmapExtensions.cs (3)
6
using DrawingColor = System.Drawing.
Color
;
37
public static HBITMAP GetHBITMAP(this IPointer<GpBitmap> bitmap) => bitmap.GetHBITMAP(
DrawingColor
.LightGray);
39
public static HBITMAP GetHBITMAP(this IPointer<GpBitmap> bitmap,
DrawingColor
background)
System.Windows.Forms (2126)
GlobalUsings.cs (1)
34
global using Color = System.Drawing.
Color
;
System\Drawing\Design\UITypeEditor.cs (1)
53
[typeof(
Color
)] = $"System.Drawing.Design.ColorEditor, {(Assemblies.SystemDrawingDesign)}",
System\Windows\Forms\ActiveX\AxHost.cs (4)
255
public override
Color
BackColor
347
public override
Color
ForeColor
3631
protected static
Color
GetColorFromOleColor(uint color)
3641
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)
693
Color
color = BackColor;
770
public virtual
Color
BackColor
774
Color
c = RawBackColor; // inheritedProperties.BackColor
808
if (!value.Equals(
Color
.Empty) && !GetStyle(ControlStyles.SupportsTransparentBackColor) && value.A < 255)
813
Color
previous = BackColor;
1545
public static
Color
DefaultBackColor => SystemColors.Control;
1576
public static
Color
DefaultForeColor => SystemColors.ControlText;
1609
internal
Color
DisabledColor
1613
Color
color = BackColor;
1996
public virtual
Color
ForeColor
2000
Properties.TryGetValue(s_foreColorProperty, out
Color
color);
2029
Color
previous = ForeColor;
2390
private bool IsValidBackColor(
Color
c) => c.IsEmpty || GetStyle(ControlStyles.SupportsTransparentBackColor) || c.A == 255;
2664
internal
Color
RawBackColor => Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
2776
private bool RenderColorTransparent(
Color
c)
2948
Color
oldBackColor =
Color
.Empty;
2949
Color
oldForeColor =
Color
.Empty;
4155
Color
oldForeColor = ForeColor;
4156
Color
oldBackColor = BackColor;
6902
Color
backColor = Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
7035
Color
foreColor = Properties.GetValueOrDefault<
Color
>(s_foreColorProperty);
8075
internal void PaintBackground(PaintEventArgs e, Rectangle rectangle,
Color
backColor, Point scrollOffset = default)
8126
private static void PaintBackColor(PaintEventArgs e, Rectangle rectangle,
Color
backColor)
8133
Color
color = backColor;
8155
using Pen pen = new(
Color
.Red, width: 2);
9066
BackColor =
Color
.Empty;
9095
ForeColor =
Color
.Empty;
10464
Color
backColor = Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
10484
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)
10
public
Color
ButtonFace { get; set; }
11
public
Color
ButtonShadow { get; set; }
12
public
Color
ButtonShadowDark { get; set; }
13
public
Color
ContrastButtonShadow { get; set; }
14
public
Color
WindowText { get; set; }
15
public
Color
WindowDisabled { get; set; }
16
public
Color
Highlight { get; set; }
17
public
Color
LowHighlight { get; set; }
18
public
Color
LowButtonFace { get; set; }
19
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)
69
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)
72
private void PaintFlatWorker(PaintEventArgs e,
Color
checkColor,
Color
checkBackground,
Color
checkBorder, ColorData colors)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonPopupAdapter.cs (1)
55
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)
15
private
Color
_borderColor =
Color
.Empty;
16
private
Color
_checkedBackColor =
Color
.Empty;
17
private
Color
_mouseDownBackColor =
Color
.Empty;
18
private
Color
_mouseOverBackColor =
Color
.Empty;
65
[DefaultValue(typeof(
Color
), "")]
66
public
Color
BorderColor
71
if (value.Equals(
Color
.Transparent))
93
[DefaultValue(typeof(
Color
), "")]
94
public
Color
CheckedBackColor
117
[DefaultValue(typeof(
Color
), "")]
118
public
Color
MouseDownBackColor
141
[DefaultValue(typeof(
Color
), "")]
142
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)
73
Color
outerBorderColor = GetOuterBorderColor(comboBox);
74
Color
innerBorderColor = GetInnerBorderColor(comboBox);
115
Color
borderPenColor = GetPopupOuterBorderColor(comboBox, focused);
170
protected virtual
Color
GetOuterBorderColor(ComboBox comboBox)
173
protected virtual
Color
GetPopupOuterBorderColor(ComboBox comboBox, bool focused)
183
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)
5677
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;
3142
(
Color
darkColor,
Color
lightColor) = GetContrastedColors(cellStyle.BackColor);
3154
Color
dividerWidthColor = advancedBorderStyle.Right switch
3189
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)
1118
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected
1288
Color
foreBrushColor = default;
1289
Color
backBrushColor = default;
1290
Color
highlight = default;
1312
highlight =
Color
.FromArgb(
1362
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)
1927
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected && !cellEdited
2266
ControlPaint.DrawFocusRectangle(g, focusBounds,
Color
.Empty, cellStyle.ForeColor);
2277
ControlPaint.DrawFocusRectangle(g, focusBounds,
Color
.Empty, cellStyle.ForeColor);
2282
ControlPaint.DrawFocusRectangle(g, textBounds,
Color
.Empty, cellStyle.ForeColor);
2325
Color
textColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (2)
77
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)
1191
Color
backColor;
1201
ControlPaint.DrawFocusRectangle(graphics, bounds,
Color
.Empty, backColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (11)
735
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected
817
Color
iconColor;
877
Color
textColor;
975
Color
iconColor;
1025
Color
foreColor,
1026
Color
backColor)
1035
(
Color
OldColor,
Color
NewColor) map = new(
Color
.Black, foreColor);
1037
attr.SetRemapTable(ColorAdjustType.Bitmap, new ReadOnlySpan<(
Color
OldColor,
Color
NewColor)>(ref map));
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
686
Color
brushColor = PaintSelectionBackground(paintParts) && cellSelected && !cellEdited
716
ControlPaint.DrawFocusRectangle(graphics, valBounds,
Color
.Empty, cellStyle.ForeColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (2)
102
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 (15)
106
private
Color
_odCacheForeColor = SystemColors.WindowText;
107
private
Color
_odCacheBackColor = SystemColors.Window;
346
public override
Color
BackColor
831
public override
Color
ForeColor
2784
Color
subItemForeColor =
Color
.Empty;
2785
Color
subItemBackColor =
Color
.Empty;
2815
Color
riFore =
Color
.Empty;
2816
Color
riBack =
Color
.Empty;
4935
Color
c;
5995
Color
foreColor = PInvoke.GetTextColor(nmcd->hdc);
5996
Color
backColor = PInvoke.GetBkColor(nmcd->hdc);
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)
263
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)
35
public static
Color
ButtonSelectedHighlight => ColorTable.ButtonSelectedHighlight;
38
public static
Color
ButtonSelectedHighlightBorder => ColorTable.ButtonSelectedHighlightBorder;
41
public static
Color
ButtonPressedHighlight => ColorTable.ButtonPressedHighlight;
44
public static
Color
ButtonPressedHighlightBorder => ColorTable.ButtonPressedHighlightBorder;
47
public static
Color
ButtonCheckedHighlight => ColorTable.ButtonCheckedHighlight;
50
public static
Color
ButtonCheckedHighlightBorder => ColorTable.ButtonCheckedHighlightBorder;
53
public static
Color
ButtonPressedBorder => ColorTable.ButtonPressedBorder;
56
public static
Color
ButtonSelectedBorder => ColorTable.ButtonSelectedBorder;
59
public static
Color
ButtonCheckedGradientBegin => ColorTable.ButtonCheckedGradientBegin;
62
public static
Color
ButtonCheckedGradientMiddle => ColorTable.ButtonCheckedGradientMiddle;
65
public static
Color
ButtonCheckedGradientEnd => ColorTable.ButtonCheckedGradientEnd;
68
public static
Color
ButtonSelectedGradientBegin => ColorTable.ButtonSelectedGradientBegin;
71
public static
Color
ButtonSelectedGradientMiddle => ColorTable.ButtonSelectedGradientMiddle;
74
public static
Color
ButtonSelectedGradientEnd => ColorTable.ButtonSelectedGradientEnd;
77
public static
Color
ButtonPressedGradientBegin => ColorTable.ButtonPressedGradientBegin;
80
public static
Color
ButtonPressedGradientMiddle => ColorTable.ButtonPressedGradientMiddle;
83
public static
Color
ButtonPressedGradientEnd => ColorTable.ButtonPressedGradientEnd;
86
public static
Color
CheckBackground => ColorTable.CheckBackground;
89
public static
Color
CheckSelectedBackground => ColorTable.CheckSelectedBackground;
92
public static
Color
CheckPressedBackground => ColorTable.CheckPressedBackground;
95
public static
Color
GripDark => ColorTable.GripDark;
98
public static
Color
GripLight => ColorTable.GripLight;
101
public static
Color
ImageMarginGradientBegin => ColorTable.ImageMarginGradientBegin;
104
public static
Color
ImageMarginGradientMiddle => ColorTable.ImageMarginGradientMiddle;
107
public static
Color
ImageMarginGradientEnd => ColorTable.ImageMarginGradientEnd;
110
public static
Color
ImageMarginRevealedGradientBegin => ColorTable.ImageMarginRevealedGradientBegin;
113
public static
Color
ImageMarginRevealedGradientMiddle => ColorTable.ImageMarginRevealedGradientMiddle;
116
public static
Color
ImageMarginRevealedGradientEnd => ColorTable.ImageMarginRevealedGradientEnd;
119
public static
Color
MenuStripGradientBegin => ColorTable.MenuStripGradientBegin;
122
public static
Color
MenuStripGradientEnd => ColorTable.MenuStripGradientEnd;
125
public static
Color
MenuBorder => ColorTable.MenuBorder;
128
public static
Color
MenuItemSelected => ColorTable.MenuItemSelected;
131
public static
Color
MenuItemBorder => ColorTable.MenuItemBorder;
134
public static
Color
MenuItemSelectedGradientBegin => ColorTable.MenuItemSelectedGradientBegin;
137
public static
Color
MenuItemSelectedGradientEnd => ColorTable.MenuItemSelectedGradientEnd;
140
public static
Color
MenuItemPressedGradientBegin => ColorTable.MenuItemPressedGradientBegin;
143
public static
Color
MenuItemPressedGradientMiddle => ColorTable.MenuItemPressedGradientMiddle;
146
public static
Color
MenuItemPressedGradientEnd => ColorTable.MenuItemPressedGradientEnd;
149
public static
Color
RaftingContainerGradientBegin => ColorTable.RaftingContainerGradientBegin;
152
public static
Color
RaftingContainerGradientEnd => ColorTable.RaftingContainerGradientEnd;
155
public static
Color
SeparatorDark => ColorTable.SeparatorDark;
158
public static
Color
SeparatorLight => ColorTable.SeparatorLight;
161
public static
Color
StatusStripBorder => ColorTable.StatusStripBorder;
164
public static
Color
StatusStripGradientBegin => ColorTable.StatusStripGradientBegin;
167
public static
Color
StatusStripGradientEnd => ColorTable.StatusStripGradientEnd;
170
public static
Color
ToolStripBorder => ColorTable.ToolStripBorder;
173
public static
Color
ToolStripDropDownBackground => ColorTable.ToolStripDropDownBackground;
176
public static
Color
ToolStripGradientBegin => ColorTable.ToolStripGradientBegin;
179
public static
Color
ToolStripGradientMiddle => ColorTable.ToolStripGradientMiddle;
182
public static
Color
ToolStripGradientEnd => ColorTable.ToolStripGradientEnd;
185
public static
Color
ToolStripContentPanelGradientBegin => ColorTable.ToolStripContentPanelGradientBegin;
188
public static
Color
ToolStripContentPanelGradientEnd => ColorTable.ToolStripContentPanelGradientEnd;
191
public static
Color
ToolStripPanelGradientBegin => ColorTable.ToolStripPanelGradientBegin;
194
public static
Color
ToolStripPanelGradientEnd => ColorTable.ToolStripPanelGradientEnd;
197
public static
Color
OverflowButtonGradientBegin => ColorTable.OverflowButtonGradientBegin;
200
public static
Color
OverflowButtonGradientMiddle => ColorTable.OverflowButtonGradientMiddle;
203
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)
623
BackColor =
Color
.Transparent;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
364
public new
Color
BackColor
756
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 (29)
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);
1609
internal
Color
RawBackColor => Properties.GetValueOrDefault(s_backColorProperty,
Color
.Empty);
2883
Color
backColor = Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
2931
Color
foreColor = Properties.GetValueOrDefault<
Color
>(s_foreColorProperty);
3282
private bool ShouldSerializeImageTransparentColor() => ImageTransparentColor !=
Color
.Empty;
3290
Color
backColor = Properties.GetValueOrDefault<
Color
>(s_backColorProperty);
3304
Color
foreColor = Properties.GetValueOrDefault<
Color
>(s_foreColorProperty);
3372
public virtual void ResetBackColor() => BackColor =
Color
.Empty;
3381
public virtual void ResetForeColor() => ForeColor =
Color
.Empty;
3396
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)
834
Color
backgroundColor = e.Item.Selected ? SystemColors.Highlight : e.Item.BackColor;
865
Color
textColor = e.TextColor;
1022
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)
237
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\Unsupported\DataGrid\DataGrid.cs (13)
48
public
Color
AlternatingBackColor
54
public
Color
BackgroundColor
90
public
Color
CaptionBackColor
96
public
Color
CaptionForeColor
199
public
Color
SelectionBackColor
205
public
Color
SelectionForeColor
215
public
Color
GridLineColor
258
public
Color
HeaderBackColor
270
public
Color
HeaderForeColor
344
public
Color
LinkColor
354
public
Color
LinkHoverColor
370
public
Color
ParentRowsBackColor
378
public
Color
ParentRowsForeColor
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridTableStyle.cs (10)
45
public
Color
AlternatingBackColor
65
public
Color
BackColor
79
public
Color
ForeColor
93
public
Color
GridLineColor
122
public
Color
HeaderBackColor
154
public
Color
HeaderForeColor
170
public
Color
LinkColor
188
public
Color
LinkHoverColor
274
public
Color
SelectionBackColor
291
public
Color
SelectionForeColor
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBar.cs (2)
33
public override
Color
BackColor
79
public override
Color
ForeColor
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBarDrawItemEventArgs.cs (2)
43
Color
foreColor,
44
Color
backColor) : base(
System\Windows\Forms\Controls\Unsupported\ToolBar\ToolBar.cs (2)
53
public override
Color
BackColor
128
public override
Color
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)
169
public
Color
BackColor
182
return
Color
.Empty;
194
public
Color
ForeColor
207
return
Color
.Empty;
219
public
Color
LinkColor
232
return
Color
.Empty;
244
public
Color
ActiveLinkColor
257
return
Color
.Empty;
269
public
Color
VisitedLinkColor
282
return
Color
.Empty;
643
private static
Color
ColorFromVARIANT(VARIANT vColor)
657
return
Color
.FromArgb(255,
Color
.FromArgb(int.Parse(hexColor, NumberStyles.HexNumber, CultureInfo.InvariantCulture)));
661
return
Color
.FromName(strColor);
667
return
Color
.FromArgb(255,
Color
.FromArgb(vColor.data.intVal));
674
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)
21
private
Color
_color;
59
public
Color
Color
62
set => _color = !value.IsEmpty ? value :
Color
.Black;
151
_color =
Color
.Black;
155
private void ResetColor() => Color =
Color
.Black;
215
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 (5)
298
public override void ResetForeColor() => ForeColor =
Color
.White;
300
internal override bool ShouldSerializeForeColor() => !ForeColor.Equals(
Color
.White);
345
Color
backColor = GetBackColor(isHighContrast);
595
Color
brushColor = SystemColors.ControlText;
744
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
145
public static unsafe IntPtr CreateHBitmap16Bit(Bitmap bitmap,
Color
background)
368
public static
Color
Dark(
Color
baseColor, float percOfDarkDark) => new HLSColor(baseColor).Darker(percOfDarkDark);
373
public static
Color
Dark(
Color
baseColor) => new HLSColor(baseColor).Darker(0.5f);
378
public static
Color
DarkDark(
Color
baseColor) => new HLSColor(baseColor).Darker(1.0f);
380
internal static bool IsDark(
Color
color) => color.GetBrightness() <= .5;
385
internal static bool IsDarker(
Color
c1,
Color
c2) => new HLSColor(c1).Luminosity < new HLSColor(c2).Luminosity;
398
DrawBorder(graphics, bounds,
Color
.FromKnownColor(KnownColor.WindowFrame), ButtonBorderStyle.Solid);
414
Color
backColor,
518
public static void DrawBorder(Graphics graphics, Rectangle bounds,
Color
color, ButtonBorderStyle style)
547
Color
leftColor, int leftWidth, ButtonBorderStyle leftStyle,
548
Color
topColor, int topWidth, ButtonBorderStyle topStyle,
549
Color
rightColor, int rightWidth, ButtonBorderStyle rightStyle,
550
Color
bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle)
566
Color
leftColor, int leftWidth, ButtonBorderStyle leftStyle,
567
Color
topColor, int topWidth, ButtonBorderStyle topStyle,
568
Color
rightColor, int rightWidth, ButtonBorderStyle rightStyle,
569
Color
bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle)
1052
private static void DrawBorderComplex(Graphics graphics, Rectangle bounds,
Color
color, ButtonBorderStyle style)
1140
Color
color,
1189
Color
.Empty,
1190
Color
.Empty);
1218
Color
.Empty,
1219
Color
.Empty);
1244
Color
.Empty,
1245
Color
.Empty);
1264
Color
.Empty,
1265
Color
.Empty);
1323
Color
foreground = ((state & ButtonState.Inactive) == ButtonState.Inactive)
1337
Color
foreground,
1370
g2.Clear(
Color
.Transparent);
1400
public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle,
Color
foreColor,
Color
backColor)
1403
internal static void DrawHighContrastFocusRectangle(Graphics graphics, Rectangle rectangle,
Color
color)
1406
internal static void DrawBlackWhiteFocusRectangle(Graphics graphics, Rectangle rectangle,
Color
color)
1409
private static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle,
Color
color, bool highContrast, bool blackAndWhite = false)
1429
Color
foreColor,
1430
Color
backColor)
1439
g2.Clear(
Color
.Transparent);
1447
if (foreColor ==
Color
.Empty || backColor ==
Color
.Empty)
1456
Span<(
Color
OldColor,
Color
NewColor)> map =
1458
new(
Color
.Black, foreColor),
1459
new(
Color
.White, backColor)
1506
public static void DrawGrid(Graphics graphics, Rectangle area, Size pixelsBetweenDots,
Color
backColor)
1527
Color
foreColor = (s_gridInvert) ?
Color
.White :
Color
.Black;
1555
Color
replaceBlack)
1560
attributes.SetColorMatrix(RemapBlackAndWhitePreserveTransparentMatrix(replaceBlack,
Color
.White));
1576
internal static void DrawImageReplaceColor(Graphics g, Image image, Rectangle dest,
Color
oldColor,
Color
newColor)
1580
(
Color
OldColor,
Color
NewColor) map = new(oldColor, newColor);
1581
attributes.SetRemapTable(ColorAdjustType.Bitmap, new ReadOnlySpan<(
Color
OldColor,
Color
NewColor)>(ref map));
1589
public static void DrawImageDisabled(Graphics graphics, Image image, int x, int y,
Color
background)
1708
Color
foreColor,
1709
Color
backColor) => DrawMenuGlyph(
1720
=> DrawFrameControl(graphics, x, y, width, height, DFC_TYPE.DFC_MENU, (DFCS_STATE)glyph,
Color
.Empty,
Color
.Empty);
1730
Color
foreColor,
1731
Color
backColor) => DrawFrameControl(
1752
Color
.Empty,
1753
Color
.Empty);
1772
Color
.Empty,
1773
Color
.Empty);
1781
public static void DrawReversibleFrame(Rectangle rectangle,
Color
backColor, FrameStyle style)
1784
Color
graphicsColor;
1789
graphicsColor =
Color
.White;
1794
graphicsColor =
Color
.Black;
1820
public static unsafe void DrawReversibleLine(Point start, Point end,
Color
backColor)
1856
Color
.Empty,
1857
Color
.Empty);
1868
Color
backColor)
1883
public static void DrawSizeGrip(Graphics graphics,
Color
backColor, Rectangle bounds)
1889
public static void DrawSizeGrip(Graphics graphics,
Color
backColor, int x, int y, int width, int height)
1910
Color
backColor,
1944
Color
color,
1976
Color
color,
1993
Color
color,
2005
Color
paintcolor = LightLight(color);
2031
public static void FillReversibleRectangle(Rectangle rectangle,
Color
backColor)
2070
private static int GetColorRop(
Color
color, int darkROP, int lightROP)
2076
private static Brush GetActiveBrush(
Color
backColor)
2078
Color
brushColor = backColor.GetBrightness() <= .5 ? SystemColors.ControlLight : SystemColors.ControlDark;
2100
bitmap.SetPixel(x, y,
Color
.Transparent);
2125
private static Pen GetFocusPen(
Color
baseColor, bool odds, bool highContrast, bool blackAndWhite)
2144
Color
color1 =
Color
.Transparent;
2145
Color
color2;
2153
color1 =
Color
.White;
2154
color2 =
Color
.Black;
2161
color2 =
Color
.Black;
2168
else if (baseColor ==
Color
.Transparent)
2170
color1 =
Color
.White;
2206
private static Brush GetSelectedBrush(
Color
backColor)
2208
Color
brushColor = backColor.GetBrightness() <= .5 ? SystemColors.ControlLight : SystemColors.ControlDark;
2230
bitmap.SetPixel(x, y,
Color
.Transparent);
2261
public static
Color
Light(
Color
baseColor, float percOfLightLight)
2267
public static
Color
Light(
Color
baseColor) => new HLSColor(baseColor).Lighter(0.5f);
2272
public static
Color
LightLight(
Color
baseColor) => new HLSColor(baseColor).Lighter(1.0f);
2404
internal static void InvertForeColorIfNeeded(Bitmap bitmap,
Color
backgroundColor)
2412
var
pixel = bitmap.GetPixel(x, y);
2425
internal static Bitmap CreateBitmapWithInvertedForeColor(Bitmap bitmap,
Color
backgroundColor)
2432
Color
pixel = bitmap.GetPixel(x, y);
2445
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 (202)
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)
2278
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)
1910
images.MakeTransparent(
Color
.Magenta);
1914
TransparentColor =
Color
.Magenta,
1926
TransparentColor =
Color
.Magenta,
1944
TransparentColor =
Color
.Magenta,
2263
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
677
if (backProp is not null && backProp.PropertyType == typeof(
Color
) && !backProp.ShouldSerializeValue(Component))
1311
BackColor =
Color
.Empty;
1349
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\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (2)
608
imageTransProperty?.SetValue(newItem,
Color
.Magenta);
769
Color
textColor;
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 (18)
EnsureEditorsTests.cs (1)
50
[InlineData(typeof(
Color
), typeof(ColorEditor))]
System\Drawing\Design\ColorEditorTests.cs (2)
26
yield return new object[] {
Color
.Empty };
27
yield return new object[] {
Color
.Red };
System\Drawing\Design\ImageEditorTests.cs (6)
165
otherImage.SetPixel(0, 0,
Color
.Red);
166
otherImage.SetPixel(1, 0,
Color
.Red);
167
otherImage.SetPixel(2, 0,
Color
.Red);
168
otherImage.SetPixel(0, 1,
Color
.Red);
169
otherImage.SetPixel(1, 1,
Color
.Red);
170
otherImage.SetPixel(2, 1,
Color
.Red);
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (1)
327
bitmap.SetPixel(0, 0,
Color
.Red);
System\Windows\Forms\Design\DataGridViewCellStyleBuilderTests.cs (2)
19
builder.CellStyle = new DataGridViewCellStyle { BackColor =
Color
.Red };
23
result.BackColor.Should().Be(
Color
.Red);
System\Windows\Forms\Design\DesignerFrameTests.cs (2)
32
mockUIService.Setup(ui => ui.Styles["ArtboardBackground"]).Returns(
Color
.Red);
45
designerFrame.BackColor.Should().Be(
Color
.Red);
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (4)
51
Color
backColor = (
Color
)inheritedPropertyDescriptor.GetValue(control);
54
inheritedPropertyDescriptor.SetValue(control,
Color
.Purple);
55
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 (4330)
CheckedListBoxTests.cs (12)
407
yield return new object[] { null, Rectangle.Empty, 0, DrawItemState.Default,
Color
.Red,
Color
.Blue };
408
yield return new object[] { null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.None,
Color
.Red,
Color
.Blue };
409
yield return new object[] { null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Checked,
Color
.Red,
Color
.Blue };
410
yield return new object[] { new Font("Arial", 8.25f), new Rectangle(10, 20, 30, 40), 1, DrawItemState.Default,
Color
.Red,
Color
.Blue };
415
public void CheckedListBox_OnDrawItem_Invoke_Success(Font font, Rectangle rect, int index, DrawItemState state,
Color
foreColor,
Color
backColor)
430
public void CheckedListBox_OnDrawItem_InvokeWithHandle_Success(Font font, Rectangle rect, int index, DrawItemState state,
Color
foreColor,
Color
backColor)
LinkLabelTests.cs (6)
186
_linkLabel.VisitedLinkColor =
Color
.Red;
187
_linkLabel.VisitedLinkColor.Should().Be(
Color
.Red);
189
_linkLabel.VisitedLinkColor =
Color
.Blue;
190
_linkLabel.VisitedLinkColor.Should().Be(
Color
.Blue);
197
_linkLabel.VisitedLinkColor =
Color
.Red;
198
_linkLabel.VisitedLinkColor.Should().Be(
Color
.Red);
SerializableTypesTests.cs (13)
80
TransparentColor =
Color
.White
167
ForeColor =
Color
.White,
168
BackColor =
Color
.Black,
190
Assert.Equal(
Color
.Black, result.BackColor);
191
Assert.Equal(
Color
.White, result.ForeColor);
215
foreColor:
Color
.White,
216
backColor:
Color
.Black,
239
Assert.Equal(
Color
.White, result.ForeColor);
240
Assert.Equal(
Color
.Black, result.BackColor);
354
BackColor =
Color
.Yellow, // Colors and Font are serialized into the property bag.
355
ForeColor =
Color
.Green,
380
Assert.Equal(
Color
.Yellow, result.BackColor);
381
Assert.Equal(
Color
.Green, result.ForeColor);
System\Windows\Forms\AbstractButtonBaseTests.cs (3)
19
control.Invoking(y => y.FlatAppearance.BorderColor =
Color
.Transparent)
36
Color
expectedColor =
Color
.FromArgb(red, green, blue);
System\Windows\Forms\AmbientPropertiesTests.cs (4)
18
Assert.Equal(
Color
.Empty, property.BackColor);
21
Assert.Equal(
Color
.Empty, property.ForeColor);
26
public void BackColor_Set_GetReturnsExpected(
Color
value)
71
public void ForeColor_Set_GetReturnsExpected(
Color
value)
System\Windows\Forms\AxHostTests.cs (8)
292
public void AxHost_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
537
public void AxHost_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1610
original.SetPixel(1, 2,
Color
.FromArgb(unchecked((int)0xFF010203)));
1628
Assert.Equal(
Color
.FromArgb(unchecked((int)0xFF010203)), original.GetPixel(1, 2));
1670
original.SetPixel(1, 2,
Color
.FromArgb(unchecked((int)0xFF010203)));
1693
Assert.Equal(
Color
.FromArgb(unchecked((int)0xFF010203)), original.GetPixel(1, 2));
System\Windows\Forms\ButtonBaseTests.cs (26)
505
public void ButtonBase_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
522
public void ButtonBase_BackColor_SetWithUseVisualStyleBackColor_GetReturnsExpected(
Color
value,
Color
expected)
542
public void ButtonBase_BackColor_SetDesignMode_GetReturnsExpected(
Color
value,
Color
expected)
588
public void ButtonBase_BackColor_SetDesignModeWithUseVisualStyleBackColor_GetReturnsExpected(
Color
value,
Color
expected)
634
public void ButtonBase_BackColor_SetDesignModeWithInvalidDescriptor_GetReturnsExpected(
Color
value,
Color
expected)
696
yield return new object[] {
Color
.Red,
Color
.Red, 2 };
697
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 1 };
702
public void ButtonBase_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
743
control.BackColor =
Color
.Red;
744
Assert.Equal(
Color
.Red, control.BackColor);
748
control.BackColor =
Color
.Red;
749
Assert.Equal(
Color
.Red, control.BackColor);
753
control.BackColor =
Color
.Empty;
759
control.BackColor =
Color
.Red;
760
Assert.Equal(
Color
.Red, control.BackColor);
1034
Assert.Equal(
Color
.Empty, appearance.BorderColor);
1036
Assert.Equal(
Color
.Empty, appearance.CheckedBackColor);
1037
Assert.Equal(
Color
.Empty, appearance.MouseDownBackColor);
1038
Assert.Equal(
Color
.Empty, appearance.MouseOverBackColor);
System\Windows\Forms\ButtonRenderingTests.cs (1)
245
State.PenColor(
Color
.Black),
System\Windows\Forms\ClipboardTests.cs (4)
446
bitmap.SetPixel(1, 2,
Color
.FromArgb(0x01, 0x02, 0x03, 0x04));
451
result.GetPixel(1, 2).Should().Be(
Color
.FromArgb(0xFF, 0xD2, 0xD2, 0xD2));
535
Clipboard.SetData(format,
Color
.Black);
538
Clipboard.GetData(format).Should().Be(
Color
.Black);
System\Windows\Forms\ColorDialogTests.cs (19)
20
Assert.Equal(
Color
.Black, dialog.Color);
44
Assert.Equal(
Color
.Empty, dialog.Color);
109
yield return new object[] {
Color
.Empty,
Color
.Black };
110
yield return new object[] {
Color
.Red,
Color
.Red };
115
public void ColorDialog_Color_Set_GetReturnsExpected(
Color
value,
Color
expected)
130
public void ColorDialog_Color_SetWithCustomOldValue_GetReturnsExpected(
Color
value,
Color
expected)
134
Color =
Color
.Blue
152
dialog.Color =
Color
.Red;
153
Assert.Equal(
Color
.Red, dialog.Color);
157
Assert.Equal(
Color
.Black, dialog.Color);
168
dialog.Color =
Color
.Red;
169
Assert.Equal(
Color
.Red, dialog.Color);
173
Assert.Equal(
Color
.Black, dialog.Color);
329
Color =
Color
.Red,
341
Assert.Equal(
Color
.Black, dialog.Color);
System\Windows\Forms\ComboBoxTests.cs (54)
167
yield return new object[] {
Color
.Empty, SystemColors.Window };
168
yield return new object[] {
Color
.Red,
Color
.Red };
173
public void ComboBox_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
190
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
191
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
196
public void ComboBox_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
257
control.BackColor =
Color
.Red;
258
Assert.Equal(
Color
.Red, control.BackColor);
262
control.BackColor =
Color
.Red;
263
Assert.Equal(
Color
.Red, control.BackColor);
267
control.BackColor =
Color
.Empty;
273
control.BackColor =
Color
.Red;
274
Assert.Equal(
Color
.Red, control.BackColor);
285
control.BackColor =
Color
.Red;
286
Assert.Equal(
Color
.Red, control.BackColor);
301
control.BackColor =
Color
.Red;
302
Assert.Equal(
Color
.Red, control.BackColor);
1049
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1050
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1051
yield return new object[] {
Color
.White,
Color
.White };
1052
yield return new object[] {
Color
.Black,
Color
.Black };
1053
yield return new object[] {
Color
.Red,
Color
.Red };
1058
public void ComboBox_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1075
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1076
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1077
yield return new object[] {
Color
.White,
Color
.White, 1 };
1078
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1079
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1084
public void ComboBox_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1125
control.ForeColor =
Color
.Red;
1126
Assert.Equal(
Color
.Red, control.ForeColor);
1130
control.ForeColor =
Color
.Red;
1131
Assert.Equal(
Color
.Red, control.ForeColor);
1135
control.ForeColor =
Color
.Empty;
1141
control.ForeColor =
Color
.Red;
1142
Assert.Equal(
Color
.Red, control.ForeColor);
1153
control.ForeColor =
Color
.Red;
1154
Assert.Equal(
Color
.Red, control.ForeColor);
1169
control.ForeColor =
Color
.Red;
1170
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\Control.ActiveXImplTests.cs (3)
18
control.BackColor =
Color
.Bisque;
25
control.BackColor =
Color
.Honeydew;
30
Assert.Equal(
Color
.Bisque, control.BackColor);
System\Windows\Forms\ControlPaintTests.cs (1123)
15
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed),
Color
.Empty };
16
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
Color
.Empty };
17
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
Color
.Empty };
18
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed),
Color
.Red };
19
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
Color
.Red };
20
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
Color
.Red };
21
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed),
Color
.Transparent };
22
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
Color
.Transparent };
23
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
Color
.Transparent };
24
yield return new object[] { new Bitmap(11, 11, PixelFormat.Format1bppIndexed),
Color
.Red };
25
yield return new object[] { new Bitmap(11, 11, PixelFormat.Format32bppRgb),
Color
.Red };
26
yield return new object[] { new Bitmap(11, 11, PixelFormat.Format32bppArgb),
Color
.Red };
27
yield return new object[] { new Bitmap(16, 24, PixelFormat.Format1bppIndexed),
Color
.Red };
28
yield return new object[] { new Bitmap(16, 24, PixelFormat.Format32bppRgb),
Color
.Red };
29
yield return new object[] { new Bitmap(16, 24, PixelFormat.Format32bppArgb),
Color
.Red };
34
public void ControlPaint_CreateHBitmap16Bit_Invoke_ReturnsExpected(Bitmap bitmap,
Color
background)
57
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 50, 100, 150));
58
bitmap.SetPixel(1, 0,
Color
.FromArgb(1, 50, 100, 150));
59
bitmap.SetPixel(2, 0,
Color
.FromArgb(0, 50, 100, 150));
61
HBITMAP hBitmap = (HBITMAP)ControlPaint.CreateHBitmap16Bit(bitmap,
Color
.Red);
71
Assert.Equal(
Color
.FromArgb(255, 49, 99, 148), result.GetPixel(0, 0));
72
Assert.Equal(
Color
.FromArgb(255, 255, 0, 0), result.GetPixel(1, 0));
73
Assert.Equal(
Color
.FromArgb(255, 255, 0, 0), result.GetPixel(2, 0));
84
Assert.Throws<ArgumentNullException>(() => ControlPaint.CreateHBitmap16Bit(null,
Color
.Red));
128
mask.SetPixel(0, 0,
Color
.FromArgb(255, 255, 0, 0));
129
mask.SetPixel(1, 0,
Color
.FromArgb(255, 0, 255, 0));
130
mask.SetPixel(2, 0,
Color
.FromArgb(0, 0, 0, 255));
135
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 50, 100, 150));
136
bitmap.SetPixel(1, 0,
Color
.FromArgb(1, 50, 100, 150));
137
bitmap.SetPixel(2, 0,
Color
.FromArgb(0, 50, 100, 150));
149
Assert.Equal(
Color
.FromArgb(255, 0, 100, 150), result.GetPixel(0, 0));
150
Assert.Equal(
Color
.FromArgb(255, 210, 0, 211), result.GetPixel(1, 0));
151
Assert.Equal(
Color
.FromArgb(255, 0, 0, 0), result.GetPixel(2, 0));
168
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 50, 100, 150));
169
bitmap.SetPixel(1, 0,
Color
.FromArgb(1, 50, 100, 150));
170
bitmap.SetPixel(2, 0,
Color
.FromArgb(0, 50, 100, 150));
182
Assert.Equal(
Color
.FromArgb(255, 50, 100, 150), result.GetPixel(0, 0));
183
Assert.Equal(
Color
.FromArgb(255, 210, 210, 211), result.GetPixel(1, 0));
184
Assert.Equal(
Color
.FromArgb(255, 211, 211, 211), result.GetPixel(2, 0));
223
Assert.Equal(new
Color
[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 255, 255, 255) }, result.Palette.Entries);
236
bitmap.SetPixel(0, 0,
Color
.FromArgb(255, 50, 100, 150));
237
bitmap.SetPixel(1, 0,
Color
.FromArgb(1, 50, 100, 150));
238
bitmap.SetPixel(2, 0,
Color
.FromArgb(0, 50, 100, 150));
248
Assert.Equal(new
Color
[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 255, 255, 255) }, result.Palette.Entries);
250
Assert.Equal(
Color
.FromArgb(255, 0, 0, 0), result.GetPixel(0, 0));
251
Assert.Equal(
Color
.FromArgb(255, 0, 0, 0), result.GetPixel(1, 0));
252
Assert.Equal(
Color
.FromArgb(255, 255, 255, 255), result.GetPixel(2, 0));
268
yield return new object[] {
Color
.White,
Color
.FromArgb(255, 0, 0, 0) };
269
yield return new object[] {
Color
.Black,
Color
.FromArgb(255, 255, 255, 255) };
274
public void ControlPaint_CreateBitmapWithInvertedForeColor(
Color
imageColor,
Color
expected)
279
using Bitmap invertedBitmap = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap,
Color
.LightGray);
280
Color
newColor = invertedBitmap.GetPixel(0, 0);
287
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0),
Color
.FromArgb(255, 85, 0, 0) };
288
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0),
Color
.FromArgb(255, 0, 85, 0) };
289
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 0, 0, 85) };
290
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 85, 85, 0) };
291
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255),
Color
.FromArgb(255, 85, 0, 85) };
292
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255),
Color
.FromArgb(255, 0, 85, 85) };
293
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255),
Color
.FromArgb(255, 85, 85, 85) };
294
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0),
Color
.FromArgb(255, 0, 28, 0) };
295
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0),
Color
.FromArgb(255, 0, 9, 0) };
296
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0),
Color
.FromArgb(255, 0, 2, 0) };
297
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0),
Color
.FromArgb(255, 0, 0, 0) };
298
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 0, 0, 0) };
299
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200),
Color
.FromArgb(255, 41, 14, 67) };
300
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255),
Color
.FromArgb(255, 151, 0, 151) };
301
yield return new object[] { SystemColors.ControlDarkDark,
Color
.FromArgb(255, 35, 35, 35) };
302
yield return new object[] { SystemColors.ControlDark,
Color
.FromArgb(255, 53, 53, 53) };
303
yield return new object[] { SystemColors.Control,
Color
.FromArgb(255, 133, 133, 133) };
304
yield return new object[] { SystemColors.ControlLight,
Color
.FromArgb(255, 75, 75, 75) };
305
yield return new object[] { SystemColors.ControlLightLight,
Color
.FromArgb(255, 85, 85, 85) };
310
public void ControlPaint_Dark_InvokeColor_ReturnsExpected(
Color
baseColor,
Color
expected)
320
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -1.5f,
Color
.FromArgb(255, 255, 170, 170) };
321
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -1.5f,
Color
.FromArgb(255, 170, 255, 170) };
322
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -1.5f,
Color
.FromArgb(255, 170, 170, 255) };
323
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -1.5f,
Color
.FromArgb(255, 255, 255, 170) };
324
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -1.5f,
Color
.FromArgb(255, 255, 170, 255) };
325
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -1.5f,
Color
.FromArgb(255, 170, 255, 255) };
326
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -1.5f,
Color
.FromArgb(255, 169, 169, 169) };
327
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -1.5f,
Color
.FromArgb(255, 0, 138, 0) };
328
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -1.5f,
Color
.FromArgb(255, 0, 43, 0) };
329
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -1.5f,
Color
.FromArgb(255, 0, 11, 0) };
330
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -1.5f,
Color
.FromArgb(255, 0, 0, 0) };
331
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -1.5f,
Color
.FromArgb(255, 0, 0, 0) };
332
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -1.5f,
Color
.FromArgb(255, 201, 162, 236) };
333
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -1.5f,
Color
.FromArgb(255, 255, 243, 0) };
334
yield return new object[] { SystemColors.ControlDarkDark, -1.5f,
Color
.FromArgb(255, 175, 175, 175) };
335
yield return new object[] { SystemColors.ControlDark, -1.5f,
Color
.FromArgb(255, 9, 9, 9) };
336
yield return new object[] { SystemColors.Control, -1.5f,
Color
.FromArgb(255, 242, 242, 242) };
337
yield return new object[] { SystemColors.ControlLight, -1.5f,
Color
.FromArgb(255, 121, 121, 121) };
338
yield return new object[] { SystemColors.ControlLightLight, -1.5f,
Color
.FromArgb(255, 169, 169, 169) };
340
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -1f,
Color
.FromArgb(255, 255, 85, 85) };
341
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -1f,
Color
.FromArgb(255, 85, 255, 85) };
342
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -1f,
Color
.FromArgb(255, 85, 85, 255) };
343
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -1f,
Color
.FromArgb(255, 255, 255, 85) };
344
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -1f,
Color
.FromArgb(255, 255, 85, 255) };
345
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -1f,
Color
.FromArgb(255, 85, 255, 255) };
346
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -1f,
Color
.FromArgb(255, 84, 84, 84) };
347
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -1f,
Color
.FromArgb(255, 0, 111, 0) };
348
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -1f,
Color
.FromArgb(255, 0, 34, 0) };
349
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -1f,
Color
.FromArgb(255, 0, 9, 0) };
350
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -1f,
Color
.FromArgb(255, 0, 0, 0) };
351
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -1f,
Color
.FromArgb(255, 0, 0, 0) };
352
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -1f,
Color
.FromArgb(255, 163, 96, 223) };
353
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -1f,
Color
.FromArgb(255, 255, 93, 0) };
354
yield return new object[] { SystemColors.ControlDarkDark, -1f,
Color
.FromArgb(255, 140, 140, 140) };
355
yield return new object[] { SystemColors.ControlDark, -1f,
Color
.FromArgb(255, 212, 212, 212) };
356
yield return new object[] { SystemColors.Control, -1f,
Color
.FromArgb(255, 215, 215, 215) };
357
yield return new object[] { SystemColors.ControlLight, -1f,
Color
.FromArgb(255, 45, 45, 45) };
358
yield return new object[] { SystemColors.ControlLightLight, -1f,
Color
.FromArgb(255, 84, 84, 84) };
360
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -0.5f,
Color
.FromArgb(255, 255, 0, 0) };
361
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -0.5f,
Color
.FromArgb(255, 0, 255, 0) };
362
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -0.5f,
Color
.FromArgb(255, 0, 0, 255) };
363
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -0.5f,
Color
.FromArgb(255, 255, 255, 0) };
364
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -0.5f,
Color
.FromArgb(255, 255, 0, 255) };
365
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -0.5f,
Color
.FromArgb(255, 0, 255, 255) };
366
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -0.5f,
Color
.FromArgb(255, 255, 255, 255) };
367
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -0.5f,
Color
.FromArgb(255, 0, 83, 0) };
368
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -0.5f,
Color
.FromArgb(255, 0, 26, 0) };
369
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -0.5f,
Color
.FromArgb(255, 0, 6, 0) };
370
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -0.5f,
Color
.FromArgb(255, 0, 0, 0) };
371
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -0.5f,
Color
.FromArgb(255, 0, 0, 0) };
372
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -0.5f,
Color
.FromArgb(255, 123, 39, 199) };
373
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -0.5f,
Color
.FromArgb(255, 255, 198, 255) };
374
yield return new object[] { SystemColors.ControlDarkDark, -0.5f,
Color
.FromArgb(255, 105, 105, 105) };
375
yield return new object[] { SystemColors.ControlDark, -0.5f,
Color
.FromArgb(255, 159, 159, 159) };
376
yield return new object[] { SystemColors.Control, -0.5f,
Color
.FromArgb(255, 187, 187, 187) };
377
yield return new object[] { SystemColors.ControlLight, -0.5f,
Color
.FromArgb(255, 226, 226, 226) };
378
yield return new object[] { SystemColors.ControlLightLight, -0.5f,
Color
.FromArgb(255, 255, 255, 255) };
380
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -0.25f,
Color
.FromArgb(255, 213, 0, 0) };
381
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -0.25f,
Color
.FromArgb(255, 0, 213, 0) };
382
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -0.25f,
Color
.FromArgb(255, 0, 0, 213) };
383
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -0.25f,
Color
.FromArgb(255, 213, 213, 0) };
384
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -0.25f,
Color
.FromArgb(255, 213, 0, 213) };
385
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -0.25f,
Color
.FromArgb(255, 0, 213, 213) };
386
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -0.25f,
Color
.FromArgb(255, 212, 212, 212) };
387
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -0.25f,
Color
.FromArgb(255, 0, 68, 0) };
388
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -0.25f,
Color
.FromArgb(255, 0, 21, 0) };
389
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -0.25f,
Color
.FromArgb(255, 0, 4, 0) };
390
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -0.25f,
Color
.FromArgb(255, 0, 0, 0) };
391
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -0.25f,
Color
.FromArgb(255, 0, 0, 0) };
392
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -0.25f,
Color
.FromArgb(255, 102, 33, 165) };
393
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -0.25f,
Color
.FromArgb(255, 255, 121, 255) };
394
yield return new object[] { SystemColors.ControlDarkDark, -0.25f,
Color
.FromArgb(255, 87, 87, 87) };
395
yield return new object[] { SystemColors.ControlDark, -0.25f,
Color
.FromArgb(255, 132, 132, 132) };
396
yield return new object[] { SystemColors.Control, -0.25f,
Color
.FromArgb(255, 173, 173, 173) };
397
yield return new object[] { SystemColors.ControlLight, -0.25f,
Color
.FromArgb(255, 188, 188, 188) };
398
yield return new object[] { SystemColors.ControlLightLight, -0.25f,
Color
.FromArgb(255, 212, 212, 212) };
400
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0f,
Color
.FromArgb(255, 170, 0, 0) };
401
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0f,
Color
.FromArgb(255, 0, 170, 0) };
402
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0f,
Color
.FromArgb(255, 0, 0, 170) };
403
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0f,
Color
.FromArgb(255, 170, 170, 0) };
404
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0f,
Color
.FromArgb(255, 170, 0, 170) };
405
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0f,
Color
.FromArgb(255, 0, 170, 170) };
406
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0f,
Color
.FromArgb(255, 170, 170, 170) };
407
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0f,
Color
.FromArgb(255, 0, 55, 0) };
408
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0f,
Color
.FromArgb(255, 0, 17, 0) };
409
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0f,
Color
.FromArgb(255, 0, 4, 0) };
410
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0f,
Color
.FromArgb(255, 0, 0, 0) };
411
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0f,
Color
.FromArgb(255, 0, 0, 0) };
412
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0f,
Color
.FromArgb(255, 83, 27, 133) };
413
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0f,
Color
.FromArgb(255, 255, 47, 255) };
414
yield return new object[] { SystemColors.ControlDarkDark, 0f,
Color
.FromArgb(255, 70, 70, 70) };
415
yield return new object[] { SystemColors.ControlDark, 0f,
Color
.FromArgb(255, 106, 106, 106) };
417
yield return new object[] { SystemColors.ControlLight, 0f,
Color
.FromArgb(255, 150, 150, 150) };
418
yield return new object[] { SystemColors.ControlLightLight, 0f,
Color
.FromArgb(255, 170, 170, 170) };
420
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0.25f,
Color
.FromArgb(255, 128, 0, 0) };
421
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0.25f,
Color
.FromArgb(255, 0, 128, 0) };
422
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0.25f,
Color
.FromArgb(255, 0, 0, 128) };
423
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0.25f,
Color
.FromArgb(255, 128, 128, 0) };
424
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0.25f,
Color
.FromArgb(255, 128, 0, 128) };
425
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0.25f,
Color
.FromArgb(255, 0, 128, 128) };
426
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0.25f,
Color
.FromArgb(255, 127, 127, 127) };
427
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0.25f,
Color
.FromArgb(255, 0, 43, 0) };
428
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0.25f,
Color
.FromArgb(255, 0, 13, 0) };
429
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0.25f,
Color
.FromArgb(255, 0, 4, 0) };
430
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0.25f,
Color
.FromArgb(255, 0, 0, 0) };
431
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0.25f,
Color
.FromArgb(255, 0, 0, 0) };
432
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0.25f,
Color
.FromArgb(255, 63, 20, 101) };
433
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0.25f,
Color
.FromArgb(255, 227, 0, 227) };
434
yield return new object[] { SystemColors.ControlDarkDark, 0.25f,
Color
.FromArgb(255, 53, 53, 53) };
435
yield return new object[] { SystemColors.ControlDark, 0.25f,
Color
.FromArgb(255, 79, 79, 79) };
436
yield return new object[] { SystemColors.Control, 0.25f,
Color
.FromArgb(255, 147, 147, 147) };
437
yield return new object[] { SystemColors.ControlLight, 0.25f,
Color
.FromArgb(255, 113, 113, 113) };
438
yield return new object[] { SystemColors.ControlLightLight, 0.25f,
Color
.FromArgb(255, 127, 127, 127) };
440
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0.5f,
Color
.FromArgb(255, 85, 0, 0) };
441
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0.5f,
Color
.FromArgb(255, 0, 85, 0) };
442
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0.5f,
Color
.FromArgb(255, 0, 0, 85) };
443
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0.5f,
Color
.FromArgb(255, 85, 85, 0) };
444
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0.5f,
Color
.FromArgb(255, 85, 0, 85) };
445
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0.5f,
Color
.FromArgb(255, 0, 85, 85) };
446
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0.5f,
Color
.FromArgb(255, 85, 85, 85) };
447
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0.5f,
Color
.FromArgb(255, 0, 28, 0) };
448
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0.5f,
Color
.FromArgb(255, 0, 9, 0) };
449
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0.5f,
Color
.FromArgb(255, 0, 2, 0) };
450
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0.5f,
Color
.FromArgb(255, 0, 0, 0) };
451
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0.5f,
Color
.FromArgb(255, 0, 0, 0) };
452
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0.5f,
Color
.FromArgb(255, 41, 14, 67) };
453
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0.5f,
Color
.FromArgb(255, 151, 0, 151) };
454
yield return new object[] { SystemColors.ControlDarkDark, 0.5f,
Color
.FromArgb(255, 35, 35, 35) };
455
yield return new object[] { SystemColors.ControlDark, 0.5f,
Color
.FromArgb(255, 53, 53, 53) };
456
yield return new object[] { SystemColors.Control, 0.5f,
Color
.FromArgb(255, 133, 133, 133) };
457
yield return new object[] { SystemColors.ControlLight, 0.5f,
Color
.FromArgb(255, 75, 75, 75) };
458
yield return new object[] { SystemColors.ControlLightLight, 0.5f,
Color
.FromArgb(255, 85, 85, 85) };
460
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
461
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
462
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
463
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
464
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
465
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
466
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
467
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
468
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
469
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
470
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
471
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 1f,
Color
.FromArgb(255, 0, 0, 0) };
472
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 1f,
Color
.FromArgb(255, 0, 0, 0) };
473
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 1f,
Color
.FromArgb(255, 0, 0, 0) };
474
yield return new object[] { SystemColors.ControlDarkDark, 1f,
Color
.FromArgb(255, 0, 0, 0) };
475
yield return new object[] { SystemColors.ControlDark, 1f,
Color
.FromArgb(255, 0, 0, 0) };
477
yield return new object[] { SystemColors.ControlLight, 1f,
Color
.FromArgb(255, 0, 0, 0) };
478
yield return new object[] { SystemColors.ControlLightLight, 1f,
Color
.FromArgb(255, 0, 0, 0) };
480
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 1.5f,
Color
.FromArgb(255, 173, 0, 0) };
481
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 1.5f,
Color
.FromArgb(255, 0, 173, 0) };
482
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 1.5f,
Color
.FromArgb(255, 0, 0, 173) };
483
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 1.5f,
Color
.FromArgb(255, 174, 173, 0) };
484
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 1.5f,
Color
.FromArgb(255, 173, 0, 174) };
485
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 1.5f,
Color
.FromArgb(255, 0, 174, 173) };
486
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 1.5f,
Color
.FromArgb(255, 171, 171, 171) };
487
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 1.5f,
Color
.FromArgb(255, 0, 230, 0) };
488
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 1.5f,
Color
.FromArgb(255, 0, 250, 0) };
489
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 1.5f,
Color
.FromArgb(255, 0, 0, 0) };
490
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 1.5f,
Color
.FromArgb(255, 0, 0, 0) };
491
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 1.5f,
Color
.FromArgb(255, 0, 0, 0) };
492
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 1.5f,
Color
.FromArgb(255, 218, 243, 192) };
493
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 1.5f,
Color
.FromArgb(255, 107, 0, 108) };
494
yield return new object[] { SystemColors.ControlDarkDark, 1.5f,
Color
.FromArgb(255, 221, 221, 221) };
495
yield return new object[] { SystemColors.ControlDark, 1.5f,
Color
.FromArgb(255, 203, 203, 203) };
496
yield return new object[] { SystemColors.Control, 1.5f,
Color
.FromArgb(255, 78, 78, 78) };
497
yield return new object[] { SystemColors.ControlLight, 1.5f,
Color
.FromArgb(255, 181, 181, 181) };
502
public void ControlPaint_Dark_InvokeColorFloat_ReturnsExpected(
Color
baseColor, float percOfDarkDark,
Color
expected)
512
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0),
Color
.FromArgb(255, 0, 0, 0) };
513
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0),
Color
.FromArgb(255, 0, 0, 0) };
514
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 0, 0, 0) };
515
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 0, 0, 0) };
516
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255),
Color
.FromArgb(255, 0, 0, 0) };
517
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255),
Color
.FromArgb(255, 0, 0, 0) };
518
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255),
Color
.FromArgb(255, 0, 0, 0) };
519
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0),
Color
.FromArgb(255, 0, 0, 0) };
520
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0),
Color
.FromArgb(255, 0, 0, 0) };
521
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0),
Color
.FromArgb(255, 0, 0, 0) };
522
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0),
Color
.FromArgb(255, 0, 0, 0) };
523
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 0, 0, 0) };
524
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200),
Color
.FromArgb(255, 0, 0, 0) };
525
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255),
Color
.FromArgb(255, 0, 0, 0) };
526
yield return new object[] { SystemColors.ControlDarkDark,
Color
.FromArgb(255, 0, 0, 0) };
527
yield return new object[] { SystemColors.ControlDark,
Color
.FromArgb(255, 0, 0, 0) };
529
yield return new object[] { SystemColors.ControlLight,
Color
.FromArgb(255, 0, 0, 0) };
530
yield return new object[] { SystemColors.ControlLightLight,
Color
.FromArgb(255, 0, 0, 0) };
535
public void ControlPaint_DarkDark_InvokeColorFloat_ReturnsExpected(
Color
baseColor,
Color
expected)
544
yield return new object[] { Rectangle.Empty,
Color
.Empty, style };
545
yield return new object[] { new Rectangle(1, 2, -3, -4),
Color
.Empty, style };
546
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, style };
550
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Black, style };
551
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.White, style };
552
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Transparent, style };
553
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Empty, style };
554
yield return new object[] { new Rectangle(1, 2, 4, 3),
Color
.Red, style };
555
yield return new object[] { new Rectangle(1, 2, 3, 3),
Color
.Red, style };
561
public void ControlPaint_DrawBorder_GraphicsRectangleColorButtonBorderStyle_Success(Rectangle bounds,
Color
color, ButtonBorderStyle style)
578
ControlPaint.DrawBorder(graphics, new Rectangle(1, 2, 3, 4),
Color
.Red, style);
581
ControlPaint.DrawBorder(graphics, new Rectangle(1, 2, 3, 4),
Color
.Red, 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 };
589
yield return new object[] { Rectangle.Empty,
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, 1, style,
Color
.Green, 2, 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, 2, style,
Color
.Blue, 3, 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, 4, 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, 4, style };
595
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 };
596
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 };
597
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 };
598
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 };
599
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 };
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, 4, 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, 4, style };
603
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 };
604
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 };
606
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 };
607
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 };
609
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 };
617
Color
leftColor, int leftWidth, ButtonBorderStyle leftStyle,
618
Color
topColor, int topWidth, ButtonBorderStyle topStyle,
619
Color
rightColor, int rightWidth, ButtonBorderStyle rightStyle,
620
Color
bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle)
634
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 };
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, 4, 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, 4, style };
637
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 };
638
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 };
639
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 };
640
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 };
641
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 };
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, 4, 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, 4, style };
645
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 };
646
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 };
648
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 };
649
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 };
651
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 };
659
Color
leftColor, int leftWidth, ButtonBorderStyle leftStyle,
660
Color
topColor, int topWidth, ButtonBorderStyle topStyle,
661
Color
rightColor, int rightWidth, ButtonBorderStyle rightStyle,
662
Color
bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle)
677
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder(null, new Rectangle(1, 2, 3, 4),
Color
.Red, style));
685
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));
1189
yield return new object[] { Rectangle.Empty,
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(0, 0, 3, 4),
Color
.Red,
Color
.Blue };
1192
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Blue };
1193
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Black,
Color
.Blue };
1194
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.White,
Color
.Blue };
1195
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Empty,
Color
.Blue };
1196
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Transparent,
Color
.Blue };
1197
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Black };
1198
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.White };
1199
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Empty };
1200
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Transparent };
1201
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Red };
1202
yield return new object[] { new Rectangle(1, 2, 4, 3),
Color
.Red,
Color
.Blue };
1203
yield return new object[] { new Rectangle(1, 2, 3, 3),
Color
.Red,
Color
.Blue };
1208
public void ControlPaint_DrawFocusRectangle_Invoke_Success(Rectangle rectangle,
Color
foreColor,
Color
backColor)
1222
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawFocusRectangle(null, new Rectangle(1, 2, 3, 4),
Color
.Red,
Color
.Blue));
1265
yield return new object[] { Rectangle.Empty, 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(0, 0, 3, 4), new Size(1, 1),
Color
.Red };
1268
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Red };
1269
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Black };
1270
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.White };
1271
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Empty };
1272
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Transparent };
1273
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(10, 20),
Color
.Red };
1274
yield return new object[] { new Rectangle(1, 2, 4, 3), new Size(10, 20),
Color
.Red };
1275
yield return new object[] { new Rectangle(1, 2, 3, 3), new Size(10, 20),
Color
.Red };
1280
public void ControlPaint_DrawGrid_Invoke_Success(Rectangle area, Size pixelsBetweenDots,
Color
backColor)
1293
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawGrid(null, new Rectangle(1, 2, 3, 4), new Size(1, 1),
Color
.Red));
1305
Assert.Throws<ArgumentOutOfRangeException>("pixelsBetweenDots", () => ControlPaint.DrawGrid(graphics, new Rectangle(0, 0, width, height), new Size(width, height),
Color
.Red));
1310
yield return new object[] { new Bitmap(10, 10), -10, -20,
Color
.Red };
1311
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.Red };
1312
yield return new object[] { new Bitmap(10, 10), 1, 2,
Color
.Red };
1313
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.Black };
1314
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.White };
1315
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.Transparent };
1316
yield return new object[] { new Bitmap(10, 10), 0, 0,
Color
.Empty };
1318
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), -10, -20,
Color
.Red };
1319
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.Red };
1320
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 1, 2,
Color
.Red };
1321
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.Black };
1322
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.White };
1323
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.Transparent };
1324
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0,
Color
.Empty };
1329
public void ControlPaint_DrawImageDisabled_Invoke_Success(Image image, int x, int y,
Color
background)
1343
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawImageDisabled(null, image, 0, 0,
Color
.Red));
1351
Assert.Throws<NullReferenceException>(() => ControlPaint.DrawImageDisabled(graphics, null, 0, 0,
Color
.Red));
1414
yield return new object[] { new Rectangle(0, 0, 3, 4), glyph,
Color
.Red,
Color
.Blue };
1415
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Blue };
1416
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Black,
Color
.Blue };
1417
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.White,
Color
.Blue };
1418
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Empty,
Color
.Blue };
1419
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Transparent,
Color
.Blue };
1420
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Black };
1421
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.White };
1422
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Empty };
1423
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Transparent };
1424
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph,
Color
.Red,
Color
.Red };
1425
yield return new object[] { new Rectangle(1, 2, 4, 3), glyph,
Color
.Red,
Color
.Red };
1426
yield return new object[] { new Rectangle(1, 2, 3, 3), glyph,
Color
.Red,
Color
.Red };
1432
public void ControlPaint_DrawMenuGlyph_InvokeGraphicsRectangleMenuGlyphColorColor_Success(Rectangle rectangle, MenuGlyph glyph,
Color
foreColor,
Color
backColor)
1456
public void ControlPaint_DrawMenuGlyph_InvokeGraphicsIntIntIntIntMenuGlyphColorColor_Success(Rectangle rectangle, MenuGlyph glyph,
Color
foreColor,
Color
backColor)
1682
yield return new object[] { Rectangle.Empty,
Color
.Empty, style };
1683
yield return new object[] { new Rectangle(1, 2, -3, -4),
Color
.Empty, style };
1684
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red, style };
1688
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Black, style };
1689
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.White, style };
1690
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Transparent, style };
1691
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Empty, style };
1692
yield return new object[] { new Rectangle(1, 2, 4, 3),
Color
.Red, style };
1693
yield return new object[] { new Rectangle(1, 2, 3, 3),
Color
.Red, style };
1699
public void ControlPaint_DrawReversibleFrame_Invoke_Success(Rectangle rectangle,
Color
backColor, FrameStyle style)
1709
yield return new object[] { Point.Empty, Point.Empty,
Color
.Red };
1710
yield return new object[] { new Point(1, 2), new Point(1, 2),
Color
.Red };
1711
yield return new object[] { new Point(2, 3), new Point(1, 2),
Color
.Red };
1712
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Empty };
1713
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Red };
1717
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Black };
1718
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.White };
1719
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Transparent };
1720
yield return new object[] { new Point(1, 2), new Point(2, 3),
Color
.Empty };
1725
public void ControlPaint_DrawReversibleLine_Invoke_Success(Point start, Point end,
Color
backColor)
1820
yield return new object[] { active, Rectangle.Empty, Rectangle.Empty,
Color
.Red };
1821
yield return new object[] { active, new Rectangle(1, 2, -3, -4), new Rectangle(1, 2, -3, -4),
Color
.Red };
1822
yield return new object[] { active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4),
Color
.Red };
1823
yield return new object[] { active, new Rectangle(1, 2, 3, 4), new Rectangle(0, 1, 4, 5),
Color
.Red };
1824
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.Red };
1825
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.Black };
1826
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.White };
1827
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.Transparent };
1828
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4),
Color
.Empty };
1834
public void ControlPaint_DrawSelectionFrame_Invoke_Success(bool active, Rectangle outsideRect, Rectangle insideRect,
Color
backColor)
1849
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSelectionFrame(null, active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4),
Color
.Red));
1854
yield return new object[] {
Color
.Red, Rectangle.Empty };
1855
yield return new object[] {
Color
.Red, new Rectangle(1, 2, -3, -4) };
1856
yield return new object[] {
Color
.Red, new Rectangle(0, 0, 3, 4) };
1857
yield return new object[] {
Color
.Red, new Rectangle(1, 2, 3, 4) };
1858
yield return new object[] {
Color
.Black, new Rectangle(1, 2, 3, 4) };
1859
yield return new object[] {
Color
.White, new Rectangle(1, 2, 3, 4) };
1860
yield return new object[] {
Color
.Empty, new Rectangle(1, 2, 3, 4) };
1861
yield return new object[] {
Color
.Transparent, new Rectangle(1, 2, 3, 4) };
1862
yield return new object[] {
Color
.Red, new Rectangle(1, 2, 3, 4) };
1863
yield return new object[] {
Color
.Red, new Rectangle(1, 2, 3, 4) };
1864
yield return new object[] {
Color
.Red, new Rectangle(1, 2, 4, 3) };
1869
public void ControlPaint_DrawSizeGrip_InvokeGraphicsColorRectangle_Success(
Color
backColor, Rectangle rectangle)
1881
public void ControlPaint_DrawSizeGrip_InvokeGraphicsColorIntIntIntInt_Success(
Color
backColor, Rectangle rectangle)
1894
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null,
Color
.Red, new Rectangle(1, 2, 3, 4)));
1895
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null,
Color
.Red, 1, 2, 3, 4));
1902
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new RectangleF(1, 2, 3, 4), null };
1903
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, RectangleF.Empty, new StringFormat() };
1904
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new RectangleF(1, 2, -3, -4), new StringFormat() };
1905
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new RectangleF(1, 2, 3, 4), new StringFormat() };
1906
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Black, new RectangleF(1, 2, 3, 4), new StringFormat() };
1907
yield return new object[] { s, SystemFonts.MenuFont,
Color
.White, new RectangleF(1, 2, 3, 4), new StringFormat() };
1908
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Transparent, new RectangleF(1, 2, 3, 4), new StringFormat() };
1909
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Empty, new RectangleF(1, 2, 3, 4), new StringFormat() };
1916
string s, Font font,
Color
color,
1933
ControlPaint.DrawStringDisabled(graphics, s, null,
Color
.Red, new RectangleF(1, 2, 3, 4), null);
1936
ControlPaint.DrawStringDisabled(graphics, s, null,
Color
.Red, new RectangleF(1, 2, 3, 4), null);
1943
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont,
Color
.Red, new RectangleF(1, 2, 3, 4), new StringFormat()));
1950
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default };
1951
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, Rectangle.Empty, TextFormatFlags.VerticalCenter };
1952
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new Rectangle(1, 2, -3, -4), TextFormatFlags.VerticalCenter };
1953
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1954
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Black, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1955
yield return new object[] { s, SystemFonts.MenuFont,
Color
.White, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1956
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Transparent, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1957
yield return new object[] { s, SystemFonts.MenuFont,
Color
.Empty, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1964
string s, Font font,
Color
color,
1979
Assert.Throws<ArgumentNullException>("dc", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont,
Color
.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default));
2012
yield return new object[] { Rectangle.Empty,
Color
.Red };
2013
yield return new object[] { new Rectangle(1, 2, -3, -4),
Color
.Red };
2014
yield return new object[] { new Rectangle(0, 0, 3, 4),
Color
.Red };
2015
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Red };
2016
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Black };
2017
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.White };
2018
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Empty };
2019
yield return new object[] { new Rectangle(1, 2, 3, 4),
Color
.Transparent };
2020
yield return new object[] { new Rectangle(1, 2, 4, 3),
Color
.Red };
2021
yield return new object[] { new Rectangle(1, 2, 3, 3),
Color
.Red };
2026
public void ControlPaint_FillReversibleRectangle_Invoke_Success(Rectangle rectangle,
Color
backColor)
2036
yield return new object[] {
Color
.White, false };
2037
yield return new object[] {
Color
.Black, true };
2042
public void ControlPaint_IsDark(
Color
color, bool expected)
2051
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0),
Color
.FromArgb(255, 255, 64, 64) };
2052
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0),
Color
.FromArgb(255, 64, 255, 64) };
2053
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 64, 64, 255) };
2054
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 255, 255, 64) };
2055
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255),
Color
.FromArgb(255, 255, 64, 255) };
2056
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255),
Color
.FromArgb(255, 64, 255, 255) };
2057
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255),
Color
.FromArgb(255, 255, 255, 255) };
2058
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0),
Color
.FromArgb(255, 0, 191, 0) };
2059
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0),
Color
.FromArgb(255, 0, 149, 0) };
2060
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0),
Color
.FromArgb(255, 0, 134, 0) };
2061
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0),
Color
.FromArgb(255, 0, 130, 0) };
2062
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 63, 63, 63) };
2063
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200),
Color
.FromArgb(255, 157, 87, 221) };
2064
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255),
Color
.FromArgb(255, 255, 213, 255) };
2065
yield return new object[] { SystemColors.ControlDarkDark,
Color
.FromArgb(255, 142, 142, 142) };
2066
yield return new object[] { SystemColors.ControlDark,
Color
.FromArgb(255, 183, 183, 183) };
2067
yield return new object[] { SystemColors.Control,
Color
.FromArgb(255, 241, 241, 241) };
2068
yield return new object[] { SystemColors.ControlLight,
Color
.FromArgb(255, 233, 233, 233) };
2069
yield return new object[] { SystemColors.ControlLightLight,
Color
.FromArgb(255, 255, 255, 255) };
2074
public void ControlPaint_Light_InvokeColor_ReturnsExpected(
Color
baseColor,
Color
expected)
2084
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -1.5f,
Color
.FromArgb(255, 64, 0, 0) };
2085
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -1.5f,
Color
.FromArgb(255, 0, 64, 0) };
2086
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -1.5f,
Color
.FromArgb(255, 0, 0, 64) };
2087
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -1.5f,
Color
.FromArgb(255, 64, 64, 0) };
2088
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -1.5f,
Color
.FromArgb(255, 64, 0, 64) };
2089
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -1.5f,
Color
.FromArgb(255, 0, 64, 64) };
2090
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -1.5f,
Color
.FromArgb(255, 255, 255, 255) };
2091
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -1.5f,
Color
.FromArgb(255, 0, 24, 0) };
2092
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -1.5f,
Color
.FromArgb(255, 0, 178, 0) };
2093
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -1.5f,
Color
.FromArgb(255, 0, 146, 0) };
2094
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -1.5f,
Color
.FromArgb(255, 0, 134, 0) };
2095
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -1.5f,
Color
.FromArgb(255, 65, 65, 65) };
2096
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -1.5f,
Color
.FromArgb(255, 19, 6, 30) };
2097
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -1.5f,
Color
.FromArgb(255, 255, 159, 255) };
2098
yield return new object[] { SystemColors.ControlDarkDark, -1.5f,
Color
.FromArgb(255, 249, 249, 249) };
2099
yield return new object[] { SystemColors.ControlDark, -1.5f,
Color
.FromArgb(255, 89, 89, 89) };
2100
yield return new object[] { SystemColors.Control, -1.5f,
Color
.FromArgb(255, 185, 185, 185) };
2101
yield return new object[] { SystemColors.ControlLight, -1.5f,
Color
.FromArgb(255, 207, 207, 207) };
2102
yield return new object[] { SystemColors.ControlLightLight, -1.5f,
Color
.FromArgb(255, 255, 255, 255) };
2104
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -1f,
Color
.FromArgb(255, 128, 0, 0) };
2105
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -1f,
Color
.FromArgb(255, 0, 128, 0) };
2106
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -1f,
Color
.FromArgb(255, 0, 0, 128) };
2107
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -1f,
Color
.FromArgb(255, 128, 128, 0) };
2108
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -1f,
Color
.FromArgb(255, 128, 0, 128) };
2109
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -1f,
Color
.FromArgb(255, 0, 128, 128) };
2110
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -1f,
Color
.FromArgb(255, 255, 255, 255) };
2111
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -1f,
Color
.FromArgb(255, 0, 131, 0) };
2112
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -1f,
Color
.FromArgb(255, 0, 43, 0) };
2113
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -1f,
Color
.FromArgb(255, 0, 16, 0) };
2114
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -1f,
Color
.FromArgb(255, 0, 5, 0) };
2115
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -1f,
Color
.FromArgb(255, 129, 129, 129) };
2116
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -1f,
Color
.FromArgb(255, 54, 17, 87) };
2117
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -1f,
Color
.FromArgb(255, 255, 172, 255) };
2118
yield return new object[] { SystemColors.ControlDarkDark, -1f,
Color
.FromArgb(255, 29, 29, 29) };
2119
yield return new object[] { SystemColors.ControlDark, -1f,
Color
.FromArgb(255, 112, 112, 112) };
2120
yield return new object[] { SystemColors.Control, -1f,
Color
.FromArgb(255, 199, 199, 199) };
2121
yield return new object[] { SystemColors.ControlLight, -1f,
Color
.FromArgb(255, 213, 213, 213) };
2122
yield return new object[] { SystemColors.ControlLightLight, -1f,
Color
.FromArgb(255, 255, 255, 255) };
2124
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -0.5f,
Color
.FromArgb(255, 191, 0, 0) };
2125
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -0.5f,
Color
.FromArgb(255, 0, 191, 0) };
2126
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -0.5f,
Color
.FromArgb(255, 0, 0, 191) };
2127
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -0.5f,
Color
.FromArgb(255, 191, 191, 0) };
2128
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -0.5f,
Color
.FromArgb(255, 191, 0, 191) };
2129
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -0.5f,
Color
.FromArgb(255, 0, 191, 191) };
2130
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -0.5f,
Color
.FromArgb(255, 255, 255, 255) };
2131
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -0.5f,
Color
.FromArgb(255, 0, 237, 0) };
2132
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -0.5f,
Color
.FromArgb(255, 0, 165, 0) };
2133
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -0.5f,
Color
.FromArgb(255, 0, 141, 0) };
2134
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -0.5f,
Color
.FromArgb(255, 0, 133, 0) };
2135
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -0.5f,
Color
.FromArgb(255, 193, 193, 193) };
2136
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -0.5f,
Color
.FromArgb(255, 89, 29, 143) };
2137
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -0.5f,
Color
.FromArgb(255, 255, 187, 255) };
2138
yield return new object[] { SystemColors.ControlDarkDark, -0.5f,
Color
.FromArgb(255, 68, 68, 68) };
2139
yield return new object[] { SystemColors.ControlDark, -0.5f,
Color
.FromArgb(255, 137, 137, 137) };
2140
yield return new object[] { SystemColors.Control, -0.5f,
Color
.FromArgb(255, 213, 213, 213) };
2141
yield return new object[] { SystemColors.ControlLight, -0.5f,
Color
.FromArgb(255, 221, 221, 221) };
2142
yield return new object[] { SystemColors.ControlLightLight, -0.5f,
Color
.FromArgb(255, 255, 255, 255) };
2144
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), -0.25f,
Color
.FromArgb(255, 223, 0, 0) };
2145
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), -0.25f,
Color
.FromArgb(255, 0, 223, 0) };
2146
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), -0.25f,
Color
.FromArgb(255, 0, 0, 223) };
2147
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), -0.25f,
Color
.FromArgb(255, 223, 223, 0) };
2148
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), -0.25f,
Color
.FromArgb(255, 223, 0, 223) };
2149
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), -0.25f,
Color
.FromArgb(255, 0, 223, 223) };
2150
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), -0.25f,
Color
.FromArgb(255, 255, 255, 255) };
2151
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), -0.25f,
Color
.FromArgb(255, 0, 32, 0) };
2152
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), -0.25f,
Color
.FromArgb(255, 0, 226, 0) };
2153
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), -0.25f,
Color
.FromArgb(255, 0, 205, 0) };
2154
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), -0.25f,
Color
.FromArgb(255, 0, 196, 0) };
2155
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), -0.25f,
Color
.FromArgb(255, 225, 225, 225) };
2156
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), -0.25f,
Color
.FromArgb(255, 106, 34, 172) };
2157
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), -0.25f,
Color
.FromArgb(255, 255, 193, 255) };
2158
yield return new object[] { SystemColors.ControlDarkDark, -0.25f,
Color
.FromArgb(255, 87, 87, 87) };
2159
yield return new object[] { SystemColors.ControlDark, -0.25f,
Color
.FromArgb(255, 148, 148, 148) };
2160
yield return new object[] { SystemColors.Control, -0.25f,
Color
.FromArgb(255, 220, 220, 220) };
2161
yield return new object[] { SystemColors.ControlLight, -0.25f,
Color
.FromArgb(255, 224, 224, 224) };
2162
yield return new object[] { SystemColors.ControlLightLight, -0.25f,
Color
.FromArgb(255, 255, 255, 255) };
2164
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0f,
Color
.FromArgb(255, 255, 0, 0) };
2165
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0f,
Color
.FromArgb(255, 0, 255, 0) };
2166
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0f,
Color
.FromArgb(255, 0, 0, 255) };
2167
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0f,
Color
.FromArgb(255, 255, 255, 0) };
2168
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0f,
Color
.FromArgb(255, 255, 0, 255) };
2169
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0f,
Color
.FromArgb(255, 0, 255, 255) };
2170
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0f,
Color
.FromArgb(255, 255, 255, 255) };
2171
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0f,
Color
.FromArgb(255, 0, 85, 0) };
2172
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0f,
Color
.FromArgb(255, 0, 28, 0) };
2173
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0f,
Color
.FromArgb(255, 0, 9, 0) };
2174
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0f,
Color
.FromArgb(255, 0, 2, 0) };
2175
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0f,
Color
.FromArgb(255, 0, 0, 0) };
2176
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0f,
Color
.FromArgb(255, 124, 40, 200) };
2177
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0f,
Color
.FromArgb(255, 255, 200, 255) };
2178
yield return new object[] { SystemColors.ControlDarkDark, 0f,
Color
.FromArgb(255, 105, 105, 105) };
2179
yield return new object[] { SystemColors.ControlDark, 0f,
Color
.FromArgb(255, 160, 160, 160) };
2181
yield return new object[] { SystemColors.ControlLight, 0f,
Color
.FromArgb(255, 227, 227, 227) };
2182
yield return new object[] { SystemColors.ControlLightLight, 0f,
Color
.FromArgb(255, 255, 255, 255) };
2184
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0.25f,
Color
.FromArgb(255, 255, 32, 32) };
2185
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0.25f,
Color
.FromArgb(255, 32, 255, 32) };
2186
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0.25f,
Color
.FromArgb(255, 32, 32, 255) };
2187
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0.25f,
Color
.FromArgb(255, 255, 255, 32) };
2188
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0.25f,
Color
.FromArgb(255, 255, 32, 255) };
2189
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0.25f,
Color
.FromArgb(255, 32, 255, 255) };
2190
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0.25f,
Color
.FromArgb(255, 255, 255, 255) };
2191
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0.25f,
Color
.FromArgb(255, 0, 138, 0) };
2192
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0.25f,
Color
.FromArgb(255, 0, 87, 0) };
2193
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0.25f,
Color
.FromArgb(255, 0, 70, 0) };
2194
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0.25f,
Color
.FromArgb(255, 0, 66, 0) };
2195
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0.25f,
Color
.FromArgb(255, 31, 31, 31) };
2196
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0.25f,
Color
.FromArgb(255, 141, 58, 216) };
2197
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0.25f,
Color
.FromArgb(255, 255, 206, 255) };
2198
yield return new object[] { SystemColors.ControlDarkDark, 0.25f,
Color
.FromArgb(255, 123, 123, 123) };
2199
yield return new object[] { SystemColors.ControlDark, 0.25f,
Color
.FromArgb(255, 172, 172, 172) };
2200
yield return new object[] { SystemColors.Control, 0.25f,
Color
.FromArgb(255, 234, 234, 234) };
2201
yield return new object[] { SystemColors.ControlLight, 0.25f,
Color
.FromArgb(255, 230, 230, 230) };
2202
yield return new object[] { SystemColors.ControlLightLight, 0.25f,
Color
.FromArgb(255, 255, 255, 255) };
2204
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 0.5f,
Color
.FromArgb(255, 255, 64, 64) };
2205
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 0.5f,
Color
.FromArgb(255, 64, 255, 64) };
2206
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 0.5f,
Color
.FromArgb(255, 64, 64, 255) };
2207
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 0.5f,
Color
.FromArgb(255, 255, 255, 64) };
2208
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 0.5f,
Color
.FromArgb(255, 255, 64, 255) };
2209
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 0.5f,
Color
.FromArgb(255, 64, 255, 255) };
2210
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 0.5f,
Color
.FromArgb(255, 255, 255, 255) };
2211
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 0.5f,
Color
.FromArgb(255, 0, 191, 0) };
2212
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 0.5f,
Color
.FromArgb(255, 0, 149, 0) };
2213
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 0.5f,
Color
.FromArgb(255, 0, 134, 0) };
2214
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 0.5f,
Color
.FromArgb(255, 0, 130, 0) };
2215
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 0.5f,
Color
.FromArgb(255, 63, 63, 63) };
2216
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 0.5f,
Color
.FromArgb(255, 157, 87, 221) };
2217
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 0.5f,
Color
.FromArgb(255, 255, 213, 255) };
2218
yield return new object[] { SystemColors.ControlDarkDark, 0.5f,
Color
.FromArgb(255, 142, 142, 142) };
2219
yield return new object[] { SystemColors.ControlDark, 0.5f,
Color
.FromArgb(255, 183, 183, 183) };
2220
yield return new object[] { SystemColors.Control, 0.5f,
Color
.FromArgb(255, 241, 241, 241) };
2221
yield return new object[] { SystemColors.ControlLight, 0.5f,
Color
.FromArgb(255, 233, 233, 233) };
2222
yield return new object[] { SystemColors.ControlLightLight, 0.5f,
Color
.FromArgb(255, 255, 255, 255) };
2224
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 1f,
Color
.FromArgb(255, 255, 128, 128) };
2225
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 1f,
Color
.FromArgb(255, 128, 255, 128) };
2226
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 1f,
Color
.FromArgb(255, 128, 128, 255) };
2227
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 1f,
Color
.FromArgb(255, 255, 255, 128) };
2228
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 1f,
Color
.FromArgb(255, 255, 128, 255) };
2229
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 1f,
Color
.FromArgb(255, 128, 255, 255) };
2230
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 1f,
Color
.FromArgb(255, 255, 255, 255) };
2231
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 1f,
Color
.FromArgb(255, 43, 255, 43) };
2232
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 1f,
Color
.FromArgb(255, 15, 255, 15) };
2233
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 1f,
Color
.FromArgb(255, 4, 255, 4) };
2234
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 1f,
Color
.FromArgb(255, 2, 255, 2) };
2235
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 1f,
Color
.FromArgb(255, 127, 127, 127) };
2236
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 1f,
Color
.FromArgb(255, 190, 143, 233) };
2237
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 1f,
Color
.FromArgb(255, 255, 227, 255) };
2238
yield return new object[] { SystemColors.ControlDarkDark, 1f,
Color
.FromArgb(255, 180, 180, 180) };
2239
yield return new object[] { SystemColors.ControlDark, 1f,
Color
.FromArgb(255, 208, 208, 208) };
2241
yield return new object[] { SystemColors.ControlLight, 1f,
Color
.FromArgb(255, 241, 241, 241) };
2242
yield return new object[] { SystemColors.ControlLightLight, 1f,
Color
.FromArgb(255, 255, 255, 255) };
2244
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0), 1.5f,
Color
.FromArgb(255, 255, 191, 191) };
2245
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0), 1.5f,
Color
.FromArgb(255, 191, 255, 191) };
2246
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255), 1.5f,
Color
.FromArgb(255, 191, 191, 255) };
2247
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0), 1.5f,
Color
.FromArgb(255, 255, 255, 191) };
2248
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255), 1.5f,
Color
.FromArgb(255, 255, 191, 255) };
2249
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255), 1.5f,
Color
.FromArgb(255, 191, 255, 255) };
2250
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255), 1.5f,
Color
.FromArgb(255, 255, 255, 255) };
2251
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0), 1.5f,
Color
.FromArgb(255, 149, 255, 149) };
2252
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0), 1.5f,
Color
.FromArgb(255, 136, 255, 136) };
2253
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0), 1.5f,
Color
.FromArgb(255, 130, 255, 130) };
2254
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0), 1.5f,
Color
.FromArgb(255, 130, 255, 130) };
2255
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0), 1.5f,
Color
.FromArgb(255, 191, 191, 191) };
2256
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200), 1.5f,
Color
.FromArgb(255, 223, 200, 244) };
2257
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255), 1.5f,
Color
.FromArgb(255, 255, 240, 255) };
2258
yield return new object[] { SystemColors.ControlDarkDark, 1.5f,
Color
.FromArgb(255, 217, 217, 217) };
2259
yield return new object[] { SystemColors.ControlDark, 1.5f,
Color
.FromArgb(255, 231, 231, 231) };
2260
yield return new object[] { SystemColors.Control, 1.5f,
Color
.FromArgb(255, 13, 13, 13) };
2261
yield return new object[] { SystemColors.ControlLight, 1.5f,
Color
.FromArgb(255, 247, 247, 247) };
2266
public void ControlPaint_Light_InvokeColorFloat_ReturnsExpected(
Color
baseColor, float percOfLightLight,
Color
expected)
2276
yield return new object[] {
Color
.FromArgb(255, 255, 0, 0),
Color
.FromArgb(255, 255, 128, 128) };
2277
yield return new object[] {
Color
.FromArgb(255, 0, 255, 0),
Color
.FromArgb(255, 128, 255, 128) };
2278
yield return new object[] {
Color
.FromArgb(255, 0, 0, 255),
Color
.FromArgb(255, 128, 128, 255) };
2279
yield return new object[] {
Color
.FromArgb(255, 255, 255, 0),
Color
.FromArgb(255, 255, 255, 128) };
2280
yield return new object[] {
Color
.FromArgb(255, 255, 0, 255),
Color
.FromArgb(255, 255, 128, 255) };
2281
yield return new object[] {
Color
.FromArgb(255, 0, 255, 255),
Color
.FromArgb(255, 128, 255, 255) };
2282
yield return new object[] {
Color
.FromArgb(255, 255, 255, 255),
Color
.FromArgb(255, 255, 255, 255) };
2283
yield return new object[] {
Color
.FromArgb(255, 0, 85, 0),
Color
.FromArgb(255, 43, 255, 43) };
2284
yield return new object[] {
Color
.FromArgb(255, 0, 28, 0),
Color
.FromArgb(255, 15, 255, 15) };
2285
yield return new object[] {
Color
.FromArgb(255, 0, 9, 0),
Color
.FromArgb(255, 4, 255, 4) };
2286
yield return new object[] {
Color
.FromArgb(255, 0, 2, 0),
Color
.FromArgb(255, 2, 255, 2) };
2287
yield return new object[] {
Color
.FromArgb(255, 0, 0, 0),
Color
.FromArgb(255, 127, 127, 127) };
2288
yield return new object[] {
Color
.FromArgb(255, 125, 40, 200),
Color
.FromArgb(255, 190, 143, 233) };
2289
yield return new object[] {
Color
.FromArgb(0, 255, 200, 255),
Color
.FromArgb(255, 255, 227, 255) };
2290
yield return new object[] { SystemColors.ControlDarkDark,
Color
.FromArgb(255, 180, 180, 180) };
2291
yield return new object[] { SystemColors.ControlDark,
Color
.FromArgb(255, 208, 208, 208) };
2293
yield return new object[] { SystemColors.ControlLight,
Color
.FromArgb(255, 241, 241, 241) };
2294
yield return new object[] { SystemColors.ControlLightLight,
Color
.FromArgb(255, 255, 255, 255) };
2299
public void ControlPaint_LightLight_InvokeColor_ReturnsExpected(
Color
baseColor,
Color
expected)
System\Windows\Forms\ControlPaintTests.Rendering.cs (24)
24
ControlPaint.DrawBorder(graphics, bounds,
Color
.Blue, ButtonBorderStyle.Solid);
31
State.Pen(1,
Color
.Blue, PEN_STYLE.PS_SOLID)));
43
ControlPaint.DrawBorder(graphics, bounds,
Color
.Gray, ButtonBorderStyle.Inset);
60
State.Pen(16, ControlPaint.DarkDark(
Color
.Gray), penStyle),
66
State.Pen(16, ControlPaint.DarkDark(
Color
.Gray), penStyle),
72
State.Pen(16, ControlPaint.LightLight(
Color
.Gray), penStyle),
78
State.Pen(16, ControlPaint.LightLight(
Color
.Gray), penStyle),
84
State.Pen(16, ControlPaint.Light(
Color
.Gray), penStyle),
90
State.Pen(16, ControlPaint.Light(
Color
.Gray), penStyle),
178
ControlPaint.DrawBorder(graphics, bounds,
Color
.PeachPuff, ButtonBorderStyle.Outset);
197
State.Pen(16, ControlPaint.LightLight(
Color
.PeachPuff), penStyle),
203
State.Pen(16, ControlPaint.LightLight(
Color
.PeachPuff), penStyle),
209
State.Pen(16, ControlPaint.DarkDark(
Color
.PeachPuff), penStyle),
215
State.Pen(16, ControlPaint.DarkDark(
Color
.PeachPuff), penStyle),
221
State.Pen(16,
Color
.PeachPuff, penStyle),
227
State.Pen(16,
Color
.PeachPuff, penStyle),
233
State.Pen(16, ControlPaint.Dark(
Color
.PeachPuff), penStyle),
239
State.Pen(16, ControlPaint.Dark(
Color
.PeachPuff), penStyle),
326
ControlPaint.DrawBorder(graphics, bounds,
Color
.Green, ButtonBorderStyle.Dotted);
341
State.Pen(16,
Color
.Green, penStyle),
342
State.Brush(
Color
.Green, BRUSH_STYLE.BS_SOLID)));
354
ControlPaint.DrawBorder(graphics, bounds,
Color
.Pink, ButtonBorderStyle.Dashed);
369
State.Pen(16,
Color
.Pink, penStyle),
370
State.Brush(
Color
.Pink, BRUSH_STYLE.BS_SOLID)));
System\Windows\Forms\ControlTests.ControlCollection.cs (32)
654
owner.ForeColor =
Color
.Red;
656
owner.BackColor =
Color
.Blue;
764
Assert.Equal(
Color
.Red, control.ForeColor);
766
Assert.Equal(
Color
.Blue, control.BackColor);
804
owner.ForeColor =
Color
.Red;
806
owner.BackColor =
Color
.Blue;
923
Assert.Equal(
Color
.Red, control.ForeColor);
925
Assert.Equal(
Color
.Blue, control.BackColor);
957
owner.ForeColor =
Color
.Red;
959
owner.BackColor =
Color
.Blue;
1000
Assert.Equal(
Color
.Red, control.ForeColor);
1002
Assert.Equal(
Color
.Blue, control.BackColor);
1030
owner.ForeColor =
Color
.Red;
1032
owner.BackColor =
Color
.Blue;
1080
Assert.Equal(
Color
.Red, control.ForeColor);
1082
Assert.Equal(
Color
.Blue, control.BackColor);
2357
owner.ForeColor =
Color
.Red;
2358
Assert.Equal(
Color
.Red, control.ForeColor);
2359
owner.BackColor =
Color
.Blue;
2360
Assert.Equal(
Color
.Blue, control.BackColor);
2501
owner.ForeColor =
Color
.Red;
2502
Assert.Equal(
Color
.Red, control.ForeColor);
2503
owner.BackColor =
Color
.Blue;
2504
Assert.Equal(
Color
.Blue, control.BackColor);
2633
owner.ForeColor =
Color
.Red;
2634
Assert.Equal(
Color
.Red, control.ForeColor);
2635
owner.BackColor =
Color
.Blue;
2636
Assert.Equal(
Color
.Blue, control.BackColor);
2697
owner.ForeColor =
Color
.Red;
2698
Assert.Equal(
Color
.Red, control.ForeColor);
2699
owner.BackColor =
Color
.Blue;
2700
Assert.Equal(
Color
.Blue, control.BackColor);
System\Windows\Forms\ControlTests.Handlers.cs (110)
182
BackColor =
Color
.Yellow
186
BackColor =
Color
.YellowGreen
2009
ForeColor =
Color
.Yellow
2013
ForeColor =
Color
.YellowGreen
2770
yield return new object[] { true,
Color
.Empty, null };
2771
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(Rectangle.Empty) };
2772
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2773
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2774
yield return new object[] { true,
Color
.Red, null };
2775
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(Rectangle.Empty) };
2776
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2777
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2778
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), null };
2779
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(Rectangle.Empty) };
2780
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2781
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2783
yield return new object[] { false,
Color
.Empty, null };
2784
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(Rectangle.Empty) };
2785
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2786
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2787
yield return new object[] { false,
Color
.Red, null };
2788
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(Rectangle.Empty) };
2789
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2790
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2795
public void Control_OnInvalidated_InvokeWithChildren_CallsInvalidated(bool supportsTransparentBackgroundColor,
Color
backColor, InvalidateEventArgs eventArgs)
2875
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(Rectangle.Empty), 0 };
2876
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2877
yield return new object[] { true,
Color
.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2878
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(Rectangle.Empty), 0 };
2879
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2880
yield return new object[] { true,
Color
.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2881
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(Rectangle.Empty), 0 };
2882
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2883
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 1 };
2885
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(Rectangle.Empty), 0 };
2886
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2887
yield return new object[] { false,
Color
.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2888
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(Rectangle.Empty), 0 };
2889
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2890
yield return new object[] { false,
Color
.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2895
public void Control_OnInvalidated_InvokeWithChildrenWithHandle_CallsInvalidated(bool supportsTransparentBackgroundColor,
Color
backColor, InvalidateEventArgs eventArgs, int expectedChildInvalidatedCallCount)
2986
child1.BackColor =
Color
.FromArgb(200, 50, 100, 150);
3278
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
3709
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
3842
yield return new object[] { true,
Color
.Empty, backgroundImage, backgroundImageLayout };
3843
yield return new object[] { true,
Color
.Red, backgroundImage, backgroundImageLayout };
3844
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout };
3845
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout };
3846
yield return new object[] { false,
Color
.Empty, backgroundImage, backgroundImageLayout };
3847
yield return new object[] { false,
Color
.Red, backgroundImage, backgroundImageLayout };
3854
public void Control_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
3905
yield return new object[] { parent, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
3906
yield return new object[] { parent, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
3907
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
3908
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
3909
yield return new object[] { parent, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
3910
yield return new object[] { parent, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
3914
yield return new object[] { parent, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3915
yield return new object[] { parent, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3916
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
3917
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
3918
yield return new object[] { parent, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3919
yield return new object[] { parent, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3921
yield return new object[] { parent, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3922
yield return new object[] { parent, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3923
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
3924
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
3925
yield return new object[] { parent, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3926
yield return new object[] { parent, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3949
yield return new object[] { parent, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
3950
yield return new object[] { parent, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
3951
yield return new object[] { parent, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
3952
yield return new object[] { parent, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
3953
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected1 };
3954
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected1 };
3958
yield return new object[] { parent, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3959
yield return new object[] { parent, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3960
yield return new object[] { parent, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3961
yield return new object[] { parent, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3962
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
3963
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
3965
yield return new object[] { parent, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3966
yield return new object[] { parent, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3967
yield return new object[] { parent, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3968
yield return new object[] { parent, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3969
yield return new object[] { parent, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3970
yield return new object[] { parent, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3976
public void Control_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
4026
public void Control_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
4077
yield return new object[] { true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4078
yield return new object[] { true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4079
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4080
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4081
yield return new object[] { false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4082
yield return new object[] { false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4086
yield return new object[] { true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4087
yield return new object[] { true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4088
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4089
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4090
yield return new object[] { false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4091
yield return new object[] { false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4093
yield return new object[] { true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4094
yield return new object[] { true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4095
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4096
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4097
yield return new object[] { false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4098
yield return new object[] { false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4103
public void Control_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
4229
BackColor =
Color
.Red
4545
ForeColor =
Color
.Red
System\Windows\Forms\ControlTests.Methods.cs (40)
4283
otherControl.BackColor =
Color
.FromArgb(100, 50, 100, 150);
4528
yield return new object[] { true,
Color
.Empty, null };
4529
yield return new object[] { true,
Color
.Empty, Rectangle.Empty };
4530
yield return new object[] { true,
Color
.Empty, new Rectangle(100, 200, 300, 400) };
4531
yield return new object[] { true,
Color
.Empty, new Rectangle(1, 2, 300, 400) };
4532
yield return new object[] { true,
Color
.Red, null };
4533
yield return new object[] { true,
Color
.Red, Rectangle.Empty };
4534
yield return new object[] { true,
Color
.Red, new Rectangle(100, 200, 300, 400) };
4535
yield return new object[] { true,
Color
.Red, new Rectangle(1, 2, 300, 400) };
4536
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), null };
4537
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), Rectangle.Empty };
4538
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new Rectangle(100, 200, 300, 400) };
4539
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new Rectangle(1, 2, 300, 400) };
4541
yield return new object[] { false,
Color
.Empty, null };
4542
yield return new object[] { false,
Color
.Empty, Rectangle.Empty };
4543
yield return new object[] { false,
Color
.Empty, new Rectangle(100, 200, 300, 400) };
4544
yield return new object[] { false,
Color
.Empty, new Rectangle(1, 2, 300, 400) };
4545
yield return new object[] { false,
Color
.Red, null };
4546
yield return new object[] { false,
Color
.Red, Rectangle.Empty };
4547
yield return new object[] { false,
Color
.Red, new Rectangle(100, 200, 300, 400) };
4548
yield return new object[] { false,
Color
.Red, new Rectangle(1, 2, 300, 400) };
4553
public void Control_NotifyInvalidate_InvokeWithChildren_CallsInvalidated(bool supportsTransparentBackgroundColor,
Color
backColor, Rectangle invalidatedArea)
4633
yield return new object[] { true,
Color
.Empty, Rectangle.Empty, 0 };
4634
yield return new object[] { true,
Color
.Empty, new Rectangle(100, 200, 300, 400), 0 };
4635
yield return new object[] { true,
Color
.Empty, new Rectangle(1, 2, 300, 400), 0 };
4636
yield return new object[] { true,
Color
.Red, Rectangle.Empty, 0 };
4637
yield return new object[] { true,
Color
.Red, new Rectangle(100, 200, 300, 400), 0 };
4638
yield return new object[] { true,
Color
.Red, new Rectangle(1, 2, 300, 400), 0 };
4639
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), Rectangle.Empty, 0 };
4640
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new Rectangle(100, 200, 300, 400), 0 };
4641
yield return new object[] { true,
Color
.FromArgb(200, 50, 100, 150), new Rectangle(1, 2, 300, 400), 1 };
4643
yield return new object[] { false,
Color
.Empty, Rectangle.Empty, 0 };
4644
yield return new object[] { false,
Color
.Empty, new Rectangle(100, 200, 300, 400), 0 };
4645
yield return new object[] { false,
Color
.Empty, new Rectangle(1, 2, 300, 400), 0 };
4646
yield return new object[] { false,
Color
.Red, Rectangle.Empty, 0 };
4647
yield return new object[] { false,
Color
.Red, new Rectangle(100, 200, 300, 400), 0 };
4648
yield return new object[] { false,
Color
.Red, new Rectangle(1, 2, 300, 400), 0 };
4653
public void Control_NotifyInvalidate_InvokeWithChildrenWithHandle_CallsInvalidated(bool supportsTransparentBackgroundColor,
Color
backColor, Rectangle invalidatedArea, int expectedChildInvalidatedCallCount)
6355
control.BackColor =
Color
.Black;
6433
control.ForeColor =
Color
.Black;
System\Windows\Forms\ControlTests.Properties.cs (169)
1229
public void Control_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1246
public void Control_BackColor_SetWithCustomOldValue_GetReturnsExpected(
Color
value,
Color
expected)
1250
BackColor =
Color
.YellowGreen
1265
yield return new object[] {
Color
.Red,
Color
.Red };
1266
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1267
yield return new object[] {
Color
.Empty, Control.DefaultBackColor };
1272
public void Control_BackColor_SetTransparent_GetReturnsExpected(
Color
value,
Color
expected)
1289
public void Control_BackColor_SetWithChildren_GetReturnsExpected(
Color
value,
Color
expected)
1313
public void Control_BackColor_SetWithChildrenWithColor_GetReturnsExpected(
Color
value,
Color
expected)
1317
BackColor =
Color
.Yellow
1321
BackColor =
Color
.YellowGreen
1329
Assert.Equal(
Color
.Yellow, child1.BackColor);
1330
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1336
Assert.Equal(
Color
.Yellow, child1.BackColor);
1337
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1343
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1344
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
1349
public void Control_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1390
control.BackColor =
Color
.Red;
1391
Assert.Equal(
Color
.Red, control.BackColor);
1395
control.BackColor =
Color
.Red;
1396
Assert.Equal(
Color
.Red, control.BackColor);
1400
control.BackColor =
Color
.Empty;
1406
control.BackColor =
Color
.Red;
1407
Assert.Equal(
Color
.Red, control.BackColor);
1425
control.BackColor =
Color
.Red;
1426
Assert.Equal(
Color
.Red, control.BackColor);
1477
control.BackColor =
Color
.Red;
1478
Assert.Equal(
Color
.Red, control.BackColor);
1479
Assert.Equal(
Color
.Red, child1.BackColor);
1480
Assert.Equal(
Color
.Red, child2.BackColor);
1486
control.BackColor =
Color
.Red;
1487
Assert.Equal(
Color
.Red, control.BackColor);
1488
Assert.Equal(
Color
.Red, child1.BackColor);
1489
Assert.Equal(
Color
.Red, child2.BackColor);
1495
control.BackColor =
Color
.Empty;
1507
control.BackColor =
Color
.Red;
1508
Assert.Equal(
Color
.Red, control.BackColor);
1509
Assert.Equal(
Color
.Red, child1.BackColor);
1510
Assert.Equal(
Color
.Red, child2.BackColor);
1521
BackColor =
Color
.Yellow
1525
BackColor =
Color
.YellowGreen
1557
control.BackColor =
Color
.Red;
1558
Assert.Equal(
Color
.Red, control.BackColor);
1559
Assert.Equal(
Color
.Yellow, child1.BackColor);
1560
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1566
control.BackColor =
Color
.Red;
1567
Assert.Equal(
Color
.Red, control.BackColor);
1568
Assert.Equal(
Color
.Yellow, child1.BackColor);
1569
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1575
control.BackColor =
Color
.Empty;
1577
Assert.Equal(
Color
.Yellow, child1.BackColor);
1578
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1587
control.BackColor =
Color
.Red;
1588
Assert.Equal(
Color
.Red, control.BackColor);
1589
Assert.Equal(
Color
.Yellow, child1.BackColor);
1590
Assert.Equal(
Color
.YellowGreen, child2.BackColor);
1600
Assert.Throws<ArgumentException>(() => control.BackColor =
Color
.FromArgb(254, 1, 2, 3));
1610
control.BackColor =
Color
.Red;
1611
Assert.Equal(
Color
.Red, control.BackColor);
1626
control.BackColor =
Color
.Red;
1627
Assert.Equal(
Color
.Red, control.BackColor);
5293
public void Control_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
5310
public void Control_ForeColor_SetWithCustomOldValue_GetReturnsExpected(
Color
value,
Color
expected)
5314
ForeColor =
Color
.YellowGreen
5329
public void Control_ForeColor_SetWithChildren_GetReturnsExpected(
Color
value,
Color
expected)
5353
public void Control_ForeColor_SetWithChildrenWithColor_GetReturnsExpected(
Color
value,
Color
expected)
5357
ForeColor =
Color
.Yellow
5361
ForeColor =
Color
.YellowGreen
5369
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5370
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5376
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5377
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5383
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
5384
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
5385
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
5390
public void Control_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
5431
control.ForeColor =
Color
.Red;
5432
Assert.Equal(
Color
.Red, control.ForeColor);
5436
control.ForeColor =
Color
.Red;
5437
Assert.Equal(
Color
.Red, control.ForeColor);
5441
control.ForeColor =
Color
.Empty;
5447
control.ForeColor =
Color
.Red;
5448
Assert.Equal(
Color
.Red, control.ForeColor);
5466
control.ForeColor =
Color
.Red;
5467
Assert.Equal(
Color
.Red, control.ForeColor);
5518
control.ForeColor =
Color
.Red;
5519
Assert.Equal(
Color
.Red, control.ForeColor);
5520
Assert.Equal(
Color
.Red, child1.ForeColor);
5521
Assert.Equal(
Color
.Red, child2.ForeColor);
5527
control.ForeColor =
Color
.Red;
5528
Assert.Equal(
Color
.Red, control.ForeColor);
5529
Assert.Equal(
Color
.Red, child1.ForeColor);
5530
Assert.Equal(
Color
.Red, child2.ForeColor);
5536
control.ForeColor =
Color
.Empty;
5548
control.ForeColor =
Color
.Red;
5549
Assert.Equal(
Color
.Red, control.ForeColor);
5550
Assert.Equal(
Color
.Red, child1.ForeColor);
5551
Assert.Equal(
Color
.Red, child2.ForeColor);
5562
ForeColor =
Color
.Yellow
5566
ForeColor =
Color
.YellowGreen
5598
control.ForeColor =
Color
.Red;
5599
Assert.Equal(
Color
.Red, control.ForeColor);
5600
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5601
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5607
control.ForeColor =
Color
.Red;
5608
Assert.Equal(
Color
.Red, control.ForeColor);
5609
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5610
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5616
control.ForeColor =
Color
.Empty;
5618
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5619
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5628
control.ForeColor =
Color
.Red;
5629
Assert.Equal(
Color
.Red, control.ForeColor);
5630
Assert.Equal(
Color
.Yellow, child1.ForeColor);
5631
Assert.Equal(
Color
.YellowGreen, child2.ForeColor);
5644
control.ForeColor =
Color
.Red;
5645
Assert.Equal(
Color
.Red, control.ForeColor);
5660
control.ForeColor =
Color
.Red;
5661
Assert.Equal(
Color
.Red, control.ForeColor);
7063
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
7548
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
10726
BackColor =
Color
.Blue,
10729
ForeColor =
Color
.Red
10742
BackColor =
Color
.Blue,
10745
ForeColor =
Color
.Red
10758
BackColor =
Color
.Red,
10761
ForeColor =
Color
.Blue
10813
Assert.Equal(
Color
.Blue, control.BackColor);
10815
Assert.Equal(
Color
.Red, control.ForeColor);
10829
Assert.Equal(
Color
.Blue, control.BackColor);
10831
Assert.Equal(
Color
.Red, control.ForeColor);
10845
Assert.Equal(
Color
.Blue, control.BackColor);
10847
Assert.Equal(
Color
.Red, control.ForeColor);
10861
Assert.Equal(
Color
.Red, control.BackColor);
10863
Assert.Equal(
Color
.Blue, control.ForeColor);
10900
BackColor =
Color
.Blue,
10903
ForeColor =
Color
.Red
10916
BackColor =
Color
.Blue,
10919
ForeColor =
Color
.Red
10932
BackColor =
Color
.Red,
10935
ForeColor =
Color
.Blue
10959
BackColor =
Color
.Green,
10961
ForeColor =
Color
.Yellow,
10995
Assert.Equal(
Color
.Green, control.BackColor);
10997
Assert.Equal(
Color
.Yellow, control.ForeColor);
11011
Assert.Equal(
Color
.Green, control.BackColor);
11013
Assert.Equal(
Color
.Yellow, control.ForeColor);
11027
Assert.Equal(
Color
.Green, control.BackColor);
11029
Assert.Equal(
Color
.Yellow, control.ForeColor);
11043
Assert.Equal(
Color
.Green, control.BackColor);
11045
Assert.Equal(
Color
.Yellow, control.ForeColor);
12495
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
System\Windows\Forms\DataGridViewButtonColumnTests.cs (1)
195
_column.DefaultCellStyle.BackColor =
Color
.Red;
System\Windows\Forms\DataGridViewCellStyleTests.cs (96)
21
Assert.Equal(
Color
.Empty, style.BackColor);
24
Assert.Equal(
Color
.Empty, style.ForeColor);
32
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
33
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
45
BackColor =
Color
.Red,
48
ForeColor =
Color
.Blue,
53
SelectionBackColor =
Color
.Green,
54
SelectionForeColor =
Color
.Yellow,
62
Assert.Equal(
Color
.Red, style.BackColor);
65
Assert.Equal(
Color
.Blue, style.ForeColor);
73
Assert.Equal(
Color
.Green, style.SelectionBackColor);
74
Assert.Equal(
Color
.Yellow, style.SelectionForeColor);
87
Assert.Equal(
Color
.Empty, style.BackColor);
90
Assert.Equal(
Color
.Empty, style.ForeColor);
98
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
99
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
135
public void DataGridViewCellStyle_BackColor_Set_GetReturnsExpected(
Color
value)
153
BackColor =
Color
.Red
155
style.BackColor =
Color
.Empty;
156
Assert.Equal(
Color
.Empty, style.BackColor);
293
public void DataGridViewCellStyle_ForeColor_Set_GetReturnsExpected(
Color
value)
311
ForeColor =
Color
.Red
313
style.ForeColor =
Color
.Empty;
314
Assert.Equal(
Color
.Empty, style.ForeColor);
511
public void DataGridViewCellStyle_SelectionBackColor_Set_GetReturnsExpected(
Color
value)
529
SelectionBackColor =
Color
.Red
531
style.SelectionBackColor =
Color
.Empty;
532
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
537
public void DataGridViewCellStyle_SelectionForeColor_Set_GetReturnsExpected(
Color
value)
555
SelectionForeColor =
Color
.Red
557
style.SelectionForeColor =
Color
.Empty;
558
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
622
BackColor =
Color
.Red,
625
ForeColor =
Color
.Blue,
630
SelectionBackColor =
Color
.Green,
631
SelectionForeColor =
Color
.Yellow,
640
Assert.Equal(
Color
.Red, style.BackColor);
643
Assert.Equal(
Color
.Blue, style.ForeColor);
651
Assert.Equal(
Color
.Green, style.SelectionBackColor);
652
Assert.Equal(
Color
.Yellow, style.SelectionForeColor);
665
BackColor =
Color
.Red,
668
ForeColor =
Color
.Blue,
673
SelectionBackColor =
Color
.Green,
674
SelectionForeColor =
Color
.Yellow,
682
Assert.Equal(
Color
.Red, style.BackColor);
685
Assert.Equal(
Color
.Blue, style.ForeColor);
693
Assert.Equal(
Color
.Green, style.SelectionBackColor);
694
Assert.Equal(
Color
.Yellow, style.SelectionForeColor);
713
BackColor =
Color
.Red,
716
ForeColor =
Color
.Blue,
721
SelectionBackColor =
Color
.Green,
722
SelectionForeColor =
Color
.Yellow,
730
Assert.Equal(
Color
.Red, style.BackColor);
733
Assert.Equal(
Color
.Blue, style.ForeColor);
741
Assert.Equal(
Color
.Green, style.SelectionBackColor);
742
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);
821
Assert.Equal(
Color
.Empty, style.BackColor);
824
Assert.Equal(
Color
.Empty, style.ForeColor);
832
Assert.Equal(
Color
.Empty, style.SelectionBackColor);
833
Assert.Equal(
Color
.Empty, style.SelectionForeColor);
859
new DataGridViewCellStyle { BackColor =
Color
.Red },
860
new DataGridViewCellStyle { BackColor =
Color
.Red },
865
new DataGridViewCellStyle { BackColor =
Color
.Red },
866
new DataGridViewCellStyle { BackColor =
Color
.Blue },
895
new DataGridViewCellStyle { ForeColor =
Color
.Red },
896
new DataGridViewCellStyle { ForeColor =
Color
.Red },
901
new DataGridViewCellStyle { ForeColor =
Color
.Red },
902
new DataGridViewCellStyle { ForeColor =
Color
.Blue },
979
new DataGridViewCellStyle { SelectionBackColor =
Color
.Red },
980
new DataGridViewCellStyle { SelectionBackColor =
Color
.Red },
985
new DataGridViewCellStyle { SelectionBackColor =
Color
.Red },
986
new DataGridViewCellStyle { SelectionBackColor =
Color
.Blue },
991
new DataGridViewCellStyle { SelectionForeColor =
Color
.Red },
992
new DataGridViewCellStyle { SelectionForeColor =
Color
.Red },
997
new DataGridViewCellStyle { SelectionForeColor =
Color
.Red },
998
new DataGridViewCellStyle { SelectionForeColor =
Color
.Blue },
1052
new DataGridViewCellStyle { BackColor =
Color
.Red },
1067
new DataGridViewCellStyle { ForeColor =
Color
.Red },
1102
new DataGridViewCellStyle { SelectionBackColor =
Color
.Red },
1107
new DataGridViewCellStyle { SelectionForeColor =
Color
.Red },
1127
BackColor =
Color
.Red,
1130
ForeColor =
Color
.Blue,
1135
SelectionBackColor =
Color
.Green,
1136
SelectionForeColor =
Color
.Yellow,
System\Windows\Forms\DataGridViewLinkColumnTests.cs (21)
43
var
color =
Color
.Red;
54
var
color =
Color
.Red;
69
var
color = _column.ActiveLinkColor;
135
var
color =
Color
.Blue;
146
var
color =
Color
.Blue;
161
var
color = _column.LinkColor;
272
var
color =
Color
.Green;
283
var
color =
Color
.Green;
298
var
color = _column.VisitedLinkColor;
310
_column.ActiveLinkColor =
Color
.Red;
312
_column.LinkColor =
Color
.Blue;
316
_column.VisitedLinkColor =
Color
.Green;
331
_column.ActiveLinkColor =
Color
.Red;
333
_column.LinkColor =
Color
.Blue;
337
_column.VisitedLinkColor =
Color
.Green;
System\Windows\Forms\DataGridViewRowTests.cs (16)
2066
BackColor =
Color
.Green,
2069
ForeColor =
Color
.Blue,
2074
SelectionForeColor =
Color
.Red,
2075
SelectionBackColor =
Color
.Yellow,
2082
BackColor =
Color
.Blue,
2085
ForeColor =
Color
.Green,
2090
SelectionForeColor =
Color
.Yellow,
2091
SelectionBackColor =
Color
.Red,
4188
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.Selected, new DataGridViewCellStyle { BackColor =
Color
.Blue, SelectionBackColor =
Color
.Red }, true };
4189
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.Selected, new DataGridViewCellStyle { BackColor =
Color
.Blue, SelectionBackColor =
Color
.Red }, true };
4190
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.None, new DataGridViewCellStyle { BackColor =
Color
.Blue, SelectionBackColor =
Color
.Red }, true };
4191
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.None, new DataGridViewCellStyle { BackColor =
Color
.Blue, SelectionBackColor =
Color
.Red }, false };
System\Windows\Forms\DataGridViewTests.cs (19)
795
yield return new object[] { new DataGridViewCellStyle { BackColor =
Color
.Empty } };
796
yield return new object[] { new DataGridViewCellStyle { ForeColor =
Color
.Empty } };
797
yield return new object[] { new DataGridViewCellStyle { SelectionBackColor =
Color
.Empty } };
798
yield return new object[] { new DataGridViewCellStyle { SelectionForeColor =
Color
.Empty } };
2341
ForeColor =
Color
.Maroon,
2931
dataGrid.GridColor =
Color
.Red;
2934
Assert.Equal(
Color
.Red, dataGrid.GridColor);
3049
_dataGridView.AlternatingRowsDefaultCellStyle = new() { BackColor =
Color
.AliceBlue };
3089
_dataGridView.BackgroundColor =
Color
.AliceBlue;
3093
_dataGridView.BackgroundColor =
Color
.Azure;
3169
_dataGridView.ColumnHeadersDefaultCellStyle = new() { BackColor =
Color
.Red };
3229
_dataGridView.DefaultCellStyle = new() { BackColor =
Color
.Red };
3269
_dataGridView.GridColor =
Color
.Red;
3273
_dataGridView.GridColor =
Color
.Blue;
3369
_dataGridView.RowsDefaultCellStyle = new() { BackColor =
Color
.Red };
3482
TestEvent(nameof(DataGridView.BackColorChanged), nameof(DataGridView.BackColor),
Color
.Red,
Color
.Blue);
3503
TestEvent(nameof(DataGridView.ForeColorChanged), nameof(DataGridView.ForeColor),
Color
.Red,
Color
.Blue);
System\Windows\Forms\DataGridViewTests.Rendering.cs (9)
23
GridColor =
Color
.Blue,
58
State.Pen(1,
Color
.Empty, PEN_STYLE.PS_NULL),
65
State.Pen(16,
Color
.Blue, penStyle),
71
State.Pen(16,
Color
.Blue, penStyle),
77
State.Pen(16,
Color
.Blue, penStyle),
83
State.Pen(16,
Color
.Blue, penStyle),
89
State.Pen(1,
Color
.Empty, PEN_STYLE.PS_NULL),
97
State.Brush(
Color
.Empty, BRUSH_STYLE.BS_NULL),
126
ForeColor =
Color
.Maroon,
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (83)
548
yield return new object[] { new DataGridViewCellStyle(), null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false };
554
BackColor =
Color
.Gray,
555
ForeColor =
Color
.Green
557
yield return new object[] { customStyle, font,
Color
.Gray,
Color
.Green, false, HorizontalAlignment.Left, false };
562
BackColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
563
ForeColor =
Color
.FromArgb(0x23, 0x45, 0x67, 0x80)
565
yield return new object[] { transparentStyle, font,
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78),
Color
.FromArgb(0x23, 0x45, 0x67, 0x80), false, HorizontalAlignment.Left, false };
574
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
583
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true
592
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
601
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true
610
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
619
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true
629
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
638
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true
647
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
656
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true
665
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
674
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true
684
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
693
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, false
702
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
711
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, false
720
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
729
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, false
735
public void DataGridViewTextBoxEditingDataGridViewTextBoxEditingControl_ApplyCellStyleToEditingDataGridViewTextBoxEditingControl_Invoke_Success(DataGridViewCellStyle dataGridViewCellStyle, Font expectedFont,
Color
expectedBackColor,
Color
expectedForeColor, bool expectedWordWrap, HorizontalAlignment expectedTextAlign, bool expectedRepositionOnValueChange)
741
BackColor =
Color
.Red,
742
ForeColor =
Color
.Blue,
757
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 };
763
BackColor =
Color
.Gray,
764
ForeColor =
Color
.Green
766
yield return new object[] { customStyle, font,
Color
.Gray, SystemColors.Control,
Color
.Green, false, HorizontalAlignment.Left, false };
771
BackColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
772
ForeColor =
Color
.FromArgb(0x23, 0x45, 0x67, 0x80)
774
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 };
783
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
792
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true
801
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
810
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true
819
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
828
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true
838
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
847
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true
856
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
865
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true
874
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
883
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true
893
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false
902
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, false
911
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false
920
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, false
929
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false
938
null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00),
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, false
944
public void DataGridViewTextBoxEditingDataGridViewTextBoxEditingControl_ApplyCellStyleToEditingDataGridViewTextBoxEditingControl_InvokeWithDataGridView_Success(DataGridViewCellStyle dataGridViewCellStyle, Font expectedFont,
Color
expectedBackColor,
Color
expectedEditingPanelBackColor,
Color
expectedForeColor, bool expectedWordWrap, HorizontalAlignment expectedTextAlign, bool expectedRepositionOnValueChange)
952
BackColor =
Color
.Red,
953
ForeColor =
Color
.Blue,
System\Windows\Forms\DateTimePickerTests.cs (14)
177
var
expectedColor =
Color
.Red;
199
var
expectedColor =
Color
.Red;
221
var
expectedColor =
Color
.Red;
243
var
expectedColor =
Color
.Red;
265
var
expectedColor =
Color
.Red;
699
control.BackColor =
Color
.Red;
703
control.BackColor =
Color
.Green;
812
control.ForeColor =
Color
.Red;
816
control.ForeColor =
Color
.Blue;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
158
Assert.Equal(
Color
.Empty, control.TransparencyKey);
System\Windows\Forms\DrawItemEventArgsTests.cs (16)
24
public void DrawItemEventArgs_Ctor_Graphics_Font_Rectangle_Int_DrawItemState(Font font, Rectangle rect, int index, DrawItemState state,
Color
expectedForeColor,
Color
expectedBackColor)
40
yield return new object[] { null, Rectangle.Empty, -2, DrawItemState.None - 1,
Color
.Empty,
Color
.Empty };
41
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None,
Color
.Red,
Color
.Blue };
42
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected,
Color
.Red,
Color
.Blue };
43
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus,
Color
.Red,
Color
.Blue };
44
yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect,
Color
.Red,
Color
.Blue };
49
public void DrawItemEventArgs_Ctor_Graphics_Font_Rectangle_Int_DrawItemState_Color_Color(Font font, Rectangle rect, int index, DrawItemState state,
Color
foreColor,
Color
backColor)
68
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)
15
yield return new object[] { Rectangle.Empty, -2, null, (DrawItemState)(ListViewItemStates.Checked - 1),
Color
.Empty,
Color
.Empty, null };
16
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
17
yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
18
yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
23
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)
42
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont));
51
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked,
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 };
69
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
70
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
75
public void DrawListViewColumnHeaderEventArgs_DrawBackground_Invoke_Success(Rectangle bounds, ColumnHeader header, ListViewItemStates state,
Color
foreColor,
Color
backColor, Font font)
92
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont);
101
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont);
107
yield return new object[] { new Rectangle(-1, -2, -3, -4), 0, ListViewItemStates.Default,
Color
.Empty,
Color
.Empty, null };
108
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
113
public void DrawListViewColumnHeaderEventArgs_DrawText_NullHeader_Success(Rectangle bounds, int columnIndex, ListViewItemStates state,
Color
foreColor,
Color
backColor, Font font)
System\Windows\Forms\DrawToolTipEventArgsTests.cs (28)
15
yield return new object[] { null, null, Rectangle.Empty, null,
Color
.Empty,
Color
.Empty, null };
16
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "",
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
17
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 };
22
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)
37
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), null,
Color
.Empty,
Color
.Empty, null };
38
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), string.Empty,
Color
.Empty,
Color
.Empty, null };
39
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), "tooltipText",
Color
.Empty,
Color
.Empty, null };
40
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
41
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty,
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
42
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), "tooltipText",
Color
.Red,
Color
.Blue, SystemFonts.DefaultFont };
47
public void DrawBackground_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText,
Color
backColor,
Color
foreColor, Font font)
57
public void DrawText_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText,
Color
backColor,
Color
foreColor, Font font)
67
public void DrawText_InvokeTextFormatFlags_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText,
Color
backColor,
Color
foreColor, Font font)
77
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)
22
Assert.Equal(
Color
.Black, dialog.Color);
52
Assert.Equal(
Color
.Empty, dialog.Color);
166
yield return new object[] {
Color
.Empty,
Color
.Black };
167
yield return new object[] {
Color
.Black,
Color
.Black };
168
yield return new object[] {
Color
.Red,
Color
.Red };
169
yield return new object[] {
Color
.FromArgb(1, 2, 3, 4),
Color
.FromArgb(1, 2, 3, 4) };
175
public void FontDialog_Color_Set_GetReturnsExpected(
Color
value,
Color
expected)
190
public void FontDialog_Color_SetWithCustomOldValue_GetReturnsExpected(
Color
value,
Color
expected)
194
Color =
Color
.Yellow
611
Assert.Equal(
Color
.Black, dialog.Color);
System\Windows\Forms\FormTests.cs (95)
160
Assert.Equal(
Color
.Empty, control.TransparencyKey);
317
Assert.Equal(
Color
.Empty, control.TransparencyKey);
324
Assert.Equal(
Color
.Empty, control.TransparencyKey);
331
Assert.Equal(
Color
.Empty, control.TransparencyKey);
338
yield return new object[] { true,
Color
.Red, 0.5 };
339
yield return new object[] { false,
Color
.Empty, 1 };
344
public void Form_AllowTransparency_SetWithOpacityAndTransparencyKey_GetReturnsExpected(bool value,
Color
expectedTransparencyKey, float expectedOpacity)
349
TransparencyKey =
Color
.Red,
367
Assert.Equal(
Color
.Empty, control.TransparencyKey);
382
Assert.Equal(
Color
.Empty, control.TransparencyKey);
389
Assert.Equal(
Color
.Empty, control.TransparencyKey);
396
Assert.Equal(
Color
.Empty, control.TransparencyKey);
417
Assert.Equal(
Color
.Empty, control.TransparencyKey);
427
Assert.Equal(
Color
.Empty, control.TransparencyKey);
437
Assert.Equal(
Color
.Empty, control.TransparencyKey);
447
yield return new object[] { true,
Color
.Red, 0.5, 0 };
448
yield return new object[] { false,
Color
.Empty, 1, 1 };
453
public void Form_AllowTransparency_SetWithOpacityAndTransparencyKeyWithHandle_GetReturnsExpected(bool value,
Color
expectedTransparencyKey, float expectedOpacity, int expectedStyleChangedCallCount)
458
TransparencyKey =
Color
.Red
490
Assert.Equal(
Color
.Empty, control.TransparencyKey);
517
Assert.Equal(
Color
.Empty, control.TransparencyKey);
527
Assert.Equal(
Color
.Empty, control.TransparencyKey);
537
Assert.Equal(
Color
.Empty, control.TransparencyKey);
632
Assert.Equal(
Color
.Empty, control.TransparencyKey);
639
Assert.Equal(
Color
.Empty, control.TransparencyKey);
662
TransparencyKey =
Color
.Red,
667
Assert.Equal(
Color
.Red, control.TransparencyKey);
674
Assert.Equal(
Color
.Red, control.TransparencyKey);
690
Assert.Equal(
Color
.Empty, control.TransparencyKey);
697
Assert.Equal(
Color
.Empty, control.TransparencyKey);
727
Assert.Equal(
Color
.Empty, control.TransparencyKey);
737
Assert.Equal(
Color
.Empty, control.TransparencyKey);
765
Assert.Equal(
Color
.Empty, control.TransparencyKey);
774
Assert.Equal(
Color
.Empty, control.TransparencyKey);
809
Assert.Equal(
Color
.Empty, control.TransparencyKey);
818
Assert.Equal(
Color
.Empty, control.TransparencyKey);
844
control.TransparencyKey =
Color
.Red;
855
Assert.Equal(
Color
.Red, control.TransparencyKey);
865
Assert.Equal(
Color
.Red, control.TransparencyKey);
907
Assert.Equal(
Color
.Empty, control.TransparencyKey);
917
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1270
yield return new object[] { allowTransparency,
Color
.Empty, allowTransparency };
1271
yield return new object[] { allowTransparency,
Color
.Red, true };
1272
yield return new object[] { allowTransparency,
Color
.Transparent, true };
1278
public void Form_TransparencyKey_Set_GetReturnsExpected(bool allowTransparency,
Color
value, bool expectedAllowTransparency)
1302
yield return new object[] { allowTransparency,
Color
.Empty };
1303
yield return new object[] { allowTransparency,
Color
.Red };
1304
yield return new object[] { allowTransparency,
Color
.Transparent };
1310
public void Form_TransparencyKey_SetWithCustomOldValue_GetReturnsExpected(bool allowTransparency,
Color
value)
1315
TransparencyKey =
Color
.Yellow
1336
yield return new object[] { allowTransparency,
Color
.Empty };
1337
yield return new object[] { allowTransparency,
Color
.Red };
1338
yield return new object[] { allowTransparency,
Color
.Transparent };
1344
public void Form_TransparencyKey_SetWithOpacity_GetReturnsExpected(bool allowTransparency,
Color
value)
1369
yield return new object[] { allowTransparency,
Color
.Empty };
1370
yield return new object[] { allowTransparency,
Color
.Red };
1371
yield return new object[] { allowTransparency,
Color
.Transparent };
1377
public void Form_TransparencyKey_SetMdiContainer_Nop(bool allowTransparency,
Color
value)
1399
public void Form_TransparencyKey_SetNotTopLevel_GetReturnsExpected(bool allowTransparency,
Color
value, bool expectedAllowTransparency)
1432
control.TransparencyKey =
Color
.Empty;
1435
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1442
control.TransparencyKey =
Color
.Empty;
1445
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1454
yield return new object[] {
Color
.Red, true, 2 };
1455
yield return new object[] {
Color
.Transparent, true, 2 };
1460
public void Form_TransparencyKey_SetTransparentWithHandleSetNotAllowTransparency_GetReturnsExpected(
Color
value, bool expectedAllowTransparency, int expectedStyleChangedCallCount)
1506
control.TransparencyKey =
Color
.Empty;
1509
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1516
control.TransparencyKey =
Color
.Empty;
1519
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1528
yield return new object[] {
Color
.Red };
1529
yield return new object[] {
Color
.Transparent };
1534
public void Form_TransparencyKey_SetTransparentWithHandleSetAllowTransparencyBefore_GetReturnsExpected(
Color
value)
1581
control.TransparencyKey =
Color
.Empty;
1584
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1591
control.TransparencyKey =
Color
.Empty;
1594
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1603
public void Form_TransparencyKey_SetTransparentWithHandleSetAllowTransparencyAfter_GetReturnsExpected(
Color
value)
1650
control.TransparencyKey =
Color
.Empty;
1653
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1660
control.TransparencyKey =
Color
.Empty;
1663
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1672
public void Form_TransparencyKey_SetTransparentWithHandleSetOpacityBefore_GetReturnsExpected(
Color
value)
1719
control.TransparencyKey =
Color
.Empty;
1722
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1729
control.TransparencyKey =
Color
.Empty;
1732
Assert.Equal(
Color
.Empty, control.TransparencyKey);
1741
public void Form_TransparencyKey_SetTransparentWithHandleSetOpacityAfter_GetReturnsExpected(
Color
value)
1775
yield return new object[] { true,
Color
.Empty, true, 1 };
1776
yield return new object[] { true,
Color
.Red, true, 0 };
1777
yield return new object[] { true,
Color
.Transparent, true, 0 };
1779
yield return new object[] { false,
Color
.Empty, false, 0 };
1780
yield return new object[] { false,
Color
.Red, true, 2 };
1781
yield return new object[] { false,
Color
.Transparent, true, 2 };
1786
public void Form_TransparencyKey_SetNotTopLevelWithHandle_GetReturnsExpected(bool allowTransparency,
Color
value, bool expectedAllowTransparency, int expectedStyleChangedCallCount)
System\Windows\Forms\GroupBoxTests.cs (6)
1831
foreach (
Color
foreColor in new
Color
[] {
Color
.Red,
Color
.Empty })
1849
public void GroupBox_OnPaint_Invoke_CallsPaint(Size size, bool enabled, bool useCompatibleTextRendering, RightToLeft rightToLeft,
Color
foreColor, string text)
1887
public void GroupBox_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabled, bool useCompatibleTextRendering, RightToLeft rightToLeft,
Color
foreColor, string text)
System\Windows\Forms\HtmlDocumentTests.cs (163)
28
Assert.Equal(
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF), document.ActiveLinkColor);
33
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
34
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
35
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
36
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
37
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
38
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
39
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
40
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
41
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
42
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
43
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
44
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
45
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
50
public async Task HtmlDocument_ActiveLinkColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
65
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
66
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
67
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
68
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
69
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
70
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
71
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
72
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
73
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
74
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
75
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
76
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
77
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
82
public async Task HtmlDocument_ActiveLinkColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
106
public async Task HtmlDocument_ActiveLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
245
Assert.Equal(
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), document.BackColor);
250
yield return new object[] { null,
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
251
yield return new object[] { "",
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
252
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
253
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
254
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
255
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
256
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
257
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
258
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
259
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
260
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
261
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
262
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
267
public async Task HtmlDocument_BackColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
282
yield return new object[] { null,
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
283
yield return new object[] { "",
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
284
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
285
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
286
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
287
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
288
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) };
289
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
290
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
291
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
292
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
293
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
294
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
299
public async Task HtmlDocument_BackColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
321
yield return new object[] {
Color
.Empty,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), "#000000" };
322
yield return new object[] {
Color
.Red,
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00), "#ff0000" };
323
yield return new object[] {
Color
.White,
Color
.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), "#ffffff" };
324
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78), "#345678" };
329
public async Task HtmlDocument_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
725
Assert.Equal(
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00), document.ForeColor);
730
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
731
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
732
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
733
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
734
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
735
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
736
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
737
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
738
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
739
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
740
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
741
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
742
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
747
public async Task HtmlDocument_ForeColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
762
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
763
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
764
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
765
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
766
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
767
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
768
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
769
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
770
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
771
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
772
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
773
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
774
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
779
public async Task HtmlDocument_ForeColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
801
public async Task HtmlDocument_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
914
Assert.Equal(
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF), document.LinkColor);
919
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
920
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
921
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
922
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
923
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
924
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
925
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
926
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
927
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
928
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
929
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
930
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
931
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
936
public async Task HtmlDocument_LinkColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
951
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
952
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
953
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
954
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
955
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
956
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
957
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x00, 0x00, 0xFF) };
958
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
959
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
960
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
961
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
962
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
963
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
968
public async Task HtmlDocument_LinkColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
990
public async Task HtmlDocument_LinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
1277
Assert.Equal(
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80), document.VisitedLinkColor);
1282
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1283
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1284
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
1285
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
1286
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
1287
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x11, 0x30, 0x60) };
1288
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x30, 0x41, 0x89) };
1289
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
1290
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
1291
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
1292
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
1293
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
1294
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
1299
public async Task HtmlDocument_VisitedLinkColor_GetCustomValueOnBody_ReturnsExpected(object value,
Color
expected)
1314
yield return new object[] { null,
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1315
yield return new object[] { "",
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1316
yield return new object[] { "NoSuchName",
Color
.FromArgb(0xFF, 0x00, 0xC0, 0x0E) };
1317
yield return new object[] { "Invalid",
Color
.FromArgb(0xFF, 0x00, 0xA0, 0xD0) };
1318
yield return new object[] { "Red",
Color
.FromArgb(0xFF, 0xFF, 0x00, 0x00) };
1319
yield return new object[] { 0x123456,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
1320
yield return new object[] { 0x12345678,
Color
.FromArgb(0xFF, 0x80, 0x00, 0x80) };
1321
yield return new object[] { "#",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
1322
yield return new object[] { "#1",
Color
.FromArgb(0xFF, 0x1, 0x00, 0x00) };
1323
yield return new object[] { "#123456",
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
1324
yield return new object[] { "#12345678",
Color
.FromArgb(0xFF, 0x12, 0x45, 0x78) };
1325
yield return new object[] { "abc#123456",
Color
.FromArgb(0xFF, 0xAB, 0x12, 0x56) };
1326
yield return new object[] { "#G",
Color
.FromArgb(0xFF, 0x00, 0x00, 0x00) };
1331
public async Task HtmlDocument_VisitedLinkColor_GetCustomValueSet_ReturnsExpected(object value,
Color
expected)
1353
public async Task HtmlDocument_VisitedLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected, string expectedNative)
System\Windows\Forms\ImageList.ImageCollectionTests.cs (112)
57
image32bppArgbTransparent.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
105
image32bppArgbTransparent.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
155
yield return new object[] { pixelFormat,
Color
.Empty,
Color
.Empty };
156
yield return new object[] { PixelFormat.Format24bppRgb,
Color
.Red,
Color
.FromArgb(200, 50, 75, 100) };
163
yield return new object[] { PixelFormat.Format1bppIndexed,
Color
.Empty,
Color
.Empty,
Color
.FromArgb(255, 0, 0, 0) };
169
yield return new object[] { PixelFormat.Format24bppRgb,
Color
.Red,
Color
.FromArgb(200, 50, 75, 100),
Color
.FromArgb(255, 50, 75, 100) };
170
yield return new object[] { PixelFormat.Format32bppRgb,
Color
.Red,
Color
.FromArgb(200, 50, 75, 100),
Color
.FromArgb(255, 50, 75, 100) };
186
public void ImageCollection_Item_Get32bppColorDepth_Success(PixelFormat pixelFormat,
Color
pixel00Color,
Color
givenPixel10Color,
Color
expectedPixel10Color)
192
if (pixel00Color !=
Color
.Empty)
194
if (givenPixel10Color !=
Color
.Empty)
242
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
250
bitmap.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
259
public void ImageCollection_Item_Set_GetReturnsExpected(
Color
transparentColor, Image value)
280
public void ImageCollection_Item_SetWithHandle_GetReturnsExpected(
Color
transparentColor, Image value)
353
image1.SetPixel(0, 0,
Color
.Red);
355
image2.SetPixel(0, 0,
Color
.Blue);
422
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
430
bitmap.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
439
public void ImageCollection_Add_InvokeStringImage_Success(
Color
transparentColor, Image value)
483
public void ImageCollection_Add_InvokeStringImageWithHandle_Success(
Color
transparentColor, Image value)
528
public void ImageCollection_Add_InvokeImage_Success(
Color
transparentColor, Image value)
552
public void ImageCollection_Add_InvokeImageWithHandle_Success(
Color
transparentColor, Image value)
577
foreach (
Color
listTransparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
579
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
587
bitmap.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
597
public void ImageCollection_Add_InvokeImageColor_Success(
Color
listTransparentColor, Image value,
Color
transparentColor)
621
public void ImageCollection_Add_InvokeImageColorWithHandle_Success(
Color
listTransparentColor, Image value,
Color
transparentColor)
646
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
654
public void ImageCollection_Add_InvokeStringIcon_Success(
Color
transparentColor, Icon value)
698
public void ImageCollection_Add_InvokeStringIconWithHandle_Success(
Color
transparentColor, Icon value)
743
public void ImageCollection_Add_InvokeIcon_Success(
Color
transparentColor, Icon value)
767
public void ImageCollection_Add_InvokeIconWithHandle_Success(
Color
transparentColor, Icon value)
796
Assert.Throws<ArgumentNullException>("value", () => collection.Add(null,
Color
.Transparent));
810
Assert.Throws<ArgumentException>(() => collection.Add(value,
Color
.Transparent));
816
public void ImageCollection_AddRange_Invoke_Success(
Color
transparentColor, Image value)
840
public void ImageCollection_AddRange_InvokeWithHandle_Success(
Color
transparentColor, Image value)
891
foreach (
Color
transparentColor in new
Color
[] {
Color
.Transparent,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.Empty,
Color
.Black })
898
bitmap.SetPixel(0, 0,
Color
.FromArgb(0x12, 0x34, 0x56, 0x78));
905
public void ImageCollection_AddStrip_Invoke_Success(
Color
transparentColor, Image value, int expectedCount)
922
public void ImageCollection_AddStrip_InvokeWithHandle_Success(
Color
transparentColor, Image value, int expectedCount)
1158
image1.SetPixel(0, 0,
Color
.Red);
1160
image2.SetPixel(0, 0,
Color
.Blue);
1195
image1.SetPixel(0, 0,
Color
.Red);
1197
image2.SetPixel(0, 0,
Color
.Blue);
1307
image1.SetPixel(0, 0,
Color
.Red);
1309
image2.SetPixel(0, 0,
Color
.Blue);
1311
image3.SetPixel(0, 0,
Color
.Yellow);
1341
image1.SetPixel(0, 0,
Color
.Red);
1343
image2.SetPixel(0, 0,
Color
.Blue);
1345
image3.SetPixel(0, 0,
Color
.Yellow);
1350
Color
color1 = ((Bitmap)collection[0]).GetPixel(0, 0);
1351
Color
color2 = ((Bitmap)collection[1]).GetPixel(0, 0);
1352
Color
color3 = ((Bitmap)collection[2]).GetPixel(0, 0);
1405
image1.SetPixel(0, 0,
Color
.Red);
1407
image2.SetPixel(0, 0,
Color
.Blue);
1409
image3.SetPixel(0, 0,
Color
.Yellow);
1445
image1.SetPixel(0, 0,
Color
.Red);
1447
image2.SetPixel(0, 0,
Color
.Blue);
1449
image3.SetPixel(0, 0,
Color
.Yellow);
1454
Color
color1 = ((Bitmap)collection[0]).GetPixel(0, 0);
1455
Color
color2 = ((Bitmap)collection[1]).GetPixel(0, 0);
1456
Color
color3 = ((Bitmap)collection[2]).GetPixel(0, 0);
1497
image1.SetPixel(0, 0,
Color
.Red);
1499
image2.SetPixel(0, 0,
Color
.Blue);
1501
image3.SetPixel(0, 0,
Color
.Yellow);
1506
Color
color1 = ((Bitmap)collection[0]).GetPixel(0, 0);
1507
Color
color2 = ((Bitmap)collection[1]).GetPixel(0, 0);
1508
Color
color3 = ((Bitmap)collection[2]).GetPixel(0, 0);
1632
public void ImageCollection_IListItem_Set_GetReturnsExpected(
Color
transparentColor, Image value)
1653
public void ImageCollection_IListItem_SetWithHandle_GetReturnsExpected(
Color
transparentColor, Image value)
System\Windows\Forms\ImageListTests.cs (30)
27
Assert.Equal(
Color
.Transparent, list.TransparentColor);
45
Assert.Equal(
Color
.Transparent, list.TransparentColor);
669
foreach (
Color
testData in CommonTestHelper.GetColorWithEmptyTheoryData())
674
yield return new object[] {
Color
.LightGray };
679
public void ImageList_TransparentColor_SetWithoutHandle_GetReturnsExpected(
Color
value)
702
list.TransparentColor =
Color
.Red;
703
Assert.Equal(
Color
.Red, list.TransparentColor);
708
list.TransparentColor =
Color
.Red;
709
Assert.Equal(
Color
.Red, list.TransparentColor);
714
list.TransparentColor =
Color
.Blue;
715
Assert.Equal(
Color
.Blue, list.TransparentColor);
721
list.TransparentColor =
Color
.Red;
722
Assert.Equal(
Color
.Red, list.TransparentColor);
729
public void ImageList_TransparentColor_SetWithHandle_GetReturnsExpected(
Color
value)
753
list.TransparentColor =
Color
.Red;
754
Assert.Equal(
Color
.Red, list.TransparentColor);
759
list.TransparentColor =
Color
.Red;
760
Assert.Equal(
Color
.Red, list.TransparentColor);
765
list.TransparentColor =
Color
.Blue;
766
Assert.Equal(
Color
.Blue, list.TransparentColor);
772
list.TransparentColor =
Color
.Red;
773
Assert.Equal(
Color
.Red, list.TransparentColor);
783
Assert.Equal(
Color
.Transparent, list.TransparentColor);
786
list.TransparentColor =
Color
.Red;
787
Assert.Equal(
Color
.Red, list.TransparentColor);
791
Assert.Equal(
Color
.LightGray, list.TransparentColor);
800
Assert.Equal(
Color
.Transparent, list.TransparentColor);
803
list.TransparentColor =
Color
.Red;
804
Assert.Equal(
Color
.Red, list.TransparentColor);
808
Assert.Equal(
Color
.LightGray, list.TransparentColor);
System\Windows\Forms\ListBoxTests.cs (56)
351
yield return new object[] {
Color
.Empty, SystemColors.Window };
352
yield return new object[] {
Color
.Red,
Color
.Red };
357
public void ListBox_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
374
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
375
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
380
public void ListBox_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
421
control.BackColor =
Color
.Red;
422
Assert.Equal(
Color
.Red, control.BackColor);
426
control.BackColor =
Color
.Red;
427
Assert.Equal(
Color
.Red, control.BackColor);
431
control.BackColor =
Color
.Empty;
437
control.BackColor =
Color
.Red;
438
Assert.Equal(
Color
.Red, control.BackColor);
449
control.BackColor =
Color
.Red;
450
Assert.Equal(
Color
.Red, control.BackColor);
465
control.BackColor =
Color
.Red;
466
Assert.Equal(
Color
.Red, control.BackColor);
1242
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1243
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1244
yield return new object[] {
Color
.White,
Color
.White };
1245
yield return new object[] {
Color
.Black,
Color
.Black };
1246
yield return new object[] {
Color
.Red,
Color
.Red };
1251
public void ListBox_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1268
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1269
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1270
yield return new object[] {
Color
.White,
Color
.White, 1 };
1271
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1272
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1277
public void ListBox_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1318
control.ForeColor =
Color
.Red;
1319
Assert.Equal(
Color
.Red, control.ForeColor);
1323
control.ForeColor =
Color
.Red;
1324
Assert.Equal(
Color
.Red, control.ForeColor);
1328
control.ForeColor =
Color
.Empty;
1334
control.ForeColor =
Color
.Red;
1335
Assert.Equal(
Color
.Red, control.ForeColor);
1346
control.ForeColor =
Color
.Red;
1347
Assert.Equal(
Color
.Red, control.ForeColor);
1362
control.ForeColor =
Color
.Red;
1363
Assert.Equal(
Color
.Red, control.ForeColor);
5983
control.BackColor =
Color
.Black;
6002
control.ForeColor =
Color
.Black;
System\Windows\Forms\ListViewInsertionMarkTests.cs (8)
143
control.InsertionMark.Color =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
286
Assert.NotEqual(
Color
.Empty, insertionMark.Color);
304
Assert.NotEqual(
Color
.Empty, insertionMark.Color);
314
public void ListViewInsertionMark_Color_SetWithoutHandle_ReturnsExpected(
Color
value)
331
public void ListViewInsertionMark_Color_SetWithHandle_ReturnsExpected(
Color
value)
372
control.InsertionMark.Color =
Color
.Empty;
384
control.InsertionMark.Color =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
520
insertionMark.Color =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
System\Windows\Forms\ListViewItemConverterTests.cs (50)
57
ForeColor =
Color
.Blue
61
BackColor =
Color
.Blue
194
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
195
new object[] { new string[] { "text3" }, 1,
Color
.Blue,
Color
.Empty, null }
200
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
201
new object[] { new string[] { "text4" }, 1,
Color
.Empty,
Color
.Blue, null }
206
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
207
new object[] { new string[] { "text5" }, 1,
Color
.Empty,
Color
.Empty, SystemFonts.MenuFont }
212
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
213
new object[] { new string[] { "text3" }, "imageKey",
Color
.Blue,
Color
.Empty, null }
218
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
219
new object[] { new string[] { "text4" }, "imageKey",
Color
.Empty,
Color
.Blue, null }
224
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
225
new object[] { new string[] { "text5" }, "imageKey",
Color
.Empty,
Color
.Empty, SystemFonts.MenuFont }
231
new ListViewItem(["text"], "imageKey",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont),
232
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
233
new object[] { new string[] { "text" }, "imageKey",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
237
new ListViewItem(["text"], 1,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont),
238
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
239
new object[] { new string[] { "text" }, 1,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
243
new ListViewItem(["text"], "imageKey",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont, group),
244
new Type[] { typeof(string[]), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
245
new object[] { new string[] { "text" }, "imageKey",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
249
new ListViewItem(["text"], 1,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont, group),
250
new Type[] { typeof(string[]), typeof(int), typeof(
Color
), typeof(
Color
), typeof(Font) },
251
new object[] { new string[] { "text" }, 1,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
System\Windows\Forms\ListViewItemTests.cs (78)
46
yield return new object[] { null, null,
Color
.Empty,
Color
.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
47
yield return new object[] { Array.Empty<string>(), null,
Color
.Empty,
Color
.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
48
yield return new object[] { new string[] { null }, string.Empty,
Color
.Empty,
Color
.Empty, null, new ListViewGroup(), string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
49
yield return new object[] { new string[] { "text" }, "imageKey",
Color
.Blue,
Color
.Red, SystemFonts.MenuFont, new ListViewGroup(), "imageKey",
Color
.Blue,
Color
.Red, "text" };
54
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)
84
yield return new object[] { null, -1,
Color
.Empty,
Color
.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
85
yield return new object[] { Array.Empty<string>(), 0,
Color
.Empty,
Color
.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
86
yield return new object[] { new string[] { null }, 1,
Color
.Empty,
Color
.Empty, null, new ListViewGroup(), SystemColors.WindowText, SystemColors.Window, string.Empty };
87
yield return new object[] { new string[] { "text" }, 2,
Color
.Blue,
Color
.Red, SystemFonts.MenuFont, new ListViewGroup(),
Color
.Blue,
Color
.Red, "text" };
92
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)
122
yield return new object[] { null, null,
Color
.Empty,
Color
.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
123
yield return new object[] { Array.Empty<string>(), null,
Color
.Empty,
Color
.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
124
yield return new object[] { new string[] { null }, string.Empty,
Color
.Empty,
Color
.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
125
yield return new object[] { new string[] { "text" }, "imageKey",
Color
.Blue,
Color
.Red, SystemFonts.MenuFont, "imageKey",
Color
.Blue,
Color
.Red, "text" };
130
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)
160
yield return new object[] { null, -1,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
161
yield return new object[] { Array.Empty<string>(), 0,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
162
yield return new object[] { new string[] { null }, 1,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
163
yield return new object[] { new string[] { "text" }, 2,
Color
.Blue,
Color
.Red, SystemFonts.MenuFont,
Color
.Blue,
Color
.Red, "text" };
168
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)
851
yield return new object[] {
Color
.Empty, SystemColors.Window };
852
yield return new object[] {
Color
.Red,
Color
.Red };
857
public void ListViewItem_BackColor_GetWithOwner_ReturnsExpected(
Color
value,
Color
expected)
875
public void ListViewItem_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
890
public void ListViewItem_BackColor_SetWithOwner_GetReturnsExpected(
Color
value,
Color
expected)
906
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
907
yield return new object[] {
Color
.White,
Color
.White };
908
yield return new object[] {
Color
.Black,
Color
.Black };
909
yield return new object[] {
Color
.Red,
Color
.Red };
914
public void ListViewItem_ForeColor_GetWithOwner_ReturnsExpected(
Color
value,
Color
expected)
932
public void ListViewItem_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
948
public void ListViewItem_ForeColor_SetWithOwner_GetReturnsExpected(
Color
value,
Color
expected)
System\Windows\Forms\ListViewSubItemCollectionTests.cs (34)
259
yield return new object[] { null,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
260
yield return new object[] { string.Empty,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, string.Empty };
261
yield return new object[] { "reasonable",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, "reasonable" };
266
public void ListViewSubItemCollection_Add_String_Color_Color_Font_Success(string text,
Color
foreColor,
Color
backColor, Font font,
Color
expectedForeColor,
Color
expectedBackColor, string expectedText)
389
yield return new object[] {
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window };
390
yield return new object[] {
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue };
391
yield return new object[] {
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue };
396
public void ListViewSubItemCollection_AddRange_StringArrayWithStyles_Success(
Color
foreColor,
Color
backColor, Font font,
Color
expectedForeColor,
Color
expectedBackColor)
421
Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((string[])null,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont));
905
listViewItem.SubItems.Add("Test",
Color
.White,
Color
.Black, SystemFonts.MenuFont);
942
listViewItem.SubItems.AddRange(["Test 1", "Test 2"],
Color
.White,
Color
.Black, SystemFonts.MenuFont);
System\Windows\Forms\ListViewSubItemConverterTests.cs (6)
62
new ListViewItem.ListViewSubItem(null, "text",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont),
63
new Type[] { typeof(ListViewItem), typeof(string), typeof(
Color
), typeof(
Color
), typeof(Font) },
64
new object[] { null, "text",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont }
System\Windows\Forms\ListViewSubItemTests.cs (78)
33
yield return new object[] { new ListViewItem() { BackColor =
Color
.Yellow, ForeColor =
Color
.Yellow, Font = SystemFonts.StatusFont }, "reasonable", "reasonable" };
56
yield return new object[] { null, null,
Color
.Empty,
Color
.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
57
yield return new object[] { new ListViewItem(), string.Empty,
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, string.Empty };
58
yield return new object[] { new ListViewItem(), "reasonable",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, "reasonable" };
59
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 };
63
yield return new object[] { item, "reasonable",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont,
Color
.Red,
Color
.Blue, "reasonable" };
68
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)
85
BackColor =
Color
.Red
91
Assert.Equal(
Color
.Red, subItem.BackColor);
103
BackColor =
Color
.Red
118
BackColor =
Color
.Red
122
BackColor =
Color
.Blue
127
Assert.Equal(
Color
.Red, subItem.BackColor);
136
yield return new object[] {
Color
.Red,
Color
.Red };
137
yield return new object[] {
Color
.Empty, SystemColors.Window };
142
public void ListViewSubItem_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
157
yield return new object[] {
Color
.Green,
Color
.Green };
158
yield return new object[] {
Color
.Empty,
Color
.Red };
163
public void ListViewSubItem_BackColor_SetWithListViewItemWithListView_GetReturnsExpected(
Color
value,
Color
expected)
167
BackColor =
Color
.Red
171
BackColor =
Color
.Blue
187
public void ListViewSubItem_BackColor_SetWithListViewItem_GetReturnsExpected(
Color
value,
Color
expected)
191
BackColor =
Color
.Blue
334
ForeColor =
Color
.Red
340
Assert.Equal(
Color
.Red, subItem.ForeColor);
352
ForeColor =
Color
.Red
367
ForeColor =
Color
.Red
371
ForeColor =
Color
.Blue
376
Assert.Equal(
Color
.Red, subItem.ForeColor);
385
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
386
yield return new object[] {
Color
.White,
Color
.White };
387
yield return new object[] {
Color
.Black,
Color
.Black };
388
yield return new object[] {
Color
.Red,
Color
.Red };
393
public void ListViewSubItem_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
408
yield return new object[] {
Color
.Green,
Color
.Green };
409
yield return new object[] {
Color
.Empty,
Color
.Red };
414
public void ListViewSubItem_ForeColor_SetWithListViewItemWithListView_GetReturnsExpected(
Color
value,
Color
expected)
418
ForeColor =
Color
.Red
422
ForeColor =
Color
.Blue
438
public void ListViewSubItem_ForeColor_SetWithListViewItem_GetReturnsExpected(
Color
value,
Color
expected)
442
ForeColor =
Color
.Blue
558
var subItem = new ListViewItem.ListViewSubItem(owner, "text",
Color
.Red,
Color
.Blue, SystemFonts.MenuFont);
574
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)
454
yield return new object[] {
Color
.Empty, SystemColors.Window };
455
yield return new object[] {
Color
.Red,
Color
.Red };
460
public void ListView_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
477
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
478
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
483
public void ListView_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
516
control.BackColor =
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56);
534
control.BackColor =
Color
.Red;
535
Assert.Equal(
Color
.Red, control.BackColor);
539
control.BackColor =
Color
.Red;
540
Assert.Equal(
Color
.Red, control.BackColor);
544
control.BackColor =
Color
.Empty;
550
control.BackColor =
Color
.Red;
551
Assert.Equal(
Color
.Red, control.BackColor);
1310
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1311
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1312
yield return new object[] {
Color
.White,
Color
.White };
1313
yield return new object[] {
Color
.Black,
Color
.Black };
1314
yield return new object[] {
Color
.Red,
Color
.Red };
1319
public void ListView_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1336
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1337
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1338
yield return new object[] {
Color
.White,
Color
.White, 1 };
1339
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1340
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1345
public void ListView_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1378
control.ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
1396
control.ForeColor =
Color
.Red;
1397
Assert.Equal(
Color
.Red, control.ForeColor);
1401
control.ForeColor =
Color
.Red;
1402
Assert.Equal(
Color
.Red, control.ForeColor);
1406
control.ForeColor =
Color
.Empty;
1412
control.ForeColor =
Color
.Red;
1413
Assert.Equal(
Color
.Red, control.ForeColor);
1846
BackColor =
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56)
1857
ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
5055
imagecollection.TransparentColor =
Color
.Transparent;
System\Windows\Forms\MdiClientTests.cs (13)
94
public void MdiClient_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
123
control.BackColor =
Color
.Red;
124
Assert.Equal(
Color
.Red, control.BackColor);
128
control.BackColor =
Color
.Red;
129
Assert.Equal(
Color
.Red, control.BackColor);
133
control.BackColor =
Color
.Empty;
139
control.BackColor =
Color
.Red;
140
Assert.Equal(
Color
.Red, control.BackColor);
151
control.BackColor =
Color
.Red;
152
Assert.Equal(
Color
.Red, control.BackColor);
167
control.BackColor =
Color
.Red;
168
Assert.Equal(
Color
.Red, control.BackColor);
System\Windows\Forms\MonthCalendarTests.cs (75)
283
yield return new object[] {
Color
.Empty, SystemColors.Window };
284
yield return new object[] {
Color
.Red,
Color
.Red };
289
public void MonthCalendar_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
306
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
307
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
312
public void MonthCalendar_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
353
control.BackColor =
Color
.Red;
354
Assert.Equal(
Color
.Red, control.BackColor);
358
control.BackColor =
Color
.Red;
359
Assert.Equal(
Color
.Red, control.BackColor);
363
control.BackColor =
Color
.Empty;
369
control.BackColor =
Color
.Red;
370
Assert.Equal(
Color
.Red, control.BackColor);
923
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
924
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
925
yield return new object[] {
Color
.White,
Color
.White };
926
yield return new object[] {
Color
.Black,
Color
.Black };
927
yield return new object[] {
Color
.Red,
Color
.Red };
932
public void MonthCalendar_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
949
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
950
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
951
yield return new object[] {
Color
.White,
Color
.White, 1 };
952
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
953
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
958
public void MonthCalendar_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
999
control.ForeColor =
Color
.Red;
1000
Assert.Equal(
Color
.Red, control.ForeColor);
1004
control.ForeColor =
Color
.Red;
1005
Assert.Equal(
Color
.Red, control.ForeColor);
1009
control.ForeColor =
Color
.Empty;
1015
control.ForeColor =
Color
.Red;
1016
Assert.Equal(
Color
.Red, control.ForeColor);
1086
ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
1097
BackColor =
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56)
1108
TitleBackColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
1119
TitleForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
1130
TrailingForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78)
2716
yield return new object[] {
Color
.Red };
2717
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
2722
public void MonthCalendar_TitleBackColor_Set_GetReturnsExpected(
Color
value)
2739
public void MonthCalendar_TitleBackColor_SetWithHandle_GetReturnsExpected(
Color
value)
2770
Assert.Throws<ArgumentException>("value", () => calendar.TitleBackColor =
Color
.Empty);
2775
yield return new object[] {
Color
.Red };
2776
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
2781
public void MonthCalendar_TitleForeColor_Set_GetReturnsExpected(
Color
value)
2798
public void MonthCalendar_TitleForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
2829
Assert.Throws<ArgumentException>("value", () => calendar.TitleForeColor =
Color
.Empty);
2929
yield return new object[] {
Color
.Red };
2930
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
2935
public void MonthCalendar_TrailingForeColor_Set_GetReturnsExpected(
Color
value)
2952
public void MonthCalendar_TrailingForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
2983
Assert.Throws<ArgumentException>("value", () => calendar.TrailingForeColor =
Color
.Empty);
4522
ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTrailingForeColor(), () => calendar.TrailingForeColor =
Color
.Red);
4523
ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTitleForeColor(), () => calendar.TitleForeColor =
Color
.Red);
4524
ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTitleBackColor(), () => calendar.TitleBackColor =
Color
.Red);
4576
private void TestResetColorProperty(Func<MonthCalendar,
Color
> getColor, Action<MonthCalendar,
Color
> setColor, Action<dynamic> resetColor)
4581
Color
originalColor = getColor(calendar);
4583
setColor(calendar,
Color
.Red);
4584
getColor(calendar).Should().Be(
Color
.Red);
4589
setColor(calendar,
Color
.Red);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (14)
19
Assert.Equal(
Color
.Empty, bag.BackColor);
21
Assert.Equal(
Color
.Empty, bag.ForeColor);
27
public void OwnerDrawPropertyBag_BackColor_Set_GetReturnsExpected(
Color
value)
61
public void OwnerDrawPropertyBag_ForeColor_Set_GetReturnsExpected(
Color
value)
81
value.BackColor =
Color
.Blue;
83
value.ForeColor =
Color
.Red;
87
Assert.Equal(
Color
.Blue, bag.BackColor);
89
Assert.Equal(
Color
.Red, bag.ForeColor);
100
Assert.Equal(
Color
.Empty, bag.BackColor);
102
Assert.Equal(
Color
.Empty, bag.ForeColor);
112
original.BackColor =
Color
.Blue;
114
original.ForeColor =
Color
.Red;
126
Assert.Equal(
Color
.Blue, bag.BackColor);
128
Assert.Equal(
Color
.Red, bag.ForeColor);
System\Windows\Forms\PictureBoxTests.cs (9)
421
public void PictureBox_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
448
control.ForeColor =
Color
.Red;
449
Assert.Equal(
Color
.Red, control.ForeColor);
453
control.ForeColor =
Color
.Red;
454
Assert.Equal(
Color
.Red, control.ForeColor);
458
control.ForeColor =
Color
.Empty;
464
control.ForeColor =
Color
.Red;
465
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\Printing\PrintPreviewControlTests.cs (4)
21
control.BackColor =
Color
.Green;
24
Assert.Equal(
Color
.Green.ToArgb(), actualBackColorArgb);
38
control.BackColor =
Color
.Green;
42
Assert.Equal(
Color
.Green.ToArgb(), actualBackColorArgb);
System\Windows\Forms\ProfessionalColorsTests.cs (4)
75
public void ProfessionalColors_Properties_Get_ReturnsExpected(Func<
Color
> factory)
77
Color
result = factory();
83
public void ProfessionalColors_Properties_GetToolStripManagerVisualStylesEnabled_ReturnsExpected(Func<
Color
> factory)
90
Color
result = factory();
System\Windows\Forms\ProfessionalColorTableTests.cs (8)
85
public void ProfessionalColorTable_Properties_Get_ReturnsExpected(Func<ProfessionalColorTable,
Color
> factory)
88
Color
result = factory(table);
94
public void ProfessionalColorTable_Properties_GetUseSystemColors_ReturnsExpected(Func<ProfessionalColorTable,
Color
> factory)
100
Color
result = factory(table);
106
public void ProfessionalColorTable_Properties_GetToolStripManagerVisualStylesEnabled_ReturnsExpected(Func<ProfessionalColorTable,
Color
> factory)
114
Color
result = factory(table);
161
Color
result = table.ButtonCheckedGradientBegin;
195
Color
color = table.ButtonSelectedHighlight;
System\Windows\Forms\ProgressBarTests.cs (21)
537
public void ProgressBar_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
554
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
555
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
556
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 1 };
561
public void ProgressBar_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
602
control.ForeColor =
Color
.Red;
603
Assert.Equal(
Color
.Red, control.ForeColor);
607
control.ForeColor =
Color
.Red;
608
Assert.Equal(
Color
.Red, control.ForeColor);
612
control.ForeColor =
Color
.Empty;
618
control.ForeColor =
Color
.Red;
619
Assert.Equal(
Color
.Red, control.ForeColor);
630
control.ForeColor =
Color
.Red;
631
Assert.Equal(
Color
.Red, control.ForeColor);
646
control.ForeColor =
Color
.Red;
647
Assert.Equal(
Color
.Red, control.ForeColor);
2568
control.ForeColor =
Color
.Black;
System\Windows\Forms\PropertyGridInternal\PropertyGridView.DropDownHolderTests.cs (2)
17
propertyGridView.BackColor =
Color
.Green;
20
Assert.Equal(
Color
.Green, dropDownHolder.BackColor);
System\Windows\Forms\PropertyGridTests.cs (217)
63
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
66
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
68
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
286
public void PropertyGrid_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
305
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
306
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
311
public void PropertyGrid_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
356
control.BackColor =
Color
.Red;
357
Assert.Equal(
Color
.Red, control.BackColor);
361
control.BackColor =
Color
.Red;
362
Assert.Equal(
Color
.Red, control.BackColor);
366
control.BackColor =
Color
.Empty;
372
control.BackColor =
Color
.Red;
373
Assert.Equal(
Color
.Red, control.BackColor);
384
control.BackColor =
Color
.Red;
385
Assert.Equal(
Color
.Red, control.BackColor);
400
control.BackColor =
Color
.Red;
401
Assert.Equal(
Color
.Red, control.BackColor);
700
yield return new object[] {
Color
.Empty };
701
yield return new object[] {
Color
.Red };
702
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
707
public void PropertyGrid_CategoryForeColor_Set_GetReturnsExpected(
Color
value)
724
public void PropertyGrid_CategoryForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
758
control.CategoryForeColor =
Color
.Red;
759
Assert.Equal(
Color
.Red, control.CategoryForeColor);
774
control.CategoryForeColor =
Color
.Red;
775
Assert.Equal(
Color
.Red, control.CategoryForeColor);
785
public void PropertyGrid_CategorySplitterColor_Set_GetReturnsExpected(
Color
value)
802
public void PropertyGrid_CategorySplitterColor_SetWithHandle_GetReturnsExpected(
Color
value)
836
control.CategorySplitterColor =
Color
.Red;
837
Assert.Equal(
Color
.Red, control.CategorySplitterColor);
852
control.CategorySplitterColor =
Color
.Red;
853
Assert.Equal(
Color
.Red, control.CategorySplitterColor);
863
yield return new object[] {
Color
.Empty,
Color
.Red };
864
yield return new object[] {
Color
.Red,
Color
.Red };
865
yield return new object[] {
Color
.Blue,
Color
.Blue };
870
public void PropertyGrid_CommandsActiveLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
887
public void PropertyGrid_CommandsActiveLinkColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
921
control.CommandsActiveLinkColor =
Color
.Black;
922
Assert.Equal(
Color
.Black, control.CommandsActiveLinkColor);
926
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
937
control.CommandsActiveLinkColor =
Color
.Black;
938
Assert.Equal(
Color
.Black, control.CommandsActiveLinkColor);
942
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
948
public void PropertyGrid_CommandsBackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
965
public void PropertyGrid_CommandsBackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
999
control.CommandsBackColor =
Color
.Red;
1000
Assert.Equal(
Color
.Red, control.CommandsBackColor);
1015
control.CommandsBackColor =
Color
.Red;
1016
Assert.Equal(
Color
.Red, control.CommandsBackColor);
1028
Assert.Throws<ArgumentException>(() => control.CommandsBackColor =
Color
.FromArgb(254, 1, 2, 3));
1033
public void PropertyGrid_CommandsBorderColor_Set_GetReturnsExpected(
Color
value)
1050
public void PropertyGrid_CommandsBorderColor_SetWithHandle_GetReturnsExpected(
Color
value)
1084
control.CommandsBorderColor =
Color
.Red;
1085
Assert.Equal(
Color
.Red, control.CommandsBorderColor);
1100
control.CommandsBorderColor =
Color
.Red;
1101
Assert.Equal(
Color
.Red, control.CommandsBorderColor);
1111
yield return new object[] {
Color
.Empty,
Color
.FromArgb(255, 133, 133, 133) };
1112
yield return new object[] {
Color
.Red,
Color
.Red };
1113
yield return new object[] {
Color
.Blue,
Color
.Blue };
1118
public void PropertyGrid_CommandsDisabledLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1135
public void PropertyGrid_CommandsDisabledLinkColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1169
control.CommandsDisabledLinkColor =
Color
.Red;
1170
Assert.Equal(
Color
.Red, control.CommandsDisabledLinkColor);
1174
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
1185
control.CommandsDisabledLinkColor =
Color
.Red;
1186
Assert.Equal(
Color
.Red, control.CommandsDisabledLinkColor);
1190
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
1196
public void PropertyGrid_CommandsForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1213
public void PropertyGrid_CommandsForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1247
control.CommandsForeColor =
Color
.Red;
1248
Assert.Equal(
Color
.Red, control.CommandsForeColor);
1263
control.CommandsForeColor =
Color
.Red;
1264
Assert.Equal(
Color
.Red, control.CommandsForeColor);
1274
yield return new object[] {
Color
.Empty,
Color
.FromArgb(255, 0, 0, 255) };
1275
yield return new object[] {
Color
.Red,
Color
.Red };
1276
yield return new object[] {
Color
.Blue,
Color
.Blue };
1281
public void PropertyGrid_CommandsLinkColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1298
public void PropertyGrid_CommandsLinkColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1332
control.CommandsLinkColor =
Color
.Red;
1333
Assert.Equal(
Color
.Red, control.CommandsLinkColor);
1337
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
1348
control.CommandsLinkColor =
Color
.Red;
1349
Assert.Equal(
Color
.Red, control.CommandsLinkColor);
1353
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
1445
public void PropertyGrid_DisabledItemForeColor_Set_GetReturnsExpected(
Color
value)
1462
public void PropertyGrid_DisabledItemForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
1496
control.DisabledItemForeColor =
Color
.Red;
1497
Assert.Equal(
Color
.Red, control.DisabledItemForeColor);
1512
control.DisabledItemForeColor =
Color
.Red;
1513
Assert.Equal(
Color
.Red, control.DisabledItemForeColor);
1548
CommandsBackColor =
Color
.FromArgb(255, 0, 0, 1),
1549
CommandsForeColor =
Color
.FromArgb(255, 0, 0, 2),
1550
CommandsLinkColor =
Color
.FromArgb(255, 0, 0, 3),
1551
CommandsActiveLinkColor =
Color
.FromArgb(255, 0, 0, 4),
1552
CommandsDisabledLinkColor =
Color
.FromArgb(255, 0, 0, 5)
1558
Assert.Equal(
Color
.FromArgb(255, 0, 0, 1), control.CommandsBackColor);
1559
Assert.Equal(
Color
.FromArgb(255, 0, 0, 2), control.CommandsForeColor);
1560
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
1561
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
1562
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
1568
Assert.Equal(
Color
.FromArgb(255, 0, 0, 1), control.CommandsBackColor);
1569
Assert.Equal(
Color
.FromArgb(255, 0, 0, 2), control.CommandsForeColor);
1570
Assert.Equal(
Color
.FromArgb(255, 0, 0, 255), control.CommandsLinkColor);
1571
Assert.Equal(
Color
.Red, control.CommandsActiveLinkColor);
1572
Assert.Equal(
Color
.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor);
1615
public void PropertyGrid_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1632
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1633
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1634
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
1639
public void PropertyGrid_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1681
control.ForeColor =
Color
.Red;
1682
Assert.Equal(
Color
.Red, control.ForeColor);
1686
control.ForeColor =
Color
.Red;
1687
Assert.Equal(
Color
.Red, control.ForeColor);
1691
control.ForeColor =
Color
.Empty;
1697
control.ForeColor =
Color
.Red;
1698
Assert.Equal(
Color
.Red, control.ForeColor);
1709
control.ForeColor =
Color
.Red;
1710
Assert.Equal(
Color
.Red, control.ForeColor);
1725
control.ForeColor =
Color
.Red;
1726
Assert.Equal(
Color
.Red, control.ForeColor);
1736
public void PropertyGrid_HelpBackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1753
public void PropertyGrid_HelpBackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1787
control.HelpBackColor =
Color
.Red;
1788
Assert.Equal(
Color
.Red, control.HelpBackColor);
1803
control.HelpBackColor =
Color
.Red;
1804
Assert.Equal(
Color
.Red, control.HelpBackColor);
1816
Assert.Throws<ArgumentException>(() => control.HelpBackColor =
Color
.FromArgb(254, 1, 2, 3));
1821
public void PropertyGrid_HelpBorderColor_Set_GetReturnsExpected(
Color
value)
1838
public void PropertyGrid_HelpBorderColor_SetWithHandle_GetReturnsExpected(
Color
value)
1872
control.HelpBorderColor =
Color
.Red;
1873
Assert.Equal(
Color
.Red, control.HelpBorderColor);
1888
control.HelpBorderColor =
Color
.Red;
1889
Assert.Equal(
Color
.Red, control.HelpBorderColor);
1899
public void PropertyGrid_HelpForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1916
public void PropertyGrid_HelpForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1950
control.HelpForeColor =
Color
.Red;
1951
Assert.Equal(
Color
.Red, control.HelpForeColor);
1966
control.HelpForeColor =
Color
.Red;
1967
Assert.Equal(
Color
.Red, control.HelpForeColor);
2155
public void PropertyGrid_LineColor_Set_GetReturnsExpected(
Color
value)
2172
public void PropertyGrid_LineColor_SetWithHandle_GetReturnsExpected(
Color
value)
2206
control.LineColor =
Color
.Red;
2207
Assert.Equal(
Color
.Red, control.LineColor);
2222
control.LineColor =
Color
.Red;
2223
Assert.Equal(
Color
.Red, control.LineColor);
2402
public void PropertyGrid_SelectedItemWithFocusBackColor_Set_GetReturnsExpected(
Color
value)
2419
public void PropertyGrid_SelectedItemWithFocusBackColor_SetWithHandle_GetReturnsExpected(
Color
value)
2453
control.SelectedItemWithFocusBackColor =
Color
.Red;
2454
Assert.Equal(
Color
.Red, control.SelectedItemWithFocusBackColor);
2469
control.SelectedItemWithFocusBackColor =
Color
.Red;
2470
Assert.Equal(
Color
.Red, control.SelectedItemWithFocusBackColor);
2480
public void PropertyGrid_SelectedItemWithFocusForeColor_Set_GetReturnsExpected(
Color
value)
2497
public void PropertyGrid_SelectedItemWithFocusForeColor_SetWithHandle_GetReturnsExpected(
Color
value)
2531
control.SelectedItemWithFocusForeColor =
Color
.Red;
2532
Assert.Equal(
Color
.Red, control.SelectedItemWithFocusForeColor);
2547
control.SelectedItemWithFocusForeColor =
Color
.Red;
2548
Assert.Equal(
Color
.Red, control.SelectedItemWithFocusForeColor);
3205
public void PropertyGrid_ViewBackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
3223
public void PropertyGrid_ViewBackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
3257
control.ViewBackColor =
Color
.Red;
3258
Assert.Equal(
Color
.Red, control.ViewBackColor);
3273
control.ViewBackColor =
Color
.Red;
3274
Assert.Equal(
Color
.Red, control.ViewBackColor);
3286
Assert.Throws<ArgumentException>(() => control.ViewBackColor =
Color
.FromArgb(254, 1, 2, 3));
3291
public void PropertyGrid_ViewBorderColor_Set_GetReturnsExpected(
Color
value)
3308
public void PropertyGrid_ViewBorderColor_SetWithHandle_GetReturnsExpected(
Color
value)
3342
control.ViewBorderColor =
Color
.Red;
3343
Assert.Equal(
Color
.Red, control.ViewBorderColor);
3358
control.ViewBorderColor =
Color
.Red;
3359
Assert.Equal(
Color
.Red, control.ViewBorderColor);
3369
yield return new object[] {
Color
.Empty, SystemColors.ControlText };
3370
yield return new object[] {
Color
.Red,
Color
.Red };
3371
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
3376
public void PropertyGrid_ViewForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
3393
public void PropertyGrid_ViewForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
3427
control.ViewForeColor =
Color
.Red;
3428
Assert.Equal(
Color
.Red, control.ViewForeColor);
3443
control.ViewForeColor =
Color
.Red;
3444
Assert.Equal(
Color
.Red, control.ViewForeColor);
System\Windows\Forms\PropertyStoreTests.cs (7)
28
{ 15,
Color
.Red },
82
store.TryGetValue(1, out
Color
outValue).Should().BeFalse();
83
Color
color = default;
113
Action action = () => store.TryGetValue(1, out
Color
outValue);
141
store.TryGetValue(1, out
Color
? outValue).Should().BeFalse();
374
Color
value = default;
378
value.Should().Be(store.GetValueOrDefault<
Color
>(1));
System\Windows\Forms\RichTextBoxTests.cs (112)
121
Assert.Equal(
Color
.Empty, control.SelectionBackColor);
648
yield return new object[] {
Color
.Empty, SystemColors.Window };
649
yield return new object[] {
Color
.Red,
Color
.Red };
654
public void RichTextBox_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
671
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
672
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
677
public void Control_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
718
control.BackColor =
Color
.Red;
719
Assert.Equal(
Color
.Red, control.BackColor);
723
control.BackColor =
Color
.Red;
724
Assert.Equal(
Color
.Red, control.BackColor);
728
control.BackColor =
Color
.Empty;
734
control.BackColor =
Color
.Red;
735
Assert.Equal(
Color
.Red, control.BackColor);
1679
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1680
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1681
yield return new object[] {
Color
.White,
Color
.White };
1682
yield return new object[] {
Color
.Black,
Color
.Black };
1683
yield return new object[] {
Color
.Red,
Color
.Red };
1688
public void RichTextBox_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1705
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1706
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1707
yield return new object[] {
Color
.White,
Color
.White, 1 };
1708
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1709
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1714
public void RichTextBox_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1747
control.ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
1762
control.ForeColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
1771
control.ForeColor =
Color
.FromArgb(0x34, 0x56, 0x78, 0x90);
1794
control.ForeColor =
Color
.Red;
1795
Assert.Equal(
Color
.Red, control.ForeColor);
1799
control.ForeColor =
Color
.Red;
1800
Assert.Equal(
Color
.Red, control.ForeColor);
1804
control.ForeColor =
Color
.Empty;
1810
control.ForeColor =
Color
.Red;
1811
Assert.Equal(
Color
.Red, control.ForeColor);
3840
yield return new object[] { 0, 0, 0x78563412,
Color
.Empty };
3841
yield return new object[] { 0, CFE_EFFECTS.CFE_AUTOBACKCOLOR, 0x78563412,
Color
.Red };
3842
yield return new object[] { 0, CFE_EFFECTS.CFE_AUTOBACKCOLOR | CFE_EFFECTS.CFE_ALLCAPS, 0x78563412,
Color
.Red };
3843
yield return new object[] { CFM_MASK.CFM_BACKCOLOR, 0, 0x78563412,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
3844
yield return new object[] { CFM_MASK.CFM_BACKCOLOR, 0, 0x785634,
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78) };
3845
yield return new object[] { CFM_MASK.CFM_BACKCOLOR | CFM_MASK.CFM_ANIMATION, 0, 0x78563412,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
3846
yield return new object[] { CFM_MASK.CFM_BACKCOLOR, CFE_EFFECTS.CFE_AUTOBACKCOLOR, 0x78563412,
Color
.Red };
3847
yield return new object[] { CFM_MASK.CFM_ALLCAPS, 0, 0x78563412,
Color
.Empty };
3852
public void RichTextBox_SelectionBackColor_CustomGetCharFormat_ReturnsExpected(uint mask, uint effects, int backColor,
Color
expected)
3863
BackColor =
Color
.Red
3872
public void RichTextBox_SelectionBackColor_CustomGetCharFormatWithBackColor_ReturnsExpected(uint mask, uint effects, int backColor,
Color
expected)
3883
BackColor =
Color
.Red
3886
control.SelectionBackColor =
Color
.Yellow;
3895
Assert.Equal(
Color
.Empty, control.SelectionBackColor);
3904
Assert.Equal(
Color
.Empty, control.SelectionBackColor);
3909
yield return new object[] {
Color
.Empty };
3910
yield return new object[] {
Color
.Red };
3911
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78) };
3916
public void RichTextBox_SelectionBackColor_Set_GetReturnsExpected(
Color
value)
3933
yield return new object[] {
Color
.Empty, SystemColors.Window };
3934
yield return new object[] {
Color
.Red,
Color
.Red };
3935
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78) };
3940
public void RichTextBox_SelectionBackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
3973
control.SelectionBackColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
3984
yield return new object[] {
Color
.Empty };
3985
yield return new object[] {
Color
.Red };
3986
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78) };
3991
public void RichTextBox_SelectionBackColor_SetCantCreateHandle_GetReturnsExpected(
Color
value)
4006
public void RichTextBox_SelectionBackColor_SetDisposed_ThrowsObjectDisposedException(
Color
value)
4479
Assert.Equal(
Color
.Black, control.SelectionColor);
4483
Assert.Equal(
Color
.Black, control.SelectionColor);
4499
Assert.Equal(
Color
.Black, control.SelectionColor);
4506
Assert.Equal(
Color
.Black, control.SelectionColor);
4515
yield return new object[] { CFM_MASK.CFM_COLOR, 0x785634,
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78) };
4516
yield return new object[] { CFM_MASK.CFM_COLOR, 0x78563412,
Color
.FromArgb(0xFF, 0x12, 0x34, 0x56) };
4517
yield return new object[] { CFM_MASK.CFM_COLOR, 0,
Color
.Black };
4519
yield return new object[] { 0, 0x785634,
Color
.Empty };
4520
yield return new object[] { 0, 0x78563412,
Color
.Empty };
4521
yield return new object[] { 0, 0,
Color
.Empty };
4526
public void RichTextBox_SelectionColor_CustomGetCharFormat_Success(uint mask, int textColor,
Color
expected)
4547
Assert.Equal(
Color
.Empty, control.SelectionColor);
4561
yield return new object[] {
Color
.Empty,
Color
.Black };
4562
yield return new object[] {
Color
.Red,
Color
.Red };
4563
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78),
Color
.FromArgb(0xFF, 0x34, 0x56, 0x78) };
4568
public void RichTextBox_SelectionColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
4585
public void RichTextBox_SelectionColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
4618
control.SelectionColor =
Color
.FromArgb(0x12, 0x34, 0x56, 0x78);
4629
yield return new object[] {
Color
.Empty };
4630
yield return new object[] {
Color
.Red };
4631
yield return new object[] {
Color
.FromArgb(0x12, 0x34, 0x56, 0x78) };
4636
public void RichTextBox_SelectionColor_SetCantCreateHandle_GetReturnsExpected(
Color
value)
4640
Assert.Equal(
Color
.Empty, control.SelectionColor);
4645
Assert.Equal(
Color
.Empty, control.SelectionColor);
4651
public void RichTextBox_SelectionColor_SetDisposed_ThrowsObjectDisposedException(
Color
value)
System\Windows\Forms\ScrollableControlTests.cs (64)
1516
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout };
1517
yield return new object[] { hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout };
1518
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout };
1519
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout };
1520
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout };
1521
yield return new object[] { hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout };
1530
public void ScrollableControl_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
1589
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1590
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1591
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1592
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1593
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1594
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1598
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1599
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1600
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
1601
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
1602
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1603
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1605
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1606
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1607
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
1608
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
1609
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1610
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1632
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1633
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1634
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1635
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1643
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1644
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1648
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1649
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1650
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
1651
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
1652
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1653
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1655
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1656
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1657
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1658
yield return new object[] { parentFactory(), hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1659
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1660
yield return new object[] { parentFactory(), hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1677
public void ScrollableControl_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
1729
public void ScrollableControl_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
1789
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1790
yield return new object[] { hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1791
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1792
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
1793
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
1794
yield return new object[] { hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
1798
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1799
yield return new object[] { hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1800
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
1801
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
1802
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1803
yield return new object[] { hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1805
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1806
yield return new object[] { hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1807
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1808
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1809
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1810
yield return new object[] { hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1817
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)
196
public void ScrollBar_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
225
control.BackColor =
Color
.Red;
226
Assert.Equal(
Color
.Red, control.BackColor);
230
control.BackColor =
Color
.Red;
231
Assert.Equal(
Color
.Red, control.BackColor);
235
control.BackColor =
Color
.Empty;
241
control.BackColor =
Color
.Red;
242
Assert.Equal(
Color
.Red, control.BackColor);
545
public void ScrollBar_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
574
control.ForeColor =
Color
.Red;
575
Assert.Equal(
Color
.Red, control.ForeColor);
579
control.ForeColor =
Color
.Red;
580
Assert.Equal(
Color
.Red, control.ForeColor);
584
control.ForeColor =
Color
.Empty;
590
control.ForeColor =
Color
.Red;
591
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\SplitterTests.cs (16)
797
public void Splitter_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
814
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
815
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
816
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
821
public void Splitter_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
862
control.ForeColor =
Color
.Red;
863
Assert.Equal(
Color
.Red, control.ForeColor);
867
control.ForeColor =
Color
.Red;
868
Assert.Equal(
Color
.Red, control.ForeColor);
872
control.ForeColor =
Color
.Empty;
878
control.ForeColor =
Color
.Red;
879
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\StatusStripTests.cs (1)
1189
Assert.Equal(
Color
.Transparent, grip.BackColor);
System\Windows\Forms\StatusStripTests.Rendering.cs (5)
19
BackColor =
Color
.Blue,
47
Validate.BitBltValidator(bitBltBounds, State.BrushColor(
Color
.Blue)),
48
Validate.Polyline16(polylineBounds, null, State.Pen(16,
Color
.Green, penStyle)));
55
public override
Color
StatusStripBorder =>
Color
.Green;
System\Windows\Forms\TabControlTests.cs (25)
530
yield return new object[] {
Color
.Red };
531
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
532
yield return new object[] {
Color
.Empty };
537
public void TabControl_BackColor_Set_GetReturnsExpected(
Color
value)
554
public void TabControl_BackColor_SetWithHandle_GetReturnsExpected(
Color
value)
596
control.BackColor =
Color
.Red;
601
control.BackColor =
Color
.Red;
606
control.BackColor =
Color
.Empty;
612
control.BackColor =
Color
.Red;
924
public void TabControl_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
941
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
942
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
943
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
948
public void TabControl_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
990
control.ForeColor =
Color
.Red;
991
Assert.Equal(
Color
.Red, control.ForeColor);
995
control.ForeColor =
Color
.Red;
996
Assert.Equal(
Color
.Red, control.ForeColor);
1000
control.ForeColor =
Color
.Empty;
1006
control.ForeColor =
Color
.Red;
1007
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\TabPageTests.cs (74)
601
Assert.Equal(
Color
.Transparent, control.BackColor);
613
yield return new object[] { true, TabAppearance.Normal,
Color
.Transparent };
621
public static void TabPage_BackColor_GetVisualStylesWithParent_ReturnsExpected(bool useVisualStyleBackColorParam, TabAppearance parentAppearanceParam,
Color
expectedParam)
628
Color
expected =
Color
.FromArgb(int.Parse(expectedString));
647
public void TabPage_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
664
public void TabPage_BackColor_SetWithUseVisualStyleBackColor_GetReturnsExpected(
Color
value,
Color
expected)
684
public void TabPage_BackColor_SetDesignMode_GetReturnsExpected(
Color
value,
Color
expected)
726
public void TabPage_BackColor_SetDesignModeWithUseVisualStyleBackColor_GetReturnsExpected(
Color
value,
Color
expected)
769
public void TabPage_BackColor_SetDesignModeWithInvalidDescriptor_GetReturnsExpected(
Color
value,
Color
expected)
828
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
829
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
834
public void TabPage_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
875
control.BackColor =
Color
.Red;
876
Assert.Equal(
Color
.Red, control.BackColor);
880
control.BackColor =
Color
.Red;
881
Assert.Equal(
Color
.Red, control.BackColor);
885
control.BackColor =
Color
.Empty;
891
control.BackColor =
Color
.Red;
892
Assert.Equal(
Color
.Red, control.BackColor);
2286
control.BackColor =
Color
.FromArgb(254, 255, 255, 255);
3964
yield return new object[] { true,
Color
.Empty, backgroundImage, backgroundImageLayout };
3965
yield return new object[] { true,
Color
.Red, backgroundImage, backgroundImageLayout };
3966
yield return new object[] { true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout };
3967
yield return new object[] { true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout };
3968
yield return new object[] { false,
Color
.Empty, backgroundImage, backgroundImageLayout };
3969
yield return new object[] { false,
Color
.Red, backgroundImage, backgroundImageLayout };
3976
public void TabPage_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
4018
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4019
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4020
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4021
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4022
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4023
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4027
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4028
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4029
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4030
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4031
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4032
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4034
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4035
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4036
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4037
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4038
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4039
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4046
public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
4102
public void TabPage_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
4157
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4158
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4159
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4160
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
4161
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
4162
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
4166
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4167
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4168
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4169
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
4170
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4171
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4173
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4174
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4175
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4176
yield return new object[] { appearance, useVisualStyleBackColor, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4177
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4178
yield return new object[] { appearance, useVisualStyleBackColor, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4185
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)
23
yield return new object[] { hint, text, null, Point.Empty,
Color
.Red };
24
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Red };
25
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Black };
26
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.White };
27
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Transparent };
28
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Empty };
35
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt,
Color
foreColor)
52
yield return new object[] { hint, text, null, Point.Empty,
Color
.Red,
Color
.Blue };
53
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Red,
Color
.Blue };
54
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Black,
Color
.Blue };
55
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.White,
Color
.Blue };
56
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Transparent,
Color
.Blue };
57
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Empty,
Color
.Blue };
58
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Red };
59
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Black };
60
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.White };
61
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Transparent };
62
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Empty };
69
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt,
Color
foreColor,
Color
backColor)
86
yield return new object[] { hint, text, null, Point.Empty,
Color
.Red, TextFormatFlags.Default, };
87
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Red, TextFormatFlags.Default, };
88
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Black, TextFormatFlags.Default, };
89
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.White, TextFormatFlags.Default, };
90
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Transparent, TextFormatFlags.Default, };
91
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Empty, TextFormatFlags.Default, };
93
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.HorizontalCenter };
94
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
95
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.Bottom | TextFormatFlags.Right };
96
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.SingleLine };
97
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, (TextFormatFlags)1024 };
98
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.RightToLeft };
99
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red, (TextFormatFlags)int.MaxValue };
106
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt,
Color
foreColor, TextFormatFlags flags)
123
yield return new object[] { hint, text, null, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
124
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
125
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Black,
Color
.Blue, TextFormatFlags.Default, };
126
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.White,
Color
.Blue, TextFormatFlags.Default, };
127
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Transparent,
Color
.Blue, TextFormatFlags.Default, };
128
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2),
Color
.Empty,
Color
.Blue, TextFormatFlags.Default, };
129
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Red, TextFormatFlags.Default, };
130
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Black, TextFormatFlags.Default, };
131
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.White, TextFormatFlags.Default, };
132
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Transparent, TextFormatFlags.Default, };
133
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Empty, TextFormatFlags.Default, };
135
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
136
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right };
137
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.SingleLine };
138
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, (TextFormatFlags)1024 };
139
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.RightToLeft };
140
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, (TextFormatFlags)int.MaxValue };
147
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt,
Color
foreColor,
Color
backColor, TextFormatFlags flags)
164
yield return new object[] { hint, text, null, Rectangle.Empty,
Color
.Red };
165
yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4),
Color
.Red };
166
yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red };
167
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 3, 4),
Color
.Red };
168
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red };
169
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Black };
170
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.White };
171
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Transparent };
172
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Empty };
179
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle bounds,
Color
foreColor)
196
yield return new object[] { hint, text, null, Rectangle.Empty,
Color
.Red,
Color
.Blue };
197
yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4),
Color
.Red,
Color
.Blue };
198
yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red,
Color
.Blue };
199
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue };
200
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Black,
Color
.Blue };
201
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.White,
Color
.Blue };
202
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Transparent,
Color
.Blue };
203
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Empty,
Color
.Blue };
204
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Red };
205
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Black };
206
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.White };
207
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Transparent };
208
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Empty };
215
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle,
Color
foreColor,
Color
backColor)
232
yield return new object[] { hint, text, null, Rectangle.Empty,
Color
.Red, TextFormatFlags.Default, };
233
yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4),
Color
.Red, TextFormatFlags.Default, };
234
yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red, TextFormatFlags.Default, };
235
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.Default, };
236
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Black, TextFormatFlags.Default, };
237
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.White, TextFormatFlags.Default, };
238
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Transparent, TextFormatFlags.Default, };
239
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Empty, TextFormatFlags.Default, };
241
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.HorizontalCenter };
242
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
243
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.Bottom | TextFormatFlags.Right };
244
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.SingleLine };
245
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red, TextFormatFlags.SingleLine };
246
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, (TextFormatFlags)1024 };
247
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.RightToLeft };
248
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, (TextFormatFlags)int.MaxValue };
255
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle,
Color
foreColor, TextFormatFlags flags)
272
yield return new object[] { hint, text, null, Rectangle.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
273
yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4),
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
274
yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Blue,
Color
.Blue, TextFormatFlags.Default, };
275
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.Default, };
276
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Black,
Color
.Blue, TextFormatFlags.Default, };
277
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.White,
Color
.Blue, TextFormatFlags.Default, };
278
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Transparent,
Color
.Blue, TextFormatFlags.Default, };
279
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Empty,
Color
.Blue, TextFormatFlags.Default, };
280
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Red, TextFormatFlags.Default, };
281
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Black, TextFormatFlags.Default, };
282
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.White, TextFormatFlags.Default, };
283
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Transparent, TextFormatFlags.Default, };
284
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Empty, TextFormatFlags.Default, };
286
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
287
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right };
288
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.SingleLine };
289
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue),
Color
.Red,
Color
.Blue, TextFormatFlags.SingleLine };
290
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, (TextFormatFlags)1024 };
291
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.RightToLeft };
292
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, (TextFormatFlags)int.MaxValue };
299
public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle,
Color
foreColor,
Color
backColor, TextFormatFlags flags)
325
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red);
329
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue);
333
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.Default);
337
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Default);
341
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red);
345
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.Default);
349
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue);
353
TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.Default);
357
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty,
Color
.Red);
361
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue);
365
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty,
Color
.Red, TextFormatFlags.Default);
369
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty,
Color
.Red,
Color
.Blue, TextFormatFlags.Default);
373
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red);
377
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red, TextFormatFlags.Default);
381
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue);
385
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400),
Color
.Red,
Color
.Blue, TextFormatFlags.Default);
393
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.DrawText(null, "text", SystemFonts.MenuFont, Point.Empty,
Color
.Red));
585
State.TextColor(
Color
.Blue),
594
pt: default,
Color
.Blue),
597
pt: default,
Color
.Blue, flags: default),
600
bounds: new Rectangle(0, 0, int.MaxValue, int.MaxValue),
Color
.Blue),
603
bounds: new Rectangle(0, 0, int.MaxValue, int.MaxValue),
Color
.Blue, flags: default),
622
Color
.Empty,
629
Color
.Empty,
630
Color
.Empty,
637
Color
.Empty,
644
Color
.Empty,
645
Color
.Empty,
680
Color
.Red,
689
State.TextColor(
Color
.Red)));
703
Color
.Red,
712
State.TextColor(
Color
.Red)));
773
Color
.Red,
788
State.TextColor(
Color
.Red)));
System\Windows\Forms\ToolStripArrowRenderEventArgsTests.cs (11)
16
Assert.Throws<ArgumentNullException>(() => new ToolStripArrowRenderEventArgs(null, toolStripButton, Rectangle.Empty,
Color
.Empty, ArrowDirection.Up));
23
yield return new object[] { graphics, null, Rectangle.Empty,
Color
.Empty, ArrowDirection.Down + 1 };
24
yield return new object[] { graphics, new ToolStripButton(), new Rectangle(1, 2, 3, 4),
Color
.Blue, ArrowDirection.Down };
25
yield return new object[] { graphics, new ToolStripButton(), new Rectangle(-1, -2, -3, -4),
Color
.Blue, ArrowDirection.Down };
30
public void Ctor_Graphics_ToolStripItem_Rectangle_Color_ArrowDirection(Graphics g, ToolStripItem toolStripItem, Rectangle arrowRectangle,
Color
arrowColor, ArrowDirection arrowDirection)
54
ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4),
Color
.Blue, ArrowDirection.Down)
63
yield return new object[] {
Color
.Empty };
64
yield return new object[] {
Color
.Red };
69
public void ArrowColor_Set_GetReturnsExpected(
Color
value)
74
ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4),
Color
.Blue, ArrowDirection.Down)
89
ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4),
Color
.Blue, ArrowDirection.Down)
System\Windows\Forms\ToolStripButtonTests.cs (11)
66
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
147
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
234
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
324
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
412
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
510
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
1280
ForeColor =
Color
.Red,
1318
Assert.Equal(
Color
.Red, e.TextColor);
1371
ForeColor =
Color
.Red,
1409
Assert.Equal(
Color
.Red, e.TextColor);
1470
ForeColor =
Color
.Red,
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (2)
46
BackColor =
Color
.Blue,
62
State.Brush(
Color
.Blue, BRUSH_STYLE.BS_SOLID)));
System\Windows\Forms\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapterTests.cs (7)
53
Color
result = (
Color
)_adapter.TestAccessor().Dynamic.GetOuterBorderColor(_comboBox);
55
result.Should().Be(
Color
.FromKnownColor(expectedColor));
67
Color
result = (
Color
)_adapter.TestAccessor().Dynamic.GetPopupOuterBorderColor(_comboBox, focused);
69
result.Should().Be(
Color
.FromKnownColor(expectedColor));
81
bitmap.GetPixel(50, 50).Should().NotBe(
Color
.Empty);
System\Windows\Forms\ToolStripContentPanelTests.cs (33)
610
public void ToolStripContentPanel_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
627
yield return new object[] {
Color
.Empty,
Color
.Blue };
628
yield return new object[] {
Color
.Red,
Color
.Red };
629
yield return new object[] {
Color
.Transparent,
Color
.Transparent };
634
public void ToolStripContentPanel_BackColor_SetWithParent_GetReturnsExpected(
Color
value,
Color
expected)
638
BackColor =
Color
.Blue
646
Assert.Equal(
Color
.Blue, parent.BackColor);
652
Assert.Equal(
Color
.Blue, parent.BackColor);
659
yield return new object[] {
Color
.Empty,
Color
.Blue,
Color
.Blue };
660
yield return new object[] {
Color
.Red,
Color
.Red,
Color
.Blue };
661
yield return new object[] {
Color
.Transparent,
Color
.Transparent,
Color
.Transparent };
666
public void ToolStripContentPanel_BackColor_SetWithToolStripContainerParent_GetReturnsExpected(
Color
value,
Color
expected,
Color
expectedBackColor)
670
BackColor =
Color
.Blue
701
control.BackColor =
Color
.Red;
702
Assert.Equal(
Color
.Red, control.BackColor);
706
control.BackColor =
Color
.Red;
707
Assert.Equal(
Color
.Red, control.BackColor);
711
control.BackColor =
Color
.Empty;
717
control.BackColor =
Color
.Red;
718
Assert.Equal(
Color
.Red, control.BackColor);
System\Windows\Forms\ToolStripControlHostTests.cs (49)
29
BackColor =
Color
.Red,
34
ForeColor =
Color
.Blue,
95
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
266
public void ToolStripControlHost_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
299
item.BackColor =
Color
.Red;
300
Assert.Equal(
Color
.Red, item.BackColor);
304
item.BackColor =
Color
.Red;
305
Assert.Equal(
Color
.Red, item.BackColor);
309
item.BackColor =
Color
.Empty;
315
item.BackColor =
Color
.Red;
316
Assert.Equal(
Color
.Red, item.BackColor);
327
Assert.Throws<ObjectDisposedException>(() => item.BackColor =
Color
.Red);
338
item.BackColor =
Color
.Red;
339
Assert.Equal(
Color
.Red, item.BackColor);
369
item.BackColor =
Color
.Red;
370
Assert.Equal(
Color
.Red, item.BackColor);
548
c.BackColor =
Color
.Red;
549
Assert.Equal(
Color
.Red, c.BackColor);
550
Assert.Equal(
Color
.Red, item.BackColor);
631
c.ForeColor =
Color
.Red;
632
Assert.Equal(
Color
.Red, c.ForeColor);
633
Assert.Equal(
Color
.Red, item.ForeColor);
1085
public void ToolStripControlHost_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1118
item.ForeColor =
Color
.Red;
1119
Assert.Equal(
Color
.Red, item.ForeColor);
1123
item.ForeColor =
Color
.Red;
1124
Assert.Equal(
Color
.Red, item.ForeColor);
1128
item.ForeColor =
Color
.Empty;
1134
item.ForeColor =
Color
.Red;
1135
Assert.Equal(
Color
.Red, item.ForeColor);
1146
Assert.Throws<ObjectDisposedException>(() => item.ForeColor =
Color
.Red);
1157
item.ForeColor =
Color
.Red;
1158
Assert.Equal(
Color
.Red, item.ForeColor);
1188
item.ForeColor =
Color
.Red;
1189
Assert.Equal(
Color
.Red, item.ForeColor);
1209
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
1220
public void ToolStripControlHost_Image_Set_GetReturnsExpected(
Color
imageTransparentColor, Image value)
1335
foreach (
Color
color in new
Color
[] {
Color
.Empty,
Color
.Red })
1346
public void ToolStripControlHost_ImageTransparentColor_Set_GetReturnsExpected(Image image,
Color
value)
4399
item.BackColor =
Color
.Black;
4432
item.ForeColor =
Color
.Black;
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
66
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
155
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
254
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
362
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
System\Windows\Forms\ToolStripDropDownTests.cs (9)
1709
public void ToolStripDropDown_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1738
control.ForeColor =
Color
.Red;
1739
Assert.Equal(
Color
.Red, control.ForeColor);
1743
control.ForeColor =
Color
.Red;
1744
Assert.Equal(
Color
.Red, control.ForeColor);
1748
control.ForeColor =
Color
.Empty;
1754
control.ForeColor =
Color
.Red;
1755
Assert.Equal(
Color
.Red, control.ForeColor);
System\Windows\Forms\ToolStripItemTests.cs (120)
65
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
150
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
245
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
1550
BackColor =
Color
.Red
1564
BackColor =
Color
.Red
1570
Assert.Equal(
Color
.Red, item.BackColor);
1575
public void ToolStripItem_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1590
public void ToolStripItem_BackColor_SetWithOwner_GetReturnsExpected(
Color
value,
Color
expected)
1610
public void ToolStripItem_BackColor_SetWithOwnerWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1643
public void ToolStripItem_BackColor_SetWithParent_GetReturnsExpected(
Color
value,
Color
expected)
1663
yield return new object[] {
Color
.Empty, Control.DefaultBackColor, 0 };
1664
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1669
public void ToolStripItem_BackColor_SetWithParentWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1714
item.BackColor =
Color
.Red;
1715
Assert.Equal(
Color
.Red, item.BackColor);
1719
item.BackColor =
Color
.Red;
1720
Assert.Equal(
Color
.Red, item.BackColor);
1724
item.BackColor =
Color
.Empty;
1730
item.BackColor =
Color
.Red;
1731
Assert.Equal(
Color
.Red, item.BackColor);
1742
item.BackColor =
Color
.Red;
1743
Assert.Equal(
Color
.Red, item.BackColor);
1758
item.BackColor =
Color
.Red;
1759
Assert.Equal(
Color
.Red, item.BackColor);
3240
ForeColor =
Color
.Red
3254
ForeColor =
Color
.Red
3260
Assert.Equal(
Color
.Red, item.ForeColor);
3265
public void ToolStripItem_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
3280
public void ToolStripItem_ForeColor_SetWithOwner_GetReturnsExpected(
Color
value,
Color
expected)
3300
public void ToolStripItem_ForeColor_SetWithOwnerWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
3333
public void ToolStripItem_ForeColor_SetWithParent_GetReturnsExpected(
Color
value,
Color
expected)
3353
yield return new object[] {
Color
.Empty, Control.DefaultForeColor, 0 };
3354
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
3355
yield return new object[] {
Color
.White,
Color
.White, 1 };
3356
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
3357
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
3362
public void ToolStripItem_ForeColor_SetWithParentWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
3407
item.ForeColor =
Color
.Red;
3408
Assert.Equal(
Color
.Red, item.ForeColor);
3412
item.ForeColor =
Color
.Red;
3413
Assert.Equal(
Color
.Red, item.ForeColor);
3417
item.ForeColor =
Color
.Empty;
3423
item.ForeColor =
Color
.Red;
3424
Assert.Equal(
Color
.Red, item.ForeColor);
3435
item.ForeColor =
Color
.Red;
3436
Assert.Equal(
Color
.Red, item.ForeColor);
3451
item.ForeColor =
Color
.Red;
3452
Assert.Equal(
Color
.Red, item.ForeColor);
3783
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
3794
public void ToolStripItem_Image_Set_GetReturnsExpected(
Color
imageTransparentColor, Image value)
3813
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
3824
public void ToolStripItem_Image_SetWithImageIndex_GetReturnsExpected(
Color
imageTransparentColor, Image value, int expectedImageIndex)
3844
public void ToolStripItem_Image_SetWithNonNullOldValue_GetReturnsExpected(
Color
imageTransparentColor, Image value)
3865
public void ToolStripItem_Image_SetWithNonNullOldValueWithImageIndex_GetReturnsExpected(
Color
imageTransparentColor, Image value, int expectedImageIndex)
3887
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
3898
public void ToolStripItem_Image_SetWithOwner_GetReturnsExpected(
Color
imageTransparentColor, Image value, int expectedOwnerLayoutCallCount)
3943
public void ToolStripItem_Image_SetWithOwnerWithHandle_GetReturnsExpected(
Color
imageTransparentColor, Image value, int expectedOwnerLayoutCallCount)
4001
public void ToolStripItem_Image_SetWithParent_GetReturnsExpected(
Color
imageTransparentColor, Image value)
4036
public void ToolStripItem_Image_SetWithParentWithHandle_GetReturnsExpected(
Color
imageTransparentColor, Image value)
5601
foreach (
Color
color in new
Color
[] {
Color
.Empty,
Color
.Red })
5612
public void ToolStripItem_ImageTransparentColor_Set_GetReturnsExpected(Image image,
Color
value)
5629
public void ToolStripItem_ImageTransparentColor_SetWithCustomOldValue_GetReturnsExpected(Image image,
Color
value)
5634
ImageTransparentColor =
Color
.Red
5647
public void ToolStripItem_ImageTransparentColor_SetWithOwner_GetReturnsExpected(Image image,
Color
value)
5668
yield return new object[] { null,
Color
.Empty, 0 };
5669
yield return new object[] { null,
Color
.Red, 0 };
5670
yield return new object[] { new Bitmap(10, 10),
Color
.Empty, 0 };
5671
yield return new object[] { new Bitmap(10, 10),
Color
.Red, 1 };
5672
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "nature24bits.gif")),
Color
.Empty, 0 };
5673
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "nature24bits.gif")),
Color
.Red, 1 };
5674
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "10x16_one_entry_32bit.ico")),
Color
.Empty, 0 };
5675
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "10x16_one_entry_32bit.ico")),
Color
.Red, 1 };
5680
public void ToolStripItem_ImageTransparentColor_SetWithOwnerWithHandle_GetReturnsExpected(Image image,
Color
value, int expectedInvalidatedCallCount)
5714
public void ToolStripItem_ImageTransparentColor_SetWithParent_GetReturnsExpected(Image image,
Color
value)
5735
yield return new object[] { null,
Color
.Empty, 0 };
5736
yield return new object[] { null,
Color
.Red, 1 };
5737
yield return new object[] { new Bitmap(10, 10),
Color
.Empty, 0 };
5738
yield return new object[] { new Bitmap(10, 10),
Color
.Red, 1 };
5739
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "nature24bits.gif")),
Color
.Empty, 0 };
5740
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "nature24bits.gif")),
Color
.Red, 1 };
5741
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "10x16_one_entry_32bit.ico")),
Color
.Empty, 0 };
5742
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "10x16_one_entry_32bit.ico")),
Color
.Red, 1 };
5747
public void ToolStripItem_ImageTransparentColor_SetWithParentWithHandle_GetReturnsExpected(Image image,
Color
value, int expectedParentInvalidatedCallCount)
5786
item.ImageTransparentColor =
Color
.Red;
5787
Assert.Equal(
Color
.Red, item.ImageTransparentColor);
5791
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
5802
item.ImageTransparentColor =
Color
.Red;
5803
Assert.Equal(
Color
.Red, item.ImageTransparentColor);
5807
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
12508
item.BackColor =
Color
.Red;
12602
item.ForeColor =
Color
.Red;
14088
item.BackColor =
Color
.Black;
14151
item.ForeColor =
Color
.Black;
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (15)
14
yield return new object[] { new ToolStripButton(), null, Rectangle.Empty,
Color
.Empty, null, TextFormatFlags.Top - 1 };
15
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, TextFormatFlags.Top };
16
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, TextFormatFlags.Bottom };
21
public void Ctor_ToolStripItem_String_Rectangle_Color_Font_TextFormatFlags(ToolStripItem item, string text, Rectangle textRectangle,
Color
textColor, Font textFont, TextFormatFlags format)
39
yield return new object[] { new ToolStripButton(), null, Rectangle.Empty,
Color
.Empty, null, ContentAlignment.TopLeft - 1, TextFormatFlags.Default | TextFormatFlags.Top | TextFormatFlags.HidePrefix };
40
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 };
41
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 };
42
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 };
47
public void Ctor_ToolStripItem_String_Rectangle_Color_Font_ContentAlignment(ToolStripItem item, string text, Rectangle textRectangle,
Color
textColor, Font textFont, ContentAlignment textAlign, TextFormatFlags expectedTextFormat)
68
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, TextFormatFlags.Top));
69
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.DefaultFont, ContentAlignment.TopLeft));
74
yield return new object[] {
Color
.Empty };
75
yield return new object[] {
Color
.Red };
80
public void TextColor_Set_GetReturnsExpected(
Color
value)
84
ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4),
Color
.Blue, SystemFonts.DefaultFont, TextFormatFlags.Top)
System\Windows\Forms\ToolStripLabelTests.cs (19)
104
Color
expectedColor =
Color
.Red;
142
Color
expectedColor =
Color
.Green;
152
Color
defaultColor = accessor.IEVisitedLinkColor;
160
Color
expectedColor =
Color
.Blue;
195
_toolStripLabel.ActiveLinkColor =
Color
.Red;
200
Color
defaultColor = accessor.IEActiveLinkColor;
208
_toolStripLabel.LinkColor =
Color
.Blue;
213
Color
defaultColor = accessor.IELinkColor;
218
public static TheoryData<string,
Color
, bool> ShouldSerializeColorData =>
221
{ nameof(ToolStripLabel.ActiveLinkColor),
Color
.Red, true },
222
{ nameof(ToolStripLabel.ActiveLinkColor),
Color
.Empty, false },
223
{ nameof(ToolStripLabel.LinkColor),
Color
.Blue, true },
224
{ nameof(ToolStripLabel.LinkColor),
Color
.Empty, false },
225
{ nameof(ToolStripLabel.VisitedLinkColor),
Color
.Green, true },
226
{ nameof(ToolStripLabel.VisitedLinkColor),
Color
.Empty, false }
231
public void ToolStripLabel_ShouldSerializeColor_ReturnsExpected(string propertyName,
Color
color, bool expected)
System\Windows\Forms\ToolStripMenuItemTests.cs (4)
66
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
274
BackColor =
Color
.Red,
285
ForeColor =
Color
.Blue,
289
ImageTransparentColor =
Color
.Green,
System\Windows\Forms\ToolStripRendererTests.cs (21)
32
yield return new object[] { null, Rectangle.Empty,
Color
.Empty, arrowDirection };
33
yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4),
Color
.Red, arrowDirection };
36
yield return new object[] { null, Rectangle.Empty,
Color
.Empty, ArrowDirection.Left - 1 };
37
yield return new object[] { null, Rectangle.Empty,
Color
.Empty, ArrowDirection.Up + 1 };
38
yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4),
Color
.Red, ArrowDirection.Left - 1 };
39
yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4),
Color
.Red, ArrowDirection.Up + 1 };
44
public void ToolStripRenderer_DrawArrow_Invoke_CallsRenderArrow(ToolStripItem toolStripItem, Rectangle arrowRectangle,
Color
arrowColor, ArrowDirection arrowDirection)
296
yield return new object[] { new SubToolStripItem(), null, Rectangle.Empty,
Color
.Empty, null, TextFormatFlags.Left };
297
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 0, 4),
Color
.Empty, null, TextFormatFlags.Left };
298
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 0),
Color
.Empty, null, TextFormatFlags.Left };
299
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 4),
Color
.Empty, null, TextFormatFlags.Left };
301
yield return new object[] { new SubToolStripItem(), "Text", Rectangle.Empty,
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
302
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 0, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
303
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 0),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
304
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
305
yield return new object[] { new SubToolStripItem() { Enabled = false }, "Text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
306
yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical270 }, "Text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
307
yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical90 }, "Text", new Rectangle(1, 2, 3, 4),
Color
.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
312
public void ToolStripRenderer_DrawItemText_Invoke_CallsRenderItemText(ToolStripItem item, string text, Rectangle textRectangle,
Color
textColor, Font textFont, TextFormatFlags format)
724
public void ToolStripRenderer_OnRenderArrow_Invoke_Nop(ToolStripItem toolStripItem, Rectangle arrowRectangle,
Color
arrowColor, ArrowDirection arrowDirection)
841
public void ToolStripRenderer_OnRenderItemText_Invoke_Nop(ToolStripItem item, string text, Rectangle textRectangle,
Color
textColor, Font textFont, TextFormatFlags format)
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (15)
32
yield return new object[] { new ToolStrip() { BackColor =
Color
.Red }, new Rectangle(0, 0, 100, 25),
Color
.Red };
39
public void ToolStripRenderEventArgs_Ctor_Graphics_ToolStrip(ToolStrip toolStrip, Rectangle expectedAffectedBounds,
Color
expectedBackColor)
54
yield return new object[] { new ToolStrip(), new Rectangle(1, 2, 3, 4),
Color
.Empty, SystemColors.Control };
55
yield return new object[] { new ToolStrip() { BackColor =
Color
.Red }, new Rectangle(1, 2, 3, 4),
Color
.Empty,
Color
.Red };
56
yield return new object[] { new ToolStripDropDown(), new Rectangle(1, 2, 3, 4),
Color
.Empty, SystemColors.Menu };
57
yield return new object[] { new MenuStrip(), new Rectangle(1, 2, 3, 4),
Color
.Empty, SystemColors.MenuBar };
58
yield return new object[] { new ToolStrip() { BackColor =
Color
.Red }, new Rectangle(1, 2, 3, 4),
Color
.Blue,
Color
.Blue };
63
public void ToolStripRenderEventArgs_Ctor_Graphics_ToolStrip_Rectangle_Color(ToolStrip toolStrip, Rectangle affectedBounds,
Color
backColor,
Color
expectedBackColor)
96
ToolStripRenderEventArgs e = new(graphics, toolStrip, new Rectangle(1, 2, 3, 4),
Color
.Empty);
System\Windows\Forms\ToolStripSeparatorTests.cs (24)
63
Assert.Equal(
Color
.Empty, item.ImageTransparentColor);
337
public void ToolStripSeparator_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
364
item.ForeColor =
Color
.Red;
365
Assert.Equal(
Color
.Red, item.ForeColor);
369
item.ForeColor =
Color
.Red;
370
Assert.Equal(
Color
.Red, item.ForeColor);
374
item.ForeColor =
Color
.Empty;
380
item.ForeColor =
Color
.Red;
381
Assert.Equal(
Color
.Red, item.ForeColor);
392
item.ForeColor =
Color
.Red;
393
Assert.Equal(
Color
.Red, item.ForeColor);
408
item.ForeColor =
Color
.Red;
409
Assert.Equal(
Color
.Red, item.ForeColor);
419
foreach (
Color
imageTransparentColor in new
Color
[] {
Color
.Empty,
Color
.Red })
430
public void ToolStripSeparator_Image_Set_GetReturnsExpected(
Color
imageTransparentColor, Image value)
529
foreach (
Color
color in new
Color
[] {
Color
.Empty,
Color
.Red })
540
public void ToolStripSeparator_ImageTransparentColor_Set_GetReturnsExpected(Image image,
Color
value)
System\Windows\Forms\ToolStripTests.cs (78)
1061
yield return new object[] {
Color
.Empty, Control.DefaultBackColor };
1062
yield return new object[] {
Color
.Red,
Color
.Red };
1067
public void ToolStrip_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
2674
public void ToolStrip_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
2703
control.ForeColor =
Color
.Red;
2704
Assert.Equal(
Color
.Red, control.ForeColor);
2708
control.ForeColor =
Color
.Red;
2709
Assert.Equal(
Color
.Red, control.ForeColor);
2713
control.ForeColor =
Color
.Empty;
2719
control.ForeColor =
Color
.Red;
2720
Assert.Equal(
Color
.Red, control.ForeColor);
5857
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout };
5858
yield return new object[] { hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout };
5859
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout };
5860
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout };
5861
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout };
5862
yield return new object[] { hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout };
5871
public void ToolStrip_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
5931
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
5932
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
5933
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
5934
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
5935
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
5936
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
5940
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5941
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5942
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
5943
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
5944
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5945
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5947
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5948
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5949
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
5950
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 };
5951
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5952
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5982
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, expected1 };
5983
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, expected1 };
5984
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, expected1 };
5985
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, expected1 };
5993
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
5994
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected };
5998
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
5999
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
6000
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
6001
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
6002
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected2 };
6003
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected2 };
6005
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6006
yield return new object[] { parent, hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6007
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6008
yield return new object[] { parent, hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6009
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6010
yield return new object[] { parent, hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6018
public void ToolStrip_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
6069
public void ToolStrip_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor,
Color
backColor, Image backgroundImage, ImageLayout backgroundImageLayout)
6128
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
6129
yield return new object[] { hScroll, vScroll, true,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
6130
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
6131
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 };
6132
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, backgroundImage, backgroundImageLayout, 0 };
6133
yield return new object[] { hScroll, vScroll, false,
Color
.Red, backgroundImage, backgroundImageLayout, 0 };
6137
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6138
yield return new object[] { hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6139
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
6140
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 };
6141
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6142
yield return new object[] { hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6144
yield return new object[] { hScroll, vScroll, true,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6145
yield return new object[] { hScroll, vScroll, true,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6146
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6147
yield return new object[] { hScroll, vScroll, true,
Color
.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6148
yield return new object[] { hScroll, vScroll, false,
Color
.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6149
yield return new object[] { hScroll, vScroll, false,
Color
.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6156
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)
19
BackColor =
Color
.Blue,
51
State.BrushColor(
Color
.Blue)),
System\Windows\Forms\ToolTipTests.cs (3)
282
public void ToolTip_BackColor_Set_GetReturnsExpected(
Color
value)
338
public void ToolTip_ForeColor_Set_GetReturnsExpected(
Color
value)
355
Assert.Throws<ArgumentException>("value", () => toolTip.ForeColor =
Color
.Empty);
System\Windows\Forms\TreeNodeCollectionTests.cs (2)
21
Assert.Equal(
Color
.Empty, treeNode.BackColor);
29
Assert.Equal(
Color
.Empty, treeNode.ForeColor);
System\Windows\Forms\TreeNodeTests.cs (56)
19
Assert.Equal(
Color
.Empty, node.BackColor);
24
Assert.Equal(
Color
.Empty, node.ForeColor);
59
Assert.Equal(
Color
.Empty, node.BackColor);
64
Assert.Equal(
Color
.Empty, node.ForeColor);
107
Assert.Equal(
Color
.Empty, node.BackColor);
112
Assert.Equal(
Color
.Empty, node.ForeColor);
150
Assert.Equal(
Color
.Empty, node.BackColor);
155
Assert.Equal(
Color
.Empty, node.ForeColor);
198
Assert.Equal(
Color
.Empty, node.BackColor);
203
Assert.Equal(
Color
.Empty, node.ForeColor);
265
public void TreeNode_BackColor_Set_GetReturnsExpected(
Color
value)
280
public void TreeNode_BackColor_SetWithTreeView_GetReturnsExpected(
Color
value)
298
yield return new object[] {
Color
.Empty, 0 };
299
yield return new object[] {
Color
.Red, 1 };
304
public void TreeNode_BackColor_SetWithTreeViewWithHandle_GetReturnsExpected(
Color
value, int expectedInvalidatedCallCount)
335
yield return new object[] {
Color
.Empty };
336
yield return new object[] {
Color
.Blue };
337
yield return new object[] {
Color
.Red };
342
public void TreeNode_BackColor_SetWithCustomOldValue_GetReturnsExpected(
Color
value)
346
BackColor =
Color
.Blue
359
public void TreeNode_BackColor_SetWithCustomOldValueWithTreeView_GetReturnsExpected(
Color
value)
364
BackColor =
Color
.Blue
380
yield return new object[] {
Color
.Empty, 1 };
381
yield return new object[] {
Color
.Red, 1 };
382
yield return new object[] {
Color
.Blue, 0 };
387
public void TreeNode_BackColor_SetWithCustomOldValueWithTreeViewWithHandle_GetReturnsExpected(
Color
value, int expectedInvalidatedCallCount)
392
BackColor =
Color
.Blue
426
node.BackColor =
Color
.Red;
427
Assert.Equal(
Color
.Red, node.BackColor);
431
Assert.Equal(
Color
.Red, node.BackColor);
442
node.BackColor =
Color
.Red;
443
Assert.Equal(
Color
.Red, node.BackColor);
447
Assert.Equal(
Color
.Red, node.BackColor);
706
public void TreeNode_ForeColor_Set_GetReturnsExpected(
Color
value)
721
public void TreeNode_ForeColor_SetWithTreeView_GetReturnsExpected(
Color
value)
739
yield return new object[] {
Color
.Empty, 0 };
740
yield return new object[] {
Color
.Red, 1 };
745
public void TreeNode_ForeColor_SetWithTreeViewWithHandle_GetReturnsExpected(
Color
value, int expectedInvalidatedCallCount)
776
yield return new object[] {
Color
.Empty };
777
yield return new object[] {
Color
.Blue };
778
yield return new object[] {
Color
.Red };
783
public void TreeNode_ForeColor_SetWithCustomOldValue_GetReturnsExpected(
Color
value)
787
ForeColor =
Color
.Blue
800
public void TreeNode_ForeColor_SetWithCustomOldValueWithTreeView_GetReturnsExpected(
Color
value)
805
ForeColor =
Color
.Blue
821
yield return new object[] {
Color
.Empty, 1 };
822
yield return new object[] {
Color
.Red, 1 };
823
yield return new object[] {
Color
.Blue, 0 };
828
public void TreeNode_ForeColor_SetWithCustomOldValueWithTreeViewWithHandle_GetReturnsExpected(
Color
value, int expectedInvalidatedCallCount)
833
ForeColor =
Color
.Blue
867
node.ForeColor =
Color
.Red;
868
Assert.Equal(
Color
.Red, node.ForeColor);
872
Assert.Equal(
Color
.Red, node.ForeColor);
883
node.ForeColor =
Color
.Red;
884
Assert.Equal(
Color
.Red, node.ForeColor);
888
Assert.Equal(
Color
.Red, node.ForeColor);
System\Windows\Forms\TreeViewTests.cs (57)
88
Assert.Equal(
Color
.Empty, control.LineColor);
700
yield return new object[] {
Color
.Empty, SystemColors.Window };
701
yield return new object[] {
Color
.Red,
Color
.Red };
706
public void TreeView_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
723
yield return new object[] {
Color
.Empty, SystemColors.Window, 0 };
724
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
729
public void TreeView_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
770
control.BackColor =
Color
.Red;
771
Assert.Equal(
Color
.Red, control.BackColor);
775
control.BackColor =
Color
.Red;
776
Assert.Equal(
Color
.Red, control.BackColor);
780
control.BackColor =
Color
.Empty;
786
control.BackColor =
Color
.Red;
787
Assert.Equal(
Color
.Red, control.BackColor);
1461
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1462
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1463
yield return new object[] {
Color
.White,
Color
.White };
1464
yield return new object[] {
Color
.Black,
Color
.Black };
1465
yield return new object[] {
Color
.Red,
Color
.Red };
1470
public void ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1485
public void ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1512
control.ForeColor =
Color
.Red;
1513
Assert.Equal(
Color
.Red, control.ForeColor);
1517
control.ForeColor =
Color
.Red;
1518
Assert.Equal(
Color
.Red, control.ForeColor);
1522
control.ForeColor =
Color
.Empty;
1528
control.ForeColor =
Color
.Red;
1529
Assert.Equal(
Color
.Red, control.ForeColor);
2958
public void LineColor_Set_GetReturnsExpected(
Color
value)
6022
BackColor =
Color
.Red,
6023
ForeColor =
Color
.Blue,
6024
LineColor =
Color
.Yellow,
6050
Assert.Equal(
Color
.Red, control.BackColor);
6051
Assert.Equal(
Color
.Blue, control.ForeColor);
6052
Assert.Equal(
Color
.Yellow, control.LineColor);
6068
Assert.Equal(
Color
.Red, control.BackColor);
6069
Assert.Equal(
Color
.Blue, control.ForeColor);
6070
Assert.Equal(
Color
.Yellow, control.LineColor);
6102
BackColor =
Color
.Red,
6103
ForeColor =
Color
.Blue,
6104
LineColor =
Color
.Yellow,
6131
Assert.Equal(
Color
.Red, control.BackColor);
6132
Assert.Equal(
Color
.Blue, control.ForeColor);
6133
Assert.Equal(
Color
.Yellow, control.LineColor);
6149
Assert.Equal(
Color
.Red, control.BackColor);
6150
Assert.Equal(
Color
.Blue, control.ForeColor);
6151
Assert.Equal(
Color
.Yellow, control.LineColor);
System\Windows\Forms\UnsupportedTypesTests.cs (2)
87
((Action)(() => new StatusBarDrawItemEventArgs(graphics, font: null!, rectangle, itemId: 0, DrawItemState.Checked, panel: null!, foreColor:
Color
.Red, backColor:
Color
.Black)))
System\Windows\Forms\UpDownBaseTests.cs (43)
511
yield return new object[] {
Color
.Red,
Color
.Red };
512
yield return new object[] {
Color
.Empty, SystemColors.Window };
517
public void UpDownBase_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
534
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
535
yield return new object[] {
Color
.Empty, SystemColors.Window, 1 };
540
public void UpDownBase_BackColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
581
control.BackColor =
Color
.Red;
582
Assert.Equal(
Color
.Red, control.BackColor);
586
control.BackColor =
Color
.Red;
587
Assert.Equal(
Color
.Red, control.BackColor);
591
control.BackColor =
Color
.Empty;
597
control.BackColor =
Color
.Red;
598
Assert.Equal(
Color
.Red, control.BackColor);
937
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
938
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
939
yield return new object[] {
Color
.White,
Color
.White };
940
yield return new object[] {
Color
.Black,
Color
.Black };
941
yield return new object[] {
Color
.Red,
Color
.Red };
946
public void UpDownBase_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
963
public void UpDownBase_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected)
1004
control.ForeColor =
Color
.Red;
1005
Assert.Equal(
Color
.Red, control.ForeColor);
1009
control.ForeColor =
Color
.Red;
1010
Assert.Equal(
Color
.Red, control.ForeColor);
1014
control.ForeColor =
Color
.Empty;
1020
control.ForeColor =
Color
.Red;
1021
Assert.Equal(
Color
.Red, control.ForeColor);
2231
foreach (
Color
backColor in new
Color
[] {
Color
.Red,
Color
.Empty })
2245
public void UpDownBase_OnPaint_Invoke_CallsPaint(Size size, bool enabled, BorderStyle borderStyle,
Color
backColor)
2281
public void UpDownBase_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabled, BorderStyle borderStyle,
Color
backColor)
System\Windows\Forms\VisualStyles\VisualStyleInformationTests.cs (4)
56
Color
color = VisualStyleInformation.ControlHighlightHot;
57
Assert.NotEqual(
Color
.Empty, color);
143
Color
color = VisualStyleInformation.TextControlBorder;
144
Assert.NotEqual(
Color
.Empty, color);
TextBoxBaseTests.cs (41)
385
yield return new object[] {
Color
.Empty, SystemColors.Window };
386
yield return new object[] {
Color
.Red,
Color
.Red };
391
public void TextBoxBase_BackColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
420
control.BackColor =
Color
.Red;
421
Assert.Equal(
Color
.Red, control.BackColor);
425
control.BackColor =
Color
.Red;
426
Assert.Equal(
Color
.Red, control.BackColor);
430
control.BackColor =
Color
.Empty;
436
control.BackColor =
Color
.Red;
437
Assert.Equal(
Color
.Red, control.BackColor);
1163
yield return new object[] {
Color
.Empty, SystemColors.WindowText };
1164
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3) };
1165
yield return new object[] {
Color
.White,
Color
.White };
1166
yield return new object[] {
Color
.Black,
Color
.Black };
1167
yield return new object[] {
Color
.Red,
Color
.Red };
1172
public void TextBoxBase_ForeColor_Set_GetReturnsExpected(
Color
value,
Color
expected)
1189
yield return new object[] {
Color
.Empty, SystemColors.WindowText, 0 };
1190
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3),
Color
.FromArgb(254, 1, 2, 3), 1 };
1191
yield return new object[] {
Color
.White,
Color
.White, 1 };
1192
yield return new object[] {
Color
.Black,
Color
.Black, 1 };
1193
yield return new object[] {
Color
.Red,
Color
.Red, 1 };
1198
public void TextBoxBase_ForeColor_SetWithHandle_GetReturnsExpected(
Color
value,
Color
expected, int expectedInvalidatedCallCount)
1239
control.ForeColor =
Color
.Red;
1240
Assert.Equal(
Color
.Red, control.ForeColor);
1244
control.ForeColor =
Color
.Red;
1245
Assert.Equal(
Color
.Red, control.ForeColor);
1249
control.ForeColor =
Color
.Empty;
1255
control.ForeColor =
Color
.Red;
1256
Assert.Equal(
Color
.Red, control.ForeColor);
ToolStripContainerTests.cs (8)
62
_toolStripContainer.BackColor =
Color
.Red;
67
_toolStripContainer.BackColor =
Color
.Blue;
195
[InlineData(typeof(
Color
), "Red")]
196
[InlineData(typeof(
Color
), "Blue")]
197
[InlineData(typeof(
Color
), "Black")]
204
Color
colorValue = (
Color
)colorType.GetProperty(colorName).GetValue(null);
210
_toolStripContainer.ForeColor =
Color
.Red;
TrackBarTests.cs (11)
686
yield return new object[] {
Color
.Red };
687
yield return new object[] {
Color
.FromArgb(254, 1, 2, 3) };
688
yield return new object[] {
Color
.White };
689
yield return new object[] {
Color
.Black };
690
yield return new object[] {
Color
.Empty };
695
public void TrackBar_ForeColor_Set_Nop(
Color
value)
712
public void TrackBar_ForeColor_SetWithHandle_Nop(
Color
value)
753
control.ForeColor =
Color
.Red;
758
control.ForeColor =
Color
.Red;
763
control.ForeColor =
Color
.Empty;
769
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);
TestPassApp (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;
TrimTestBinaryDeserialization (1)
Form1.Designer.cs (1)
42
imageList1.TransparentColor =
Color
.Transparent;
UnsupportedTypes (2)
CreateFrameworkTypes.cs (2)
253
AlternatingBackColor =
Color
.LightGray
285
AlternatingBackColor =
Color
.LightBlue
WindowsFormsIntegration (10)
System\Windows\Integration\Convert.cs (2)
322
internal static SD.
Color
ToSystemDrawingColor(SWM.Color color)
324
return SD.
Color
.FromArgb(color.A, color.R, color.G, color.B);
System\Windows\Integration\ElementHost.cs (3)
1536
private static SD.
Color
FindSolidColorParent(Control whichControl)
1542
if (control.BackColor != SD.
Color
.Empty && control.BackColor.A == 255)
1547
return SD.
Color
.Empty;
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (5)
84
SD.
Color
wfColor = WindowsFormsHostPropertyMap.TranslateSolidOrGradientBrush(brush, out ignore);
222
SD.
Color
wfColor = WindowsFormsHostPropertyMap.TranslateSolidOrGradientBrush(brush, out defined);
374
private static SD.
Color
TranslateSolidOrGradientBrush(SWM.Brush brush, out bool defined)
377
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);