145 instantiations of Color
System.Drawing.Primitives (145)
System\Drawing\Color.cs (145)
24public static Color Transparent => new Color(KnownColor.Transparent); 26public static Color AliceBlue => new Color(KnownColor.AliceBlue); 28public static Color AntiqueWhite => new Color(KnownColor.AntiqueWhite); 30public static Color Aqua => new Color(KnownColor.Aqua); 32public static Color Aquamarine => new Color(KnownColor.Aquamarine); 34public static Color Azure => new Color(KnownColor.Azure); 36public static Color Beige => new Color(KnownColor.Beige); 38public static Color Bisque => new Color(KnownColor.Bisque); 40public static Color Black => new Color(KnownColor.Black); 42public static Color BlanchedAlmond => new Color(KnownColor.BlanchedAlmond); 44public static Color Blue => new Color(KnownColor.Blue); 46public static Color BlueViolet => new Color(KnownColor.BlueViolet); 48public static Color Brown => new Color(KnownColor.Brown); 50public static Color BurlyWood => new Color(KnownColor.BurlyWood); 52public static Color CadetBlue => new Color(KnownColor.CadetBlue); 54public static Color Chartreuse => new Color(KnownColor.Chartreuse); 56public static Color Chocolate => new Color(KnownColor.Chocolate); 58public static Color Coral => new Color(KnownColor.Coral); 60public static Color CornflowerBlue => new Color(KnownColor.CornflowerBlue); 62public static Color Cornsilk => new Color(KnownColor.Cornsilk); 64public static Color Crimson => new Color(KnownColor.Crimson); 66public static Color Cyan => new Color(KnownColor.Cyan); 68public static Color DarkBlue => new Color(KnownColor.DarkBlue); 70public static Color DarkCyan => new Color(KnownColor.DarkCyan); 72public static Color DarkGoldenrod => new Color(KnownColor.DarkGoldenrod); 74public static Color DarkGray => new Color(KnownColor.DarkGray); 76public static Color DarkGreen => new Color(KnownColor.DarkGreen); 78public static Color DarkKhaki => new Color(KnownColor.DarkKhaki); 80public static Color DarkMagenta => new Color(KnownColor.DarkMagenta); 82public static Color DarkOliveGreen => new Color(KnownColor.DarkOliveGreen); 84public static Color DarkOrange => new Color(KnownColor.DarkOrange); 86public static Color DarkOrchid => new Color(KnownColor.DarkOrchid); 88public static Color DarkRed => new Color(KnownColor.DarkRed); 90public static Color DarkSalmon => new Color(KnownColor.DarkSalmon); 92public static Color DarkSeaGreen => new Color(KnownColor.DarkSeaGreen); 94public static Color DarkSlateBlue => new Color(KnownColor.DarkSlateBlue); 96public static Color DarkSlateGray => new Color(KnownColor.DarkSlateGray); 98public static Color DarkTurquoise => new Color(KnownColor.DarkTurquoise); 100public static Color DarkViolet => new Color(KnownColor.DarkViolet); 102public static Color DeepPink => new Color(KnownColor.DeepPink); 104public static Color DeepSkyBlue => new Color(KnownColor.DeepSkyBlue); 106public static Color DimGray => new Color(KnownColor.DimGray); 108public static Color DodgerBlue => new Color(KnownColor.DodgerBlue); 110public static Color Firebrick => new Color(KnownColor.Firebrick); 112public static Color FloralWhite => new Color(KnownColor.FloralWhite); 114public static Color ForestGreen => new Color(KnownColor.ForestGreen); 116public static Color Fuchsia => new Color(KnownColor.Fuchsia); 118public static Color Gainsboro => new Color(KnownColor.Gainsboro); 120public static Color GhostWhite => new Color(KnownColor.GhostWhite); 122public static Color Gold => new Color(KnownColor.Gold); 124public static Color Goldenrod => new Color(KnownColor.Goldenrod); 126public static Color Gray => new Color(KnownColor.Gray); 128public static Color Green => new Color(KnownColor.Green); 130public static Color GreenYellow => new Color(KnownColor.GreenYellow); 132public static Color Honeydew => new Color(KnownColor.Honeydew); 134public static Color HotPink => new Color(KnownColor.HotPink); 136public static Color IndianRed => new Color(KnownColor.IndianRed); 138public static Color Indigo => new Color(KnownColor.Indigo); 140public static Color Ivory => new Color(KnownColor.Ivory); 142public static Color Khaki => new Color(KnownColor.Khaki); 144public static Color Lavender => new Color(KnownColor.Lavender); 146public static Color LavenderBlush => new Color(KnownColor.LavenderBlush); 148public static Color LawnGreen => new Color(KnownColor.LawnGreen); 150public static Color LemonChiffon => new Color(KnownColor.LemonChiffon); 152public static Color LightBlue => new Color(KnownColor.LightBlue); 154public static Color LightCoral => new Color(KnownColor.LightCoral); 156public static Color LightCyan => new Color(KnownColor.LightCyan); 158public static Color LightGoldenrodYellow => new Color(KnownColor.LightGoldenrodYellow); 160public static Color LightGreen => new Color(KnownColor.LightGreen); 162public static Color LightGray => new Color(KnownColor.LightGray); 164public static Color LightPink => new Color(KnownColor.LightPink); 166public static Color LightSalmon => new Color(KnownColor.LightSalmon); 168public static Color LightSeaGreen => new Color(KnownColor.LightSeaGreen); 170public static Color LightSkyBlue => new Color(KnownColor.LightSkyBlue); 172public static Color LightSlateGray => new Color(KnownColor.LightSlateGray); 174public static Color LightSteelBlue => new Color(KnownColor.LightSteelBlue); 176public static Color LightYellow => new Color(KnownColor.LightYellow); 178public static Color Lime => new Color(KnownColor.Lime); 180public static Color LimeGreen => new Color(KnownColor.LimeGreen); 182public static Color Linen => new Color(KnownColor.Linen); 184public static Color Magenta => new Color(KnownColor.Magenta); 186public static Color Maroon => new Color(KnownColor.Maroon); 188public static Color MediumAquamarine => new Color(KnownColor.MediumAquamarine); 190public static Color MediumBlue => new Color(KnownColor.MediumBlue); 192public static Color MediumOrchid => new Color(KnownColor.MediumOrchid); 194public static Color MediumPurple => new Color(KnownColor.MediumPurple); 196public static Color MediumSeaGreen => new Color(KnownColor.MediumSeaGreen); 198public static Color MediumSlateBlue => new Color(KnownColor.MediumSlateBlue); 200public static Color MediumSpringGreen => new Color(KnownColor.MediumSpringGreen); 202public static Color MediumTurquoise => new Color(KnownColor.MediumTurquoise); 204public static Color MediumVioletRed => new Color(KnownColor.MediumVioletRed); 206public static Color MidnightBlue => new Color(KnownColor.MidnightBlue); 208public static Color MintCream => new Color(KnownColor.MintCream); 210public static Color MistyRose => new Color(KnownColor.MistyRose); 212public static Color Moccasin => new Color(KnownColor.Moccasin); 214public static Color NavajoWhite => new Color(KnownColor.NavajoWhite); 216public static Color Navy => new Color(KnownColor.Navy); 218public static Color OldLace => new Color(KnownColor.OldLace); 220public static Color Olive => new Color(KnownColor.Olive); 222public static Color OliveDrab => new Color(KnownColor.OliveDrab); 224public static Color Orange => new Color(KnownColor.Orange); 226public static Color OrangeRed => new Color(KnownColor.OrangeRed); 228public static Color Orchid => new Color(KnownColor.Orchid); 230public static Color PaleGoldenrod => new Color(KnownColor.PaleGoldenrod); 232public static Color PaleGreen => new Color(KnownColor.PaleGreen); 234public static Color PaleTurquoise => new Color(KnownColor.PaleTurquoise); 236public static Color PaleVioletRed => new Color(KnownColor.PaleVioletRed); 238public static Color PapayaWhip => new Color(KnownColor.PapayaWhip); 240public static Color PeachPuff => new Color(KnownColor.PeachPuff); 242public static Color Peru => new Color(KnownColor.Peru); 244public static Color Pink => new Color(KnownColor.Pink); 246public static Color Plum => new Color(KnownColor.Plum); 248public static Color PowderBlue => new Color(KnownColor.PowderBlue); 250public static Color Purple => new Color(KnownColor.Purple); 256public static Color RebeccaPurple => new Color(KnownColor.RebeccaPurple); 258public static Color Red => new Color(KnownColor.Red); 260public static Color RosyBrown => new Color(KnownColor.RosyBrown); 262public static Color RoyalBlue => new Color(KnownColor.RoyalBlue); 264public static Color SaddleBrown => new Color(KnownColor.SaddleBrown); 266public static Color Salmon => new Color(KnownColor.Salmon); 268public static Color SandyBrown => new Color(KnownColor.SandyBrown); 270public static Color SeaGreen => new Color(KnownColor.SeaGreen); 272public static Color SeaShell => new Color(KnownColor.SeaShell); 274public static Color Sienna => new Color(KnownColor.Sienna); 276public static Color Silver => new Color(KnownColor.Silver); 278public static Color SkyBlue => new Color(KnownColor.SkyBlue); 280public static Color SlateBlue => new Color(KnownColor.SlateBlue); 282public static Color SlateGray => new Color(KnownColor.SlateGray); 284public static Color Snow => new Color(KnownColor.Snow); 286public static Color SpringGreen => new Color(KnownColor.SpringGreen); 288public static Color SteelBlue => new Color(KnownColor.SteelBlue); 290public static Color Tan => new Color(KnownColor.Tan); 292public static Color Teal => new Color(KnownColor.Teal); 294public static Color Thistle => new Color(KnownColor.Thistle); 296public static Color Tomato => new Color(KnownColor.Tomato); 298public static Color Turquoise => new Color(KnownColor.Turquoise); 300public static Color Violet => new Color(KnownColor.Violet); 302public static Color Wheat => new Color(KnownColor.Wheat); 304public static Color White => new Color(KnownColor.White); 306public static Color WhiteSmoke => new Color(KnownColor.WhiteSmoke); 308public static Color Yellow => new Color(KnownColor.Yellow); 310public static Color YellowGreen => new Color(KnownColor.YellowGreen); 441private static Color FromArgb(uint argb) => new Color(argb, StateARGBValueValid, null, (KnownColor)0); 473color <= 0 || color > KnownColor.RebeccaPurple ? FromName(color.ToString()) : new Color(color); 482return new Color(NotDefinedValue, StateNameValid, name, (KnownColor)0);
8761 references to Color
Accessibility_Core_App (60)
CommonControl1.Designer.cs (5)
665this.dateTimePicker1.CalendarForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128))))); 666this.dateTimePicker1.CalendarMonthBackground = System.Drawing.Color.Yellow; 667this.dateTimePicker1.CalendarTitleBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); 668this.dateTimePicker1.CalendarTitleForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); 669this.dateTimePicker1.CalendarTrailingForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
CommonControl2.Designer.cs (1)
99this.progressBar1.BackColor = System.Drawing.Color.Lime;
ContainerControls.Designer.cs (3)
122this.flowLayoutPanel2.BackColor = System.Drawing.Color.White; 521this.flowLayoutPanel1.BackColor = System.Drawing.Color.White; 705this.flowLayoutPanel3.BackColor = System.Drawing.Color.White;
ContainerControls2.Designer.cs (11)
90this.splitContainer1.Panel1.BackColor = System.Drawing.Color.Silver; 96this.splitContainer1.Panel2.BackColor = System.Drawing.Color.Red; 137this.tableLayoutPanel1.BackColor = System.Drawing.Color.Red; 270this.flowLayoutPanel4.BackColor = System.Drawing.Color.Green; 289this.groupBox5.BackColor = System.Drawing.Color.Green; 312this.panel4.BackColor = System.Drawing.Color.Green; 337this.splitContainer2.Panel1.BackColor = System.Drawing.Color.Green; 341this.splitContainer2.Panel2.BackColor = System.Drawing.Color.Red; 370this.tabPage7.BackColor = System.Drawing.Color.Green; 381this.tabPage8.BackColor = System.Drawing.Color.Red; 402this.tableLayoutPanel2.BackColor = System.Drawing.Color.Green;
DataControls.Designer.cs (3)
199this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; 213this.toolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; 221this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
Menu_Toolbars_controls.Designer.cs (17)
165newToolStripMenuItem.ImageTransparentColor = Color.Magenta; 174openToolStripMenuItem.ImageTransparentColor = Color.Magenta; 188saveToolStripMenuItem.ImageTransparentColor = Color.Magenta; 208printToolStripMenuItem.ImageTransparentColor = Color.Magenta; 217printPreviewToolStripMenuItem.ImageTransparentColor = Color.Magenta; 263cutToolStripMenuItem.ImageTransparentColor = Color.Magenta; 272copyToolStripMenuItem.ImageTransparentColor = Color.Magenta; 281pasteToolStripMenuItem.ImageTransparentColor = Color.Magenta; 436toolStripDropDownButton1.ImageTransparentColor = Color.Magenta; 462toolStripSplitButton1.ImageTransparentColor = Color.Magenta; 515newToolStripButton.ImageTransparentColor = Color.Magenta; 529toolStripButton1.ImageTransparentColor = Color.Magenta; 539toolStripButton2.ImageTransparentColor = Color.Magenta; 551toolStripButton3.ImageTransparentColor = Color.Magenta; 562toolStripButton4.ImageTransparentColor = Color.Magenta; 574toolStripButton5.ImageTransparentColor = Color.Magenta; 585toolStripButton6.ImageTransparentColor = Color.Magenta;
ToolStripContainer.Designer.cs (20)
154this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; 165this.toolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; 180this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; 189this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; 198this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; 207this.printToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; 221this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; 230this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; 239this.pasteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; 253this.helpToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; 294this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; 309this.toolStripSplitButton2.ImageTransparentColor = System.Drawing.Color.Magenta; 383this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; 391this.openToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; 404this.saveToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; 423this.printToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; 431this.printPreviewToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; 483this.cutToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; 491this.copyToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; 499this.pasteToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
BinaryFormatTests (14)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
57typeof(Color)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (11)
82if (value is Color color) 84deserialized.Should().BeOfType<Color>().Which.Should().BeEquivalentTo(color); 138if (value is Color color) 140deserialized.Should().BeOfType<Color>().Which.Should().BeEquivalentTo(color); 200Color.Empty, 201Color.AliceBlue, 202Color.FromKnownColor(KnownColor.ActiveCaption), 203Color.FromArgb(1, 2, 3), 204Color.FromArgb(4, Color.Yellow), 205Color.FromName("Blue"),
SerializationRecordExtensionsTests.cs (2)
71if (value is Color color) 73deserialized.Should().BeOfType<Color>().Which.Should().BeEquivalentTo(color);
DesignSurface (32)
CustomControls\CustomButtonDesignerActionList.cs (7)
56Color backColor = (Color)dockProp.GetValue(Component); 57if (backColor != Color.Yellow) 79Color backColor = _control.BackColor; 80_control.BackColor = backColor != Color.Yellow ? Color.Yellow : Color.Blue;
MainForm.cs (20)
124rootComponent.BackColor = Color.Gray; 133b1.BackColor = Color.LightGray; 134b2.BackColor = Color.LightGreen; 153pnl.BackColor = Color.Aquamarine; 164l1.BackColor = Color.Coral; 165l2.BackColor = Color.LightGreen; 169sct.BackColor = Color.White; 185rootComponent.BackColor = Color.Yellow; 194b1.BackColor = Color.Coral; 196l1.BackColor = Color.Coral; 214rootComponent.BackColor = Color.YellowGreen; 226b3.BackColor = Color.LightGray; 236rootComponent.BackColor = Color.Orange; 244b1.BackColor = Color.Gold; 245b2.BackColor = Color.LightGreen; 271rootComponent.BackColor = Color.Orange; 293rootComponent.BackColor = Color.Pink; 324splitContainer.BackColor = Color.Red; 333userControl.BackColor = Color.LightSkyBlue; 349splitter.BackColor = Color.Green;
MainForm.Designer.cs (3)
214this.ToolStripMenuItemCut.ImageTransparentColor = System.Drawing.Color.Magenta; 224this.ToolStripMenuItemCopy.ImageTransparentColor = System.Drawing.Color.Magenta; 234this.ToolStripMenuItemPaste.ImageTransparentColor = System.Drawing.Color.Magenta;
MainForm.MyScrollableControl.cs (1)
20BackColor = Color.Red;
MainForm.MyUserControl.cs (1)
23BackColor = Color.LightBlue;
DesignSurfaceExt (3)
DesignSurfaceExt.cs (3)
125ctrl.BackColor = Color.LightGray; 135ctrl.BackColor = Color.DarkGray; 145ctrl.BackColor = Color.White;
Microsoft.VisualStudio.LanguageServices (1)
VSWpfThemeService.cs (1)
35var 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)
61typeof(Color)
BinaryFormat\DataObjectTests.cs (1)
58System.Drawing.Color.DeepSkyBlue, // Use a static property for Color
PresentationUI (8)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (3)
482this._iconPictureBox.BackColor = System.Drawing.Color.Transparent; 522this._documentDetailBox.BackColor = System.Drawing.Color.Transparent; 646this._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)
127this._pictureBox1.BackColor = System.Drawing.Color.SeaGreen; 180this._pictureBox2.BackColor = System.Drawing.Color.SeaGreen; 199this._pictureBox4.BackColor = System.Drawing.Color.SeaGreen;
MS\Internal\Documents\RMPublishingDialog.Designer.cs (1)
118this.groupBoxMainContent.BackColor = System.Drawing.Color.Transparent;
System.ComponentModel.TypeConverter (32)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (11)
12public static Color ConvertFromString(string strValue, CultureInfo culture) 20return Color.Empty; 24Color c; 45return Color.FromName(colorName); 52return PossibleKnownColor(Color.FromArgb(unchecked((int)(0xFF000000 | (uint)IntFromString(text, culture))))); 641 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture))), 653 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture))), 664 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture), IntFromString(textSpan[tokens[3]], culture))), 71private static Color PossibleKnownColor(Color color) 79foreach (Color c in ColorTable.Colors.Values)
src\libraries\Common\src\System\Drawing\ColorTable.cs (10)
12private static readonly Lazy<Dictionary<string, Color>> s_colorConstants = new Lazy<Dictionary<string, Color>>(GetColors); 14private static Dictionary<string, Color> GetColors() 16var colors = new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase); 17FillWithProperties(colors, typeof(Color)); 23Dictionary<string, Color> dictionary, 28if (prop.PropertyType == typeof(Color)) 29dictionary[prop.Name] = (Color)prop.GetValue(null, null)!; 33internal static Dictionary<string, Color> Colors => s_colorConstants.Value; 35internal static bool TryGetNamedColor(string name, out Color result) => Colors.TryGetValue(name, out result);
System\Drawing\ColorConverter.cs (11)
20var set = new HashSet<Color>(ColorTable.Colors.Values); 52if (value is Color c) 56if (c == Color.Empty) 103member = typeof(Color).GetField("Empty"); 107member = typeof(Color).GetProperty(c.Name) ?? typeof(SystemColors).GetProperty(c.Name); 111member = typeof(Color).GetMethod("FromArgb", new Type[] { typeof(int), typeof(int), typeof(int), typeof(int) }); 116member = typeof(Color).GetMethod("FromName", new Type[] { typeof(string) }); 121member = typeof(Color).GetMethod("FromArgb", new Type[] { typeof(int), typeof(int), typeof(int) }); 147private sealed class ColorComparer : IComparer<Color> 149public int Compare(Color left, Color right) => string.CompareOrdinal(left.Name, right.Name);
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
174typeof(Color),
System.Drawing (1)
System.Drawing.cs (1)
13[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Color))]
System.Drawing.Common (1)
Special\Forwards.cs (1)
6[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Color))]
System.Drawing.Common.Tests (1363)
Helpers.cs (11)
30public static void VerifyBitmap(Bitmap bitmap, Color[][] colors) 36Color expectedColor = Color.FromArgb(colors[y][x].ToArgb()); 37Color actualColor = bitmap.GetPixel(x, y); 47private static EqualException GetBitmapEqualFailureException(Bitmap bitmap, Color[][] colors, int firstFailureX, int firstFailureY) 80private static void PrintColor(StringBuilder stringBuilder, Color color) 85public static Color EmptyColor => Color.FromArgb(0, 0, 0, 0); 116Color emptyColor = Color.FromArgb(0); 121Color pixel = bmp.GetPixel(x, y);
mono\System.Drawing.Imaging\BmpCodecTests.cs (3)
432using (Pen p = new(Color.BlueViolet, 2)) 447Color color = bmpLoad.GetPixel(10, 10); 448Assert.Equal(Color.FromArgb(255, 138, 43, 226), color);
mono\System.Drawing.Imaging\GifCodecTests.cs (4)
170Color c = bmp.GetPixel(0, i); 186using (Pen p = new(Color.Red, 2)) 199Color color = bmpLoad.GetPixel(10, 10); 202Assert.Equal(Color.FromArgb(255, 255, 0, 0), color);
mono\System.Drawing.Imaging\IconCodecTests.cs (3)
1870using (Pen p = new(Color.Red, 2)) 1888Color color = bmpLoad.GetPixel(10, 10); 1889Assert.Equal(Color.FromArgb(255, 255, 0, 0), color);
mono\System.Drawing.Imaging\JpegCodecTests.cs (3)
75Color c = cp.Entries[i]; 351using (Pen p = new(Color.Red, 2)) 364Color color = bmpLoad.GetPixel(10, 10);
mono\System.Drawing.Imaging\PngCodecTests.cs (3)
572using (Pen p = new(Color.BlueViolet, 2)) 587Color color = bmpLoad.GetPixel(10, 10); 588Assert.Equal(Color.FromArgb(255, 138, 43, 226), color);
mono\System.Drawing.Imaging\TiffCodecTests.cs (3)
243using (Pen p = new(Color.BlueViolet, 2)) 258Color color = bmpLoad.GetPixel(10, 10); 259Assert.Equal(Color.FromArgb(255, 138, 43, 226), color);
mono\System.Drawing\BitmapTests.cs (43)
49bmp.SetPixel(0, 0, Color.FromArgb(255, 128, 128, 128)); 50Color color = bmp.GetPixel(0, 0); 52Assert.Equal(Color.FromArgb(255, 128, 128, 128), color); 54bmp.SetPixel(99, 99, Color.FromArgb(255, 255, 0, 155)); 55Color color2 = bmp.GetPixel(99, 99); 56Assert.Equal(Color.FromArgb(255, 255, 0, 155), color2); 126Color c = bmp.GetPixel(0, 0); 135Color c = bmp.GetPixel(0, 0); 144Color c = bmp.GetPixel(0, 0); 154Color a = Color.FromArgb(128, 64, 32, 16); 155Color b = Color.FromArgb(192, 96, 48, 24); 158Color c = bmp.GetPixel(0, 0); 159Color d = bmp.GetPixel(1, 0); 212Assert.Equal(Color.FromArgb(255, 64, 32, 16), c); 213Assert.Equal(Color.FromArgb(255, 96, 48, 24), d); 322Color colororg0 = bmp.GetPixel(0, 0); 323Color colororg50 = bmp.GetPixel(49, 49); 324Color colornew0 = bmpNew.GetPixel(0, 0); 325Color colornew50 = bmpNew.GetPixel(49, 49); 373Color clr; 462Color c = Color.FromArgb(255, 100, 200, 250); 493Color clr = bmp.GetPixel(x, y); 672Color pixel_colour; 674Color red = Color.FromArgb(Color.Red.A, Color.Red.R, Color.Red.G, Color.Red.B); 675Color blue = Color.FromArgb(Color.Blue.A, Color.Blue.R, Color.Blue.G, Color.Blue.B); 691pixel_colour = Color.FromArgb(pixel_value); 693pixel_colour = Color.FromArgb(red.A, pixel_colour.R, pixel_colour.G, pixel_colour.B); 707pixel_colour = Color.FromArgb(red.A, pixel_colour.R, pixel_colour.G, pixel_colour.B); 726pixel_colour = Color.FromArgb(blue.A, pixel_colour.R, pixel_colour.G, pixel_colour.B); 742pixel_colour = Color.FromArgb(red.A, r, g, b);
mono\System.Drawing\GraphicsTests.cs (21)
63int empty = Color.Empty.ToArgb(); 834using Pen pen = new(Color.Red); 849using Pen pen = new(Color.Red); 871using SolidBrush brush = new(Color.Red); 886using SolidBrush brush = new(Color.Red); 1192g.Clear(Color.Fuchsia); 1198Assert.Equal(Color.Red.ToArgb(), bitmap.GetPixel(5, 5).ToArgb()); 1199Assert.Equal(Color.Red.ToArgb(), bitmap.GetPixel(14, 5).ToArgb()); 1200Assert.Equal(Color.Red.ToArgb(), bitmap.GetPixel(5, 14).ToArgb()); 1201Assert.Equal(Color.Red.ToArgb(), bitmap.GetPixel(14, 14).ToArgb()); 1203Assert.Equal(Color.Fuchsia.ToArgb(), bitmap.GetPixel(15, 5).ToArgb()); 1204Assert.Equal(Color.Fuchsia.ToArgb(), bitmap.GetPixel(5, 15).ToArgb()); 1205Assert.Equal(Color.Fuchsia.ToArgb(), bitmap.GetPixel(15, 15).ToArgb()); 1213g.Clear(Color.Red); 1218using Pen pen = new(Color.Blue, width); 1377g.Clear(Color.Red); 1381using Pen pen = new(Color.Blue, width); 1523g.Clear(Color.Red); 1527using Pen pen = new(Color.Blue, width); 2886g.Clear(Color.White); 2928g.Clear(Color.White);
System\Drawing\BitmapTests.cs (51)
383Color expectedColor = bitmap.GetPixel(rectangle.X + x, rectangle.Y + y); 390Assert.Equal(Color.FromArgb(255, expectedColor.R, expectedColor.G, expectedColor.B), clone.GetPixel(x, y)); 532yield return new object[] { new Bitmap(1, 1, PixelFormat.Format1bppIndexed), 0, 0, Color.FromArgb(0, 0, 0) }; 533yield return new object[] { new Bitmap(1, 1, PixelFormat.Format4bppIndexed), 0, 0, Color.FromArgb(0, 0, 0) }; 534yield return new object[] { new Bitmap(1, 1, PixelFormat.Format8bppIndexed), 0, 0, Color.FromArgb(0, 0, 0) }; 535yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), 0, 0, Color.FromArgb(0, 0, 0) }; 536yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), 99, 99, Color.FromArgb(0, 0, 0) }; 541public void GetPixel_ValidPixelFormat_Success(Bitmap bitmap, int x, int y, Color color) 795bitmap.SetPixel(x, y, Color.LightGray); 799bitmap.SetPixel(x, y, Color.Red); 811Assert.Equal(Color.FromArgb(255, 211, 211, 211), bitmap.GetPixel(x, y)); 815Assert.Equal(Color.FromArgb(0, 0, 0, 0), bitmap.GetPixel(x, y)); 831bitmap.SetPixel(x, y, Color.Blue); 835bitmap.SetPixel(x, y, Color.Red); 840bitmap.MakeTransparent(Color.Blue); 847Assert.Equal(Color.FromArgb(0, 0, 0, 0), bitmap.GetPixel(x, y)); 851Assert.Equal(Color.FromArgb(255, 255, 0, 0), bitmap.GetPixel(x, y)); 865bitmap.SetPixel(x, y, Color.Blue); 869bitmap.MakeTransparent(Color.Red); 874Assert.Equal(Color.FromArgb(255, 0, 0, 255), bitmap.GetPixel(x, y)); 886AssertExtensions.Throws<ArgumentException>(null, () => bitmap.MakeTransparent(Color.Red)); 897bitmap.MakeTransparent(Color.Red); 909Assert.Throws<InvalidOperationException>(() => bitmap.MakeTransparent(Color.Red)); 914yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), 0, 0, Color.FromArgb(255, 128, 128, 128) }; 915yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), 99, 99, Color.FromArgb(255, 128, 128, 128) }; 920public void SetPixel_ValidPixelFormat_Success(Bitmap bitmap, int x, int y, Color color) 933Assert.Throws<InvalidOperationException>(() => bitmap.SetPixel(0, 0, Color.Red)); 942AssertExtensions.Throws<ArgumentOutOfRangeException>("x", () => bitmap.SetPixel(x, 0, Color.Red)); 951AssertExtensions.Throws<ArgumentOutOfRangeException>("y", () => bitmap.SetPixel(0, y, Color.Red)); 958AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0, Color.Red)); 967AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0, Color.Red)); 1288Color a = Color.FromArgb(128, 64, 32, 16); 1289Color b = Color.FromArgb(192, 96, 48, 24); 1292Color c = bitmap.GetPixel(0, 0); 1293Color d = bitmap.GetPixel(1, 0); 1344Assert.Equal(Color.FromArgb(255, 64, 32, 16), c); 1345Assert.Equal(Color.FromArgb(255, 96, 48, 24), d); 1465Color red = Color.FromArgb(Color.Red.ToArgb()); 1466Color blue = Color.FromArgb(Color.Blue.ToArgb()); 1471Color pixelColor = bitmap.GetPixel(0, 0); 1482pixelColor = Color.FromArgb(pixelValue); 1484pixelColor = Color.FromArgb(red.A, pixelColor.R, pixelColor.G, pixelColor.B); 1498pixelColor = Color.FromArgb(red.A, pixelColor.R, pixelColor.G, pixelColor.B); 1517pixelColor = Color.FromArgb(blue.A, pixelColor.R, pixelColor.G, pixelColor.B); 1533Assert.Equal(red, Color.FromArgb(red.A, r, g, b));
System\Drawing\BrushesTests.cs (146)
10yield return Brush(() => Brushes.AliceBlue, Color.AliceBlue); 11yield return Brush(() => Brushes.AntiqueWhite, Color.AntiqueWhite); 12yield return Brush(() => Brushes.Aqua, Color.Aqua); 13yield return Brush(() => Brushes.Aquamarine, Color.Aquamarine); 14yield return Brush(() => Brushes.Azure, Color.Azure); 15yield return Brush(() => Brushes.Beige, Color.Beige); 16yield return Brush(() => Brushes.Bisque, Color.Bisque); 17yield return Brush(() => Brushes.Black, Color.Black); 18yield return Brush(() => Brushes.BlanchedAlmond, Color.BlanchedAlmond); 19yield return Brush(() => Brushes.Blue, Color.Blue); 20yield return Brush(() => Brushes.BlueViolet, Color.BlueViolet); 21yield return Brush(() => Brushes.Brown, Color.Brown); 22yield return Brush(() => Brushes.BurlyWood, Color.BurlyWood); 23yield return Brush(() => Brushes.CadetBlue, Color.CadetBlue); 24yield return Brush(() => Brushes.Chartreuse, Color.Chartreuse); 25yield return Brush(() => Brushes.Chocolate, Color.Chocolate); 26yield return Brush(() => Brushes.Coral, Color.Coral); 27yield return Brush(() => Brushes.CornflowerBlue, Color.CornflowerBlue); 28yield return Brush(() => Brushes.Cornsilk, Color.Cornsilk); 29yield return Brush(() => Brushes.Crimson, Color.Crimson); 30yield return Brush(() => Brushes.Cyan, Color.Cyan); 31yield return Brush(() => Brushes.DarkBlue, Color.DarkBlue); 32yield return Brush(() => Brushes.DarkCyan, Color.DarkCyan); 33yield return Brush(() => Brushes.DarkGoldenrod, Color.DarkGoldenrod); 34yield return Brush(() => Brushes.DarkGray, Color.DarkGray); 35yield return Brush(() => Brushes.DarkGreen, Color.DarkGreen); 36yield return Brush(() => Brushes.DarkKhaki, Color.DarkKhaki); 37yield return Brush(() => Brushes.DarkMagenta, Color.DarkMagenta); 38yield return Brush(() => Brushes.DarkOliveGreen, Color.DarkOliveGreen); 39yield return Brush(() => Brushes.DarkOrange, Color.DarkOrange); 40yield return Brush(() => Brushes.DarkOrchid, Color.DarkOrchid); 41yield return Brush(() => Brushes.DarkRed, Color.DarkRed); 42yield return Brush(() => Brushes.DarkSalmon, Color.DarkSalmon); 43yield return Brush(() => Brushes.DarkSeaGreen, Color.DarkSeaGreen); 44yield return Brush(() => Brushes.DarkSlateBlue, Color.DarkSlateBlue); 45yield return Brush(() => Brushes.DarkSlateGray, Color.DarkSlateGray); 46yield return Brush(() => Brushes.DarkTurquoise, Color.DarkTurquoise); 47yield return Brush(() => Brushes.DarkViolet, Color.DarkViolet); 48yield return Brush(() => Brushes.DeepPink, Color.DeepPink); 49yield return Brush(() => Brushes.DeepSkyBlue, Color.DeepSkyBlue); 50yield return Brush(() => Brushes.DimGray, Color.DimGray); 51yield return Brush(() => Brushes.DodgerBlue, Color.DodgerBlue); 52yield return Brush(() => Brushes.Firebrick, Color.Firebrick); 53yield return Brush(() => Brushes.FloralWhite, Color.FloralWhite); 54yield return Brush(() => Brushes.ForestGreen, Color.ForestGreen); 55yield return Brush(() => Brushes.Fuchsia, Color.Fuchsia); 56yield return Brush(() => Brushes.Gainsboro, Color.Gainsboro); 57yield return Brush(() => Brushes.GhostWhite, Color.GhostWhite); 58yield return Brush(() => Brushes.Gold, Color.Gold); 59yield return Brush(() => Brushes.Goldenrod, Color.Goldenrod); 60yield return Brush(() => Brushes.Gray, Color.Gray); 61yield return Brush(() => Brushes.Green, Color.Green); 62yield return Brush(() => Brushes.GreenYellow, Color.GreenYellow); 63yield return Brush(() => Brushes.Honeydew, Color.Honeydew); 64yield return Brush(() => Brushes.HotPink, Color.HotPink); 65yield return Brush(() => Brushes.IndianRed, Color.IndianRed); 66yield return Brush(() => Brushes.Indigo, Color.Indigo); 67yield return Brush(() => Brushes.Ivory, Color.Ivory); 68yield return Brush(() => Brushes.Khaki, Color.Khaki); 69yield return Brush(() => Brushes.Lavender, Color.Lavender); 70yield return Brush(() => Brushes.LavenderBlush, Color.LavenderBlush); 71yield return Brush(() => Brushes.LawnGreen, Color.LawnGreen); 72yield return Brush(() => Brushes.LemonChiffon, Color.LemonChiffon); 73yield return Brush(() => Brushes.LightBlue, Color.LightBlue); 74yield return Brush(() => Brushes.LightCoral, Color.LightCoral); 75yield return Brush(() => Brushes.LightCyan, Color.LightCyan); 76yield return Brush(() => Brushes.LightGoldenrodYellow, Color.LightGoldenrodYellow); 77yield return Brush(() => Brushes.LightGray, Color.LightGray); 78yield return Brush(() => Brushes.LightGreen, Color.LightGreen); 79yield return Brush(() => Brushes.LightPink, Color.LightPink); 80yield return Brush(() => Brushes.LightSalmon, Color.LightSalmon); 81yield return Brush(() => Brushes.LightSeaGreen, Color.LightSeaGreen); 82yield return Brush(() => Brushes.LightSkyBlue, Color.LightSkyBlue); 83yield return Brush(() => Brushes.LightSlateGray, Color.LightSlateGray); 84yield return Brush(() => Brushes.LightSteelBlue, Color.LightSteelBlue); 85yield return Brush(() => Brushes.LightYellow, Color.LightYellow); 86yield return Brush(() => Brushes.Lime, Color.Lime); 87yield return Brush(() => Brushes.LimeGreen, Color.LimeGreen); 88yield return Brush(() => Brushes.Linen, Color.Linen); 89yield return Brush(() => Brushes.Magenta, Color.Magenta); 90yield return Brush(() => Brushes.Maroon, Color.Maroon); 91yield return Brush(() => Brushes.MediumAquamarine, Color.MediumAquamarine); 92yield return Brush(() => Brushes.MediumBlue, Color.MediumBlue); 93yield return Brush(() => Brushes.MediumOrchid, Color.MediumOrchid); 94yield return Brush(() => Brushes.MediumPurple, Color.MediumPurple); 95yield return Brush(() => Brushes.MediumSeaGreen, Color.MediumSeaGreen); 96yield return Brush(() => Brushes.MediumSlateBlue, Color.MediumSlateBlue); 97yield return Brush(() => Brushes.MediumSpringGreen, Color.MediumSpringGreen); 98yield return Brush(() => Brushes.MediumTurquoise, Color.MediumTurquoise); 99yield return Brush(() => Brushes.MediumVioletRed, Color.MediumVioletRed); 100yield return Brush(() => Brushes.MidnightBlue, Color.MidnightBlue); 101yield return Brush(() => Brushes.MintCream, Color.MintCream); 102yield return Brush(() => Brushes.MistyRose, Color.MistyRose); 103yield return Brush(() => Brushes.Moccasin, Color.Moccasin); 104yield return Brush(() => Brushes.NavajoWhite, Color.NavajoWhite); 105yield return Brush(() => Brushes.Navy, Color.Navy); 106yield return Brush(() => Brushes.OldLace, Color.OldLace); 107yield return Brush(() => Brushes.Olive, Color.Olive); 108yield return Brush(() => Brushes.OliveDrab, Color.OliveDrab); 109yield return Brush(() => Brushes.Orange, Color.Orange); 110yield return Brush(() => Brushes.OrangeRed, Color.OrangeRed); 111yield return Brush(() => Brushes.Orchid, Color.Orchid); 112yield return Brush(() => Brushes.PaleGoldenrod, Color.PaleGoldenrod); 113yield return Brush(() => Brushes.PaleGreen, Color.PaleGreen); 114yield return Brush(() => Brushes.PaleTurquoise, Color.PaleTurquoise); 115yield return Brush(() => Brushes.PaleVioletRed, Color.PaleVioletRed); 116yield return Brush(() => Brushes.PapayaWhip, Color.PapayaWhip); 117yield return Brush(() => Brushes.PeachPuff, Color.PeachPuff); 118yield return Brush(() => Brushes.Peru, Color.Peru); 119yield return Brush(() => Brushes.Pink, Color.Pink); 120yield return Brush(() => Brushes.Plum, Color.Plum); 121yield return Brush(() => Brushes.PowderBlue, Color.PowderBlue); 122yield return Brush(() => Brushes.Purple, Color.Purple); 123yield return Brush(() => Brushes.Red, Color.Red); 124yield return Brush(() => Brushes.RosyBrown, Color.RosyBrown); 125yield return Brush(() => Brushes.RoyalBlue, Color.RoyalBlue); 126yield return Brush(() => Brushes.SaddleBrown, Color.SaddleBrown); 127yield return Brush(() => Brushes.Salmon, Color.Salmon); 128yield return Brush(() => Brushes.SandyBrown, Color.SandyBrown); 129yield return Brush(() => Brushes.SeaGreen, Color.SeaGreen); 130yield return Brush(() => Brushes.SeaShell, Color.SeaShell); 131yield return Brush(() => Brushes.Sienna, Color.Sienna); 132yield return Brush(() => Brushes.Silver, Color.Silver); 133yield return Brush(() => Brushes.SkyBlue, Color.SkyBlue); 134yield return Brush(() => Brushes.SlateBlue, Color.SlateBlue); 135yield return Brush(() => Brushes.SlateGray, Color.SlateGray); 136yield return Brush(() => Brushes.Snow, Color.Snow); 137yield return Brush(() => Brushes.SpringGreen, Color.SpringGreen); 138yield return Brush(() => Brushes.SteelBlue, Color.SteelBlue); 139yield return Brush(() => Brushes.Tan, Color.Tan); 140yield return Brush(() => Brushes.Teal, Color.Teal); 141yield return Brush(() => Brushes.Thistle, Color.Thistle); 142yield return Brush(() => Brushes.Tomato, Color.Tomato); 143yield return Brush(() => Brushes.Transparent, Color.Transparent); 144yield return Brush(() => Brushes.Turquoise, Color.Turquoise); 145yield return Brush(() => Brushes.Violet, Color.Violet); 146yield return Brush(() => Brushes.Wheat, Color.Wheat); 147yield return Brush(() => Brushes.White, Color.White); 148yield return Brush(() => Brushes.WhiteSmoke, Color.WhiteSmoke); 149yield return Brush(() => Brushes.Yellow, Color.Yellow); 150yield return Brush(() => Brushes.YellowGreen, Color.YellowGreen); 153public static object[] Brush(Func<Brush> getBrush, Color expectedColor) => [getBrush, expectedColor]; 157public void Brushes_Get_ReturnsExpected(Func<Brush> getBrush, Color expectedColor) 165Color color = brush.Color; 168brush.Color = Color.Red; 169Assert.Equal(Color.Red, brush.Color);
System\Drawing\BufferedGraphicsTests.cs (7)
41Color color = Color.FromArgb(255, 0, 0, 0); 46using SolidBrush brush = new(Color.Red); 66using SolidBrush brush = new(Color.Red); 84Color color = Color.FromArgb(255, 0, 0, 0); 91using SolidBrush brush = new(Color.Red);
System\Drawing\ColorTranslatorTests.cs (48)
10public static IEnumerable<(int, Color)> SystemColors_TestData() 46yield return new object[] { default(Color), 0 }; 47yield return new object[] { Color.Red, 255 }; 48yield return new object[] { Color.White, 16777215 }; 49yield return new object[] { Color.FromArgb(1, 2, 3), 197121 }; 54public void ToWin32Color_Color_ReturnsExpected(Color color, int expected) 62yield return new object[] { -1, Color.White }; 63yield return new object[] { 0, Color.Black }; 64yield return new object[] { 197121, Color.FromArgb(1, 2, 3) }; 65yield return new object[] { 16777215, Color.White }; 66yield return new object[] { int.MaxValue, Color.White }; 67yield return new object[] { unchecked((int)0x8000001F), Color.FromArgb(255, 31, 0, 0) }; 68yield return new object[] { unchecked((int)0x80000019), Color.FromArgb(255, 25, 0, 0) }; 70foreach ((int oleColor, Color color) in SystemColors_TestData()) 78public void FromOle_Color_ReturnsExpected(int oleColor, Color color) 86yield return new object[] { default(Color), 0 }; 87yield return new object[] { Color.Red, 255 }; 88yield return new object[] { Color.White, 16777215 }; 89yield return new object[] { Color.FromArgb(1, 2, 3), 197121 }; 91foreach ((int oleColor, Color color) in SystemColors_TestData()) 104public void ToOle_Color_ReturnsExpected(Color color, int oleColor) 109public static IEnumerable<(string, Color)> HtmlColors_TestData() 136yield return ("LightGrey", Color.LightGray); 137yield return ("Blue", Color.Blue); 138yield return ("#1F2E3D", Color.FromArgb(31, 46, 61)); 143yield return new object[] { null, Color.Empty }; 144yield return new object[] { "", Color.Empty }; 145yield return new object[] { " ", Color.Empty }; 146yield return new object[] { "''", Color.FromName("") }; 147yield return new object[] { "\"\"", Color.FromName("") }; 149yield return new object[] { "#1B3", Color.FromArgb(17, 187, 51) }; 150yield return new object[] { " #1F2E3D ", Color.FromArgb(31, 46, 61) }; 154yield return new object[] { " Blue ", Color.Blue }; 155yield return new object[] { "'Blue'", Color.Blue }; 156yield return new object[] { "\"Blue\"", Color.Blue }; 157yield return new object[] { "'None'", Color.FromName("None") }; 158yield return new object[] { "\"None\"", Color.FromName("None") }; 159yield return new object[] { "255,0,0", Color.Red }; 162yield return new object[] { 498, Color.FromArgb(0, 0, 1, 242) }; 163yield return new object[] { "&h1F2", Color.FromArgb(0, 0, 1, 242) }; 164yield return new object[] { "&h1F2", Color.FromArgb(0, 0, 1, 242) }; 167yield return new object[] { "1, 0x2, &h3", Color.FromArgb(1, 2, 3) }; 170yield return new object[] { "1, 2, 0x3, &h4", Color.FromArgb(1, 2, 3, 4) }; 172foreach ((string htmlColor, Color color) in HtmlColors_TestData()) 185public void FromHtml_String_ReturnsExpected(string htmlColor, Color expected) 237yield return new object[] { Color.Empty, "" }; 239foreach ((string htmlColor, Color color) in HtmlColors_TestData()) 256public void ToHtml_Color_ReturnsExpected(Color color, string expected)
System\Drawing\Drawing2D\ColorBlendTests.cs (4)
12Assert.Equal(new Color[1], blend.Colors); 22Assert.Equal(new Color[count], blend.Colors); 44blend.Colors = new Color[10]; 45Assert.Equal(new Color[10], blend.Colors);
System\Drawing\Drawing2D\GraphicsPathTests.cs (7)
1661using Pen pen = new(Color.Blue); 1674using Pen pen = new(Color.Blue); 1693using Pen pen = new(Color.Blue); 1704using Pen pen = new(Color.Blue); 1726using Pen pen = new(Color.Aqua, 0); 2248using Pen pen = new(Color.Red, 3.0f); 2275using Pen pen = new(Color.Red, 3.0f);
System\Drawing\Drawing2D\HatchBrushTests.cs (26)
10yield return new object[] { HatchStyle.Horizontal, default(Color) }; 11yield return new object[] { HatchStyle.SolidDiamond, Color.PapayaWhip }; 16public void Ctor_HatchStyle_ForeColor(HatchStyle hatchStyle, Color foreColor) 24Assert.Equal(Color.FromArgb(255, 0, 0, 0), brush.BackgroundColor); 29yield return new object[] { HatchStyle.Horizontal, default(Color), default(Color) }; 30yield return new object[] { HatchStyle.SolidDiamond, Color.PapayaWhip, Color.Plum }; 35public void Ctor_HatchStyle_ForeColor_BackColor(HatchStyle hatchStyle, Color foreColor, Color backColor) 52AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.Empty)); 53AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.Empty, Color.Empty)); 59using HatchBrush brush = new(HatchStyle.DarkDownwardDiagonal, Color.Magenta, Color.Peru); 76Assert.Equal(Color.Bisque, brush.Color); 82HatchBrush brush = new(HatchStyle.DarkHorizontal, Color.PeachPuff, Color.Purple); 91HatchBrush brush = new(HatchStyle.DarkHorizontal, Color.PeachPuff, Color.Purple); 100HatchBrush brush = new(HatchStyle.DarkHorizontal, Color.PeachPuff, Color.Purple); 109HatchBrush brush = new(HatchStyle.DarkHorizontal, Color.PeachPuff, Color.Purple); 118HatchBrush brush = new(HatchStyle.DarkHorizontal, Color.PeachPuff, Color.Purple);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (275)
10yield return new object[] { new Point(0, 0), new Point(2, 2), Color.Empty, Color.Empty, new RectangleF(0, 0, 2, 2) }; 11yield return new object[] { new Point(1, 0), new Point(0, 0), Color.Empty, Color.Red, new RectangleF(0, -0.5f, 1, 1) }; 12yield return new object[] { new Point(1, 2), new Point(4, 6), Color.Plum, Color.Red, new RectangleF(1, 2, 3, 4) }; 13yield return new object[] { new Point(1, 2), new Point(4, 6), Color.Red, Color.Red, new RectangleF(1, 2, 3, 4) }; 14yield return new object[] { new Point(-1, -2), new Point(4, 6), Color.Red, Color.Plum, new RectangleF(-1, -2, 5, 8) }; 15yield return new object[] { new Point(-4, -6), new Point(1, 2), Color.Black, Color.Wheat, new RectangleF(-4, -6, 5, 8) }; 16yield return new object[] { new Point(4, 6), new Point(-1, -2), Color.Black, Color.Wheat, new RectangleF(-1, -2, 5, 8) }; 17yield return new object[] { new Point(4, 6), new Point(1, 2), Color.Black, Color.Wheat, new RectangleF(1, 2, 3, 4) }; 22public void Ctor_PointF_PointF_Color_Color(Point point1, Point point2, Color color1, Color color2, RectangleF expectedRectangle) 30Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 40using LinearGradientBrush brush = new(new PointF(float.NaN, float.NaN), new PointF(float.PositiveInfinity, float.NegativeInfinity), Color.Plum, Color.Red); 49public void Ctor_Point_Point_Color_Color(Point point1, Point point2, Color color1, Color color2, RectangleF expectedRectangle) 57Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 69Assert.Throws<OutOfMemoryException>(() => new LinearGradientBrush(new Point(x, y), new Point(x, y), Color.Fuchsia, Color.GhostWhite)); 70Assert.Throws<OutOfMemoryException>(() => new LinearGradientBrush(new PointF(x, y), new PointF(x, y), Color.Fuchsia, Color.GhostWhite)); 75yield return new object[] { new Rectangle(0, 0, 1, 2), Color.Empty, Color.Red, LinearGradientMode.BackwardDiagonal }; 76yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, LinearGradientMode.ForwardDiagonal }; 77yield return new object[] { new Rectangle(-1, -2, -3, -4), Color.Red, Color.Red, LinearGradientMode.Horizontal }; 78yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Plum, LinearGradientMode.Vertical }; 83public void Ctor_Rectangle_Color_Color_LinearGradientMode(Rectangle rectangle, Color color1, Color color2, LinearGradientMode linearGradientMode) 91Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 100public void Ctor_RectangleF_Color_Color_LinearGradientMode(Rectangle rectangle, Color color1, Color color2, LinearGradientMode linearGradientMode) 108Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 117yield return new object[] { new Rectangle(0, 0, 1, 2), Color.Empty, Color.Red, 90 }; 118yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 180 }; 119yield return new object[] { new Rectangle(-1, -2, -3, -4), Color.Red, Color.Red, 0 }; 120yield return new object[] { new Rectangle(-1, -2, -3, -4), Color.Red, Color.Red, 360 }; 121yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Plum, 90 }; 126public void Ctor_Rectangle_Color_Color_Angle(Rectangle rectangle, Color color1, Color color2, float angle) 134Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 143public void Ctor_RectangleF_Color_Color_Angle(Rectangle rectangle, Color color1, Color color2, float angle) 151Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 169public void Ctor_Rectangle_Color_Color_Angle_IsAngleScalable(Rectangle rectangle, Color color1, Color color2, float angle, bool isAngleScalable) 177Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 186public void Ctor_RectangleF_Color_Color_Angle_IsAngleScalable(Rectangle rectangle, Color color1, Color color2, float angle, bool isAngleScalable) 194Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 204AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0f)); 205AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0f)); 206AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 207AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 208AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true)); 209AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true)); 215AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0f)); 216AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0f)); 217AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 218AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 219AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true)); 220AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true)); 228Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode)); 229Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new RectangleF(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode)); 235using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 249LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 258using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 261Colors = [Color.Red, Color.PeachPuff, Color.PowderBlue], 280using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 299using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 311using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 318using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 325using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 332using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 339using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 346LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 358using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { GammaCorrection = gammaCorrection }; 365LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 375using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 378Colors = [Color.Red, Color.PeachPuff, Color.PowderBlue], 383Assert.Equal(blend.Colors.Select(c => Color.FromArgb(c.ToArgb())), brush.InterpolationColors.Colors); 390using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) 394Colors = [Color.Wheat, Color.Yellow], 400Colors = [Color.Red, Color.PeachPuff, Color.PowderBlue], 404Assert.Equal(blend.Colors.Select(c => Color.FromArgb(c.ToArgb())), brush.InterpolationColors.Colors); 411using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 418using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 427using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 430() => brush.InterpolationColors = new ColorBlend { Colors = new Color[colorsLength] }); 436using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 437Assert.Throws<ArgumentException>(() => brush.InterpolationColors = new ColorBlend { Colors = new Color[2], Positions = null }); 446using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 449Colors = new Color[2], 459LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 462Colors = new Color[positions.Length], 470LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) 474Colors = [Color.Red, Color.PeachPuff, Color.PowderBlue], 483Colors = new Color[2], 491using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) 495Colors = [Color.Red, Color.PeachPuff, Color.PowderBlue], 510using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) 514Colors = [Color.Red, Color.PeachPuff, Color.PowderBlue], 534Color[] colors = [Color.Red, Color.Blue, Color.AntiqueWhite]; 535using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { LinearColors = colors }; 536Assert.Equal(colors.Take(2).Select(c => Color.FromArgb(c.ToArgb())), brush.LinearColors); 542using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 551using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 552Assert.Throws<IndexOutOfRangeException>(() => brush.LinearColors = new Color[length]); 558LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 562AssertExtensions.Throws<ArgumentException>(null, () => brush.LinearColors = [Color.Red, Color.Wheat]); 568LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 578using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { Transform = transform }; 585using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 592LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 606using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { WrapMode = wrapMode }; 615using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 622using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 629LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 639using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 649LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 658using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 674using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 695using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 703using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 717using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 726LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 739using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 756using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 769using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 776LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 789using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 806using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 819using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 826LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 840using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 857using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 870using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 877LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 891using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 902using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 914using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 921LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 934using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 0, true); 948using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 0, true); 962using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 974using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 981LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 991LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true);
System\Drawing\Drawing2D\PathGradientBrushTests.cs (47)
141Assert.Equal(Color.Black.ToArgb(), brush.CenterColor.ToArgb()); 142brush.CenterColor = Color.Blue; 143Assert.Equal(Color.Blue.ToArgb(), brush.CenterColor.ToArgb()); 144brush.CenterColor = Color.Transparent; 145Assert.Equal(Color.Transparent.ToArgb(), brush.CenterColor.ToArgb()); 154AssertExtensions.Throws<ArgumentException>(null, () => brush.CenterColor = Color.Blue); 160Color[] expectedColors = [Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 255, 0, 0)]; 161Color[] sameColors = [Color.FromArgb(255, 255, 255, 0), Color.FromArgb(255, 255, 255, 0)]; 162Color[] expectedSameColors = [Color.FromArgb(255, 255, 255, 0)]; 174Color[] colors = [Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 255, 0, 0)]; 175Color[] defaultColors = [Color.FromArgb(255, 255, 255, 255)]; 180brush.SurroundColors[0] = Color.FromArgb(255, 0, 0, 255); 181Assert.NotEqual(Color.FromArgb(255, 0, 0, 255), brush.SurroundColors[0]); 188Color[] colors = [Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 255, 0, 0)]; 197yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, Array.Empty<Color>() }; 198yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, new Color[3] }; 203public void SurroundColors_InvalidColorsLength_ThrowsArgumentException(Point[] points, Color[] colors) 528Color[] expectedColors = [Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 255, 0, 0)]; 530Color[] sameColors = [Color.FromArgb(255, 255, 255, 0), Color.FromArgb(255, 255, 255, 0)]; 545Color[] colors = [Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 255, 0, 0)]; 546Color[] defaultColors = [Color.Empty]; 553brush.InterpolationColors.Colors[0] = Color.Pink; 554Assert.NotEqual(Color.Pink, brush.InterpolationColors.Colors[0]); 594brush.InterpolationColors = new ColorBlend() { Colors = new Color[1], Positions = null }); 617brush.InterpolationColors = new ColorBlend() { Colors = new Color[1], Positions = new float[2] }); 625brush.InterpolationColors = new ColorBlend() { Colors = new Color[2], Positions = new float[1] }); 946Assert.Equal(new Color[] { Color.Empty }, brush.InterpolationColors.Colors); 947Assert.Equal(new Color[] { Color.FromArgb(255, 255, 255, 255) }, brush.SurroundColors);
System\Drawing\Graphics_DrawBezierTests.cs (11)
12using Pen pen = new(Color.White); 26using Pen pen = new(Color.Red); 45using Pen pen = new(Color.Red); 75Pen pen = new(Color.Red); 88using Pen pen = new(Color.Red); 106using Pen pen = new(Color.Red); 130Pen pen = new(Color.Red); 142using Pen pen = new(Color.Red); 152using Pen pen = new(Color.Red); 162using Pen pen = new(Color.Red); 179using Pen pen = new(Color.Red);
System\Drawing\Graphics_DrawLineTests.cs (10)
12using Pen pen = new(Color.White); 27using Pen pen = new(Color.White); 54Pen pen = new(Color.Red); 68using Pen pen = new(Color.Red); 87using Pen pen = new(Color.Red); 111Pen pen = new(Color.Red); 123using Pen pen = new(Color.Red); 135using Pen pen = new(Color.Red); 145using Pen pen = new(Color.Red); 162using Pen pen = new(Color.Red);
System\Drawing\GraphicsTests.Core.cs (8)
85Pen pen = new(Color.Red); 98using Pen pen = new(Color.Red); 115using Pen pen = new(Color.Red); 139SolidBrush brush = new(Color.Red); 152using SolidBrush brush = new(Color.Red); 163using SolidBrush brush = new(Color.Red); 174using SolidBrush brush = new(Color.Red); 191using SolidBrush brush = new(Color.Red);
System\Drawing\GraphicsTests.cs (115)
300yield return new object[] { CompositingMode.SourceCopy, Color.FromArgb(160, 255, 255, 255) }; 301yield return new object[] { CompositingMode.SourceOver, Color.FromArgb(220, 185, 185, 185) }; 306public void CompositingMode_Set_GetReturnsExpected(CompositingMode mode, Color expectedOverlap) 308Color transparentBlack = Color.FromArgb(160, 0, 0, 0); 309Color transparentWhite = Color.FromArgb(160, 255, 255, 255); 372Color transparentBlack = Color.FromArgb(160, 0, 0, 0); 373Color transparentWhite = Color.FromArgb(160, 255, 255, 255); 374var basicExpectedColors = new Color[][] 377[transparentBlack, Color.FromArgb(220, 185, 185, 185), transparentWhite], 386var 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)] 398public void CompositingQuality_Set_GetReturnsExpected(CompositingQuality quality, Color[][] expectedIntersectionColor) 400Color transparentBlack = Color.FromArgb(160, 0, 0, 0); 401Color transparentWhite = Color.FromArgb(160, 255, 255, 255); 818Color empty = Color.FromArgb(255, 0, 0, 0); 819Color red = Color.FromArgb(Color.Red.ToArgb()); 824new Color[][] 835new Color[][] 843var allEmpty = new Color[][] 856public void RenderingOrigin_SetToCustom_RendersExpected(Point renderingOrigin, Color[][] expectedRendering) 858Color red = Color.FromArgb(Color.Red.ToArgb()); 1064Color empty = Helpers.EmptyColor; 1065Color red = Color.FromArgb(Color.Red.ToArgb()); 1228LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 1540Color plum = Color.FromArgb(Color.Plum.ToArgb()); 1554Color color = Color.FromArgb(2, 3, 4); 1567Color imageColor = image.GetPixel(x, y); 1916yield return new object[] { PixelFormat.Format32bppArgb, Color.Red, Color.FromArgb(Color.Red.ToArgb()) }; 1917yield return new object[] { PixelFormat.Format16bppRgb555, Color.Red, Color.FromArgb(255, 248, 0, 0) }; 1922public void GetNearestColor_Color_ReturnsExpected(PixelFormat pixelFormat, Color color, Color expected) 1937Assert.Throws<InvalidOperationException>(() => graphics.GetNearestColor(Color.Red)); 1952AssertExtensions.Throws<ArgumentException>(null, () => graphics.GetNearestColor(Color.Red)); 1971Pen pen = new(Color.Red); 1985using Pen pen = new(Color.Red); 1997using Pen pen = new(Color.Red); 2009using Pen pen = new(Color.Red); 2028using Pen pen = new(Color.Red); 2053Pen pen = new(Color.Red); 2066using Pen pen = new(Color.Red); 2084using Pen pen = new(Color.Red); 2107Pen pen = new(Color.Red); 2119using Pen pen = new(Color.Red); 2129using Pen pen = new(Color.Red); 2139using Pen pen = new(Color.Red); 2156using Pen pen = new(Color.Red); 2180Pen pen = new(Color.Red); 2194using Pen pen = new(Color.Red); 2213using Pen pen = new(Color.Red); 2239Pen pen = new(Color.Red); 2253using Pen pen = new(Color.Red); 2265using Pen pen = new(Color.Red); 2277using Pen pen = new(Color.Red); 2296using Pen pen = new(Color.Red); 2320Pen pen = new(Color.Red); 2332using Pen pen = new(Color.Red); 2344using Pen pen = new(Color.Red); 2354using Pen pen = new(Color.Red); 2371using Pen pen = new(Color.Red); 2394Pen pen = new(Color.Red); 2405using Pen pen = new(Color.Red); 2414using Pen pen = new(Color.Red); 2426using Pen pen = new(Color.Red); 2443using Pen pen = new(Color.Red); 2470Pen pen = new(Color.Red); 2487using Pen pen = new(Color.Red); 2504using Pen pen = new(Color.Red); 2524using Pen pen = new(Color.Red); 2535using Pen pen = new(Color.Red); 2557using Pen pen = new(Color.Red); 2586Pen pen = new(Color.Red); 2600using Pen pen = new(Color.Red); 2615using Pen pen = new(Color.Red); 2627using Pen pen = new(Color.Red); 2646using Pen pen = new(Color.Red); 2671SolidBrush brush = new(Color.Red); 2684using SolidBrush brush = new(Color.Red); 2695using SolidBrush brush = new(Color.Red); 2706using SolidBrush brush = new(Color.Red); 2724using SolidBrush brush = new(Color.Red); 2736Color color = Color.FromArgb(Color.Plum.ToArgb()); 2756using Pen pen = new(Color.Red); 2760Assert.Throws<InvalidOperationException>(() => graphics.Clear(Color.Red)); 2772using Pen pen = new(Color.Red); 2776AssertExtensions.Throws<ArgumentException>(null, () => graphics.Clear(Color.Red));
System\Drawing\IconTests.cs (2)
733Color e = expected.GetPixel(x, y); 734Color a = actual.GetPixel(x, y);
System\Drawing\Imaging\ColorMapTests.cs (4)
21NewColor = Color.AliceBlue 23Assert.Equal(Color.AliceBlue, cm.NewColor); 31OldColor = Color.AliceBlue 33Assert.Equal(Color.AliceBlue, cm.OldColor);
System\Drawing\Imaging\Effects\EffectsTests.cs (1)
19bitmap.GetPixel(0, 0).Should().Be(Color.FromArgb(255, 255, 255, 239));
System\Drawing\Imaging\ImageAttributesTests.cs (150)
33private readonly Color _actualYellow = Color.FromArgb(255, 255, 255, 0); 34private readonly Color _actualGreen = Color.FromArgb(255, 0, 255, 0); 35private readonly Color _expectedRed = Color.FromArgb(255, 255, 0, 0); 36private readonly Color _expectedBlack = Color.FromArgb(255, 0, 0, 0); 57new() { OldColor = Color.FromArgb(255, 255, 255, 0), NewColor = Color.FromArgb(255, 255, 0, 0) } 109yield return new object[] { Color.FromArgb(100, 255, 0, 0) }; 110yield return new object[] { Color.FromArgb(255, 255, 155, 155) }; 115public void SetColorMatrix_ColorMatrixI_Success(Color color) 138Assert.Equal(Color.FromArgb(255, 255, 155, 155), bitmapBig.GetPixel(50, 50)); 139Assert.Equal(Color.FromArgb(255, 255, 205, 205), bitmapBig.GetPixel(150, 50)); 145var grayShade = Color.FromArgb(255, 100, 100, 100); 347bitmap.SetPixel(1, 1, Color.FromArgb(255, 100, 100, 100)); 350Assert.Equal(Color.FromArgb(255, 100, 0, 100), bitmap.GetPixel(1, 1)); 355yield return new object[] { ColorMatrixFlag.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 0, 100) }; 356yield return new object[] { ColorMatrixFlag.SkipGrays, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 100, 100) }; 357yield return new object[] { ColorMatrixFlag.AltGrays, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 200, 255) }; 362public void SetColorMatrices_ColorMatrixGrayMatrixFlags_Success(ColorMatrixFlag flag, Color grayShade, Color expectedGrayShade) 378yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 0, 100) }; 379yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 100, 100) }; 380yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 200, 255) }; 381yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 0, 100) }; 382yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 100, 100) }; 383yield 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) 405yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) }; 406yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) }; 407yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) }; 408yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) }; 409yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) }; 410yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) }; 411yield return new object[] { ColorMatrixFlag.Default, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) }; 412yield return new object[] { ColorMatrixFlag.SkipGrays, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) }; 413yield return new object[] { ColorMatrixFlag.AltGrays, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) }; 418public void SetColorMatrices_ColorMatrixGrayMatrixFlagsTypesI_Success(ColorMatrixFlag flag, ColorAdjustType type, Color grayShade) 486bitmap.SetPixel(0, 0, Color.FromArgb(255, 230, 50, 220)); 488Assert.Equal(Color.FromArgb(255, 255, 0, 255), bitmap.GetPixel(0, 0)); 499bitmap.SetPixel(0, 0, Color.FromArgb(255, 230, 50, 220)); 501Assert.Equal(Color.FromArgb(255, 255, 0, 255), bitmap.GetPixel(0, 0)); 512bitmap.SetPixel(0, 0, Color.FromArgb(255, 230, 50, 220)); 514Assert.Equal(Color.FromArgb(255, 230, 50, 220), bitmap.GetPixel(0, 0)); 542bitmap.SetPixel(0, 0, Color.FromArgb(255, 230, 50, 220)); 544Assert.Equal(Color.FromArgb(255, 230, 50, 220), bitmap.GetPixel(0, 0)); 556bitmap.SetPixel(0, 0, Color.FromArgb(255, 230, 50, 220)); 558Assert.Equal(Color.FromArgb(255, 230, 50, 220), bitmap.GetPixel(0, 0)); 585bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 255, 0)); 587Assert.Equal(Color.FromArgb(255, 33, 255, 0), bitmap.GetPixel(0, 0)); 598bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 255, 0)); 600Assert.Equal(Color.FromArgb(255, 33, 255, 0), bitmap.GetPixel(0, 0)); 611bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 255, 0)); 613Assert.Equal(Color.FromArgb(255, 100, 255, 0), bitmap.GetPixel(0, 0)); 644bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 255, 0)); 646Assert.Equal(Color.FromArgb(255, 100, 255, 0), bitmap.GetPixel(0, 0)); 691bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 255, 0)); 693Assert.Equal(Color.FromArgb(255, 100, 255, 0), bitmap.GetPixel(0, 0)); 742bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 255, 0)); 744Assert.Equal(Color.FromArgb(255, 33, 0, 0), bitmap.GetPixel(0, 0)); 759bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 255, 0)); 761Assert.Equal(Color.FromArgb(255, 100, 255, 0), bitmap.GetPixel(0, 0)); 789imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150)); 791bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 100, 100)); 793Assert.Equal(Color.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0)); 804imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150), type); 806bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 100, 100)); 808Assert.Equal(Color.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0)); 818imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150), type); 820bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 100, 100)); 822Assert.Equal(Color.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0)); 831AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150))); 833imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150), ColorAdjustType.Default)); 842imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150), type)); 851imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150)); 854bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 100, 100)); 856Assert.Equal(Color.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0)); 866imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150), type); 869bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 100, 100)); 871Assert.Equal(Color.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0)); 894yield return new object[] { ColorChannelFlag.ColorChannelC, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 198, 198, 198) }; 895yield return new object[] { ColorChannelFlag.ColorChannelK, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 108, 108, 108) }; 896yield return new object[] { ColorChannelFlag.ColorChannelM, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 204, 204, 204) }; 897yield return new object[] { ColorChannelFlag.ColorChannelY, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 207, 207, 207) }; 902public void SetOutputChannel_Flag_Success(ColorChannelFlag flag, Color actualColor, Color expectedColor) 916yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 198, 198, 198) }; 917yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 108, 108, 108) }; 918yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 204, 204, 204) }; 919yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 207, 207, 207) }; 920yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 198, 198, 198) }; 921yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 108, 108, 108) }; 922yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 204, 204, 204) }; 923yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 207, 207, 207) }; 928public void SetOutputChannel_FlagType_Success(ColorChannelFlag flag, ColorAdjustType type, Color actualColor, Color expectedColor) 942yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) }; 943yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) }; 944yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) }; 945yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) }; 946yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) }; 947yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) }; 948yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) }; 949yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) }; 950yield return new object[] { ColorChannelFlag.ColorChannelC, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) }; 951yield return new object[] { ColorChannelFlag.ColorChannelK, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) }; 952yield return new object[] { ColorChannelFlag.ColorChannelM, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) }; 953yield return new object[] { ColorChannelFlag.ColorChannelY, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) }; 958public void SetOutputChannel_FlagTypeI_Success(ColorChannelFlag flag, ColorAdjustType type, Color color) 1061bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 100, 100)); 1063Assert.Equal(Color.FromArgb(255, 198, 198, 198), bitmap.GetPixel(0, 0)); 1129bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 100, 100)); 1131Assert.Equal(Color.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0)); 1145bitmap.SetPixel(0, 0, Color.FromArgb(255, 100, 100, 100)); 1147Assert.Equal(Color.FromArgb(255, 100, 100, 100), bitmap.GetPixel(0, 0)); 1297AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black)); 1298AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black, true));
System\Drawing\PensTests.cs (144)
12yield return Pen(() => Pens.AliceBlue, Color.AliceBlue); 13yield return Pen(() => Pens.AntiqueWhite, Color.AntiqueWhite); 14yield return Pen(() => Pens.Aqua, Color.Aqua); 15yield return Pen(() => Pens.Aquamarine, Color.Aquamarine); 16yield return Pen(() => Pens.Azure, Color.Azure); 17yield return Pen(() => Pens.Beige, Color.Beige); 18yield return Pen(() => Pens.Bisque, Color.Bisque); 19yield return Pen(() => Pens.Black, Color.Black); 20yield return Pen(() => Pens.BlanchedAlmond, Color.BlanchedAlmond); 21yield return Pen(() => Pens.Blue, Color.Blue); 22yield return Pen(() => Pens.BlueViolet, Color.BlueViolet); 23yield return Pen(() => Pens.Brown, Color.Brown); 24yield return Pen(() => Pens.BurlyWood, Color.BurlyWood); 25yield return Pen(() => Pens.CadetBlue, Color.CadetBlue); 26yield return Pen(() => Pens.Chartreuse, Color.Chartreuse); 27yield return Pen(() => Pens.Chocolate, Color.Chocolate); 28yield return Pen(() => Pens.Coral, Color.Coral); 29yield return Pen(() => Pens.CornflowerBlue, Color.CornflowerBlue); 30yield return Pen(() => Pens.Cornsilk, Color.Cornsilk); 31yield return Pen(() => Pens.Crimson, Color.Crimson); 32yield return Pen(() => Pens.Cyan, Color.Cyan); 33yield return Pen(() => Pens.DarkBlue, Color.DarkBlue); 34yield return Pen(() => Pens.DarkCyan, Color.DarkCyan); 35yield return Pen(() => Pens.DarkGoldenrod, Color.DarkGoldenrod); 36yield return Pen(() => Pens.DarkGray, Color.DarkGray); 37yield return Pen(() => Pens.DarkGreen, Color.DarkGreen); 38yield return Pen(() => Pens.DarkKhaki, Color.DarkKhaki); 39yield return Pen(() => Pens.DarkMagenta, Color.DarkMagenta); 40yield return Pen(() => Pens.DarkOliveGreen, Color.DarkOliveGreen); 41yield return Pen(() => Pens.DarkOrange, Color.DarkOrange); 42yield return Pen(() => Pens.DarkOrchid, Color.DarkOrchid); 43yield return Pen(() => Pens.DarkRed, Color.DarkRed); 44yield return Pen(() => Pens.DarkSalmon, Color.DarkSalmon); 45yield return Pen(() => Pens.DarkSeaGreen, Color.DarkSeaGreen); 46yield return Pen(() => Pens.DarkSlateBlue, Color.DarkSlateBlue); 47yield return Pen(() => Pens.DarkSlateGray, Color.DarkSlateGray); 48yield return Pen(() => Pens.DarkTurquoise, Color.DarkTurquoise); 49yield return Pen(() => Pens.DarkViolet, Color.DarkViolet); 50yield return Pen(() => Pens.DeepPink, Color.DeepPink); 51yield return Pen(() => Pens.DeepSkyBlue, Color.DeepSkyBlue); 52yield return Pen(() => Pens.DimGray, Color.DimGray); 53yield return Pen(() => Pens.DodgerBlue, Color.DodgerBlue); 54yield return Pen(() => Pens.Firebrick, Color.Firebrick); 55yield return Pen(() => Pens.FloralWhite, Color.FloralWhite); 56yield return Pen(() => Pens.ForestGreen, Color.ForestGreen); 57yield return Pen(() => Pens.Fuchsia, Color.Fuchsia); 58yield return Pen(() => Pens.Gainsboro, Color.Gainsboro); 59yield return Pen(() => Pens.GhostWhite, Color.GhostWhite); 60yield return Pen(() => Pens.Gold, Color.Gold); 61yield return Pen(() => Pens.Goldenrod, Color.Goldenrod); 62yield return Pen(() => Pens.Gray, Color.Gray); 63yield return Pen(() => Pens.Green, Color.Green); 64yield return Pen(() => Pens.GreenYellow, Color.GreenYellow); 65yield return Pen(() => Pens.Honeydew, Color.Honeydew); 66yield return Pen(() => Pens.HotPink, Color.HotPink); 67yield return Pen(() => Pens.IndianRed, Color.IndianRed); 68yield return Pen(() => Pens.Indigo, Color.Indigo); 69yield return Pen(() => Pens.Ivory, Color.Ivory); 70yield return Pen(() => Pens.Khaki, Color.Khaki); 71yield return Pen(() => Pens.Lavender, Color.Lavender); 72yield return Pen(() => Pens.LavenderBlush, Color.LavenderBlush); 73yield return Pen(() => Pens.LawnGreen, Color.LawnGreen); 74yield return Pen(() => Pens.LemonChiffon, Color.LemonChiffon); 75yield return Pen(() => Pens.LightBlue, Color.LightBlue); 76yield return Pen(() => Pens.LightCoral, Color.LightCoral); 77yield return Pen(() => Pens.LightCyan, Color.LightCyan); 78yield return Pen(() => Pens.LightGoldenrodYellow, Color.LightGoldenrodYellow); 79yield return Pen(() => Pens.LightGray, Color.LightGray); 80yield return Pen(() => Pens.LightGreen, Color.LightGreen); 81yield return Pen(() => Pens.LightPink, Color.LightPink); 82yield return Pen(() => Pens.LightSalmon, Color.LightSalmon); 83yield return Pen(() => Pens.LightSeaGreen, Color.LightSeaGreen); 84yield return Pen(() => Pens.LightSkyBlue, Color.LightSkyBlue); 85yield return Pen(() => Pens.LightSlateGray, Color.LightSlateGray); 86yield return Pen(() => Pens.LightSteelBlue, Color.LightSteelBlue); 87yield return Pen(() => Pens.LightYellow, Color.LightYellow); 88yield return Pen(() => Pens.Lime, Color.Lime); 89yield return Pen(() => Pens.LimeGreen, Color.LimeGreen); 90yield return Pen(() => Pens.Linen, Color.Linen); 91yield return Pen(() => Pens.Magenta, Color.Magenta); 92yield return Pen(() => Pens.Maroon, Color.Maroon); 93yield return Pen(() => Pens.MediumAquamarine, Color.MediumAquamarine); 94yield return Pen(() => Pens.MediumBlue, Color.MediumBlue); 95yield return Pen(() => Pens.MediumOrchid, Color.MediumOrchid); 96yield return Pen(() => Pens.MediumPurple, Color.MediumPurple); 97yield return Pen(() => Pens.MediumSeaGreen, Color.MediumSeaGreen); 98yield return Pen(() => Pens.MediumSlateBlue, Color.MediumSlateBlue); 99yield return Pen(() => Pens.MediumSpringGreen, Color.MediumSpringGreen); 100yield return Pen(() => Pens.MediumTurquoise, Color.MediumTurquoise); 101yield return Pen(() => Pens.MediumVioletRed, Color.MediumVioletRed); 102yield return Pen(() => Pens.MidnightBlue, Color.MidnightBlue); 103yield return Pen(() => Pens.MintCream, Color.MintCream); 104yield return Pen(() => Pens.MistyRose, Color.MistyRose); 105yield return Pen(() => Pens.Moccasin, Color.Moccasin); 106yield return Pen(() => Pens.NavajoWhite, Color.NavajoWhite); 107yield return Pen(() => Pens.Navy, Color.Navy); 108yield return Pen(() => Pens.OldLace, Color.OldLace); 109yield return Pen(() => Pens.Olive, Color.Olive); 110yield return Pen(() => Pens.OliveDrab, Color.OliveDrab); 111yield return Pen(() => Pens.Orange, Color.Orange); 112yield return Pen(() => Pens.OrangeRed, Color.OrangeRed); 113yield return Pen(() => Pens.Orchid, Color.Orchid); 114yield return Pen(() => Pens.PaleGoldenrod, Color.PaleGoldenrod); 115yield return Pen(() => Pens.PaleGreen, Color.PaleGreen); 116yield return Pen(() => Pens.PaleTurquoise, Color.PaleTurquoise); 117yield return Pen(() => Pens.PaleVioletRed, Color.PaleVioletRed); 118yield return Pen(() => Pens.PapayaWhip, Color.PapayaWhip); 119yield return Pen(() => Pens.PeachPuff, Color.PeachPuff); 120yield return Pen(() => Pens.Peru, Color.Peru); 121yield return Pen(() => Pens.Pink, Color.Pink); 122yield return Pen(() => Pens.Plum, Color.Plum); 123yield return Pen(() => Pens.PowderBlue, Color.PowderBlue); 124yield return Pen(() => Pens.Purple, Color.Purple); 125yield return Pen(() => Pens.Red, Color.Red); 126yield return Pen(() => Pens.RosyBrown, Color.RosyBrown); 127yield return Pen(() => Pens.RoyalBlue, Color.RoyalBlue); 128yield return Pen(() => Pens.SaddleBrown, Color.SaddleBrown); 129yield return Pen(() => Pens.Salmon, Color.Salmon); 130yield return Pen(() => Pens.SandyBrown, Color.SandyBrown); 131yield return Pen(() => Pens.SeaGreen, Color.SeaGreen); 132yield return Pen(() => Pens.SeaShell, Color.SeaShell); 133yield return Pen(() => Pens.Sienna, Color.Sienna); 134yield return Pen(() => Pens.Silver, Color.Silver); 135yield return Pen(() => Pens.SkyBlue, Color.SkyBlue); 136yield return Pen(() => Pens.SlateBlue, Color.SlateBlue); 137yield return Pen(() => Pens.SlateGray, Color.SlateGray); 138yield return Pen(() => Pens.Snow, Color.Snow); 139yield return Pen(() => Pens.SpringGreen, Color.SpringGreen); 140yield return Pen(() => Pens.SteelBlue, Color.SteelBlue); 141yield return Pen(() => Pens.Tan, Color.Tan); 142yield return Pen(() => Pens.Teal, Color.Teal); 143yield return Pen(() => Pens.Thistle, Color.Thistle); 144yield return Pen(() => Pens.Tomato, Color.Tomato); 145yield return Pen(() => Pens.Transparent, Color.Transparent); 146yield return Pen(() => Pens.Turquoise, Color.Turquoise); 147yield return Pen(() => Pens.Violet, Color.Violet); 148yield return Pen(() => Pens.Wheat, Color.Wheat); 149yield return Pen(() => Pens.White, Color.White); 150yield return Pen(() => Pens.WhiteSmoke, Color.WhiteSmoke); 151yield return Pen(() => Pens.Yellow, Color.Yellow); 152yield return Pen(() => Pens.YellowGreen, Color.YellowGreen); 155public static object[] Pen(Func<Pen> getPen, Color expectedColor) => [getPen, expectedColor]; 159public void Pens_Get_ReturnsExpected(Func<Pen> getPen, Color expectedColor) 164AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.AliceBlue);
System\Drawing\PenTests.cs (108)
13yield return new object[] { new SolidBrush(Color.Red), PenType.SolidColor }; 14yield return new object[] { new HatchBrush(HatchStyle.BackwardDiagonal, Color.Red), PenType.HatchFill }; 15yield return new object[] { new LinearGradientBrush(new Point(0, 0), new Point(0, 2), Color.Purple, Color.Plum), PenType.LinearGradient }; 41yield return new object[] { new SolidBrush(Color.Red), 0, PenType.SolidColor }; 48yield return new object[] { new SolidBrush(Color.Red), float.PositiveInfinity, PenType.SolidColor }; 49yield return new object[] { new SolidBrush(Color.Red), float.NaN, PenType.SolidColor }; 50yield return new object[] { new SolidBrush(Color.Red), float.MaxValue, PenType.SolidColor }; 67using SolidBrush brush = new(Color.Red); 69brush.Color = Color.Blue; 70Assert.Equal(Color.FromArgb(Color.Red.ToArgb()), pen.Color); 84SolidBrush brush = new(Color.Red); 94using Pen pen = new(Color.Red); 96Assert.Equal(Color.Red, pen.Color); 109using Pen pen = new(Color.Red, width); 111Assert.Equal(Color.Red, pen.Color); 122using SolidBrush brush = new(Color.Red); 133using SolidBrush brush = new(Color.Red); 141using SolidBrush brush = new(Color.Red); 153using Pen pen = new(Color.Red); 162using Pen pen = new(Color.Red); 174using SolidBrush brush = new(Color.Red); 182using SolidBrush brush = new(Color.Red); 191using SolidBrush brush = new(Color.Red); 201using SolidBrush brush = new(Color.Red); 227using SolidBrush brush = new(Color.Red); 237using SolidBrush brush = new(Color.Red); 239Assert.Equal(Color.FromArgb(Color.Red.ToArgb()), pen.Color); 245using HatchBrush brush = new(HatchStyle.BackwardDiagonal, Color.Red); 253using LinearGradientBrush brush = new(Point.Empty, new Point(1, 2), Color.Blue, Color.Red); 271pen.Color = Color.Red; 272Assert.Equal(Color.Red, pen.Color); 274pen.Color = Color.Red; 275Assert.Equal(Color.Red, pen.Color); 282Pen pen = new(Color.Red); 285Assert.Equal(Color.Red, pen.Color); 287pen.Color = Color.Red; 288Assert.Equal(Color.Red, pen.Color); 290AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.Black); 296using SolidBrush brush = new(Color.Red); 301AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.Red); 310using SolidBrush brush = new(Color.Red); 323using SolidBrush brush = new(Color.Red); 331using SolidBrush brush = new(Color.Red); 347using SolidBrush brush = new(Color.Red); 355using SolidBrush brush = new(Color.Red); 366using SolidBrush brush = new(Color.Red); 383using SolidBrush brush = new(Color.Red); 391using SolidBrush brush = new(Color.Red); 404using SolidBrush brush = new(Color.Red); 418using SolidBrush brush = new(Color.Red); 435using SolidBrush brush = new(Color.Red); 443using SolidBrush brush = new(Color.Red); 456using SolidBrush brush = new(Color.Red); 473using SolidBrush brush = new(Color.Red); 485using SolidBrush brush = new(Color.Red); 493using SolidBrush brush = new(Color.Red); 510using SolidBrush brush = new(Color.Red); 519using SolidBrush brush = new(Color.Red); 534using SolidBrush brush = new(Color.Red); 548using SolidBrush brush = new(Color.Red); 556using SolidBrush brush = new(Color.Red); 568using SolidBrush brush = new(Color.Red); 576using SolidBrush brush = new(Color.Red); 593using SolidBrush brush = new(Color.Red); 611using SolidBrush brush = new(Color.Red); 625using SolidBrush brush = new(Color.Red); 633using SolidBrush brush = new(Color.Red); 660using SolidBrush brush = new(Color.Red); 679using SolidBrush brush = new(Color.Red); 687using SolidBrush brush = new(Color.Red); 702using SolidBrush brush = new(Color.Red); 713using SolidBrush brush = new(Color.Red); 721using SolidBrush brush = new(Color.Red); 738using SolidBrush brush = new(Color.Red); 747using SolidBrush brush = new(Color.Red); 769using SolidBrush brush = new(Color.Red); 795using SolidBrush brush = new(Color.Red); 804using SolidBrush brush = new(Color.Red); 814using SolidBrush brush = new(Color.Red); 833using SolidBrush brush = new(Color.Red); 846using SolidBrush brush = new(Color.Red); 858using SolidBrush brush = new(Color.Red); 873using SolidBrush brush = new(Color.Red); 898using (SolidBrush brush = new(Color.Red)) 922using SolidBrush brush = new(Color.Red); 930using SolidBrush brush = new(Color.Red); 958using (SolidBrush brush = new(Color.Red)) 982using SolidBrush brush = new(Color.Red); 990using SolidBrush brush = new(Color.Red); 1005using SolidBrush brush = new(Color.Red); 1022using SolidBrush brush = new(Color.Red); 1033using SolidBrush brush = new(Color.Red); 1043using SolidBrush brush = new(Color.Red); 1051using SolidBrush brush = new(Color.Red); 1062using SolidBrush brush = new(Color.Red); 1077using SolidBrush brush = new(Color.Red); 1085using SolidBrush brush = new(Color.Red); 1094using SolidBrush brush = new(Color.Red); 1105using SolidBrush brush = new(Color.Red); 1133using (SolidBrush brush = new(Color.Red)) 1157using SolidBrush brush = new(Color.Red); 1165using SolidBrush brush = new(Color.Red); 1183using SolidBrush brush = new(Color.Red); 1192using SolidBrush brush = new(Color.Red);
System\Drawing\SolidBrushTests.cs (22)
10yield return new object[] { default(Color), Color.FromArgb(0) }; 11yield return new object[] { Color.PapayaWhip, Color.PapayaWhip }; 16public void Ctor_Color(Color color, Color expectedColor) 25SolidBrush brush = new(Color.PeachPuff); 32Assert.NotEqual(Color.PeachPuff, clone.Color); 35brush.Color = Color.PapayaWhip; 36Assert.NotEqual(Color.PapayaWhip, clone.Color); 47Assert.Equal(Color.Bisque, brush.Color); 53SolidBrush brush = new(Color.LavenderBlush); 62SolidBrush brush = new(default(Color)); 71SolidBrush brush = new(Color.Aquamarine); 74Assert.Equal(Color.Aquamarine, brush.Color); 80SolidBrush brush = new(Color.Goldenrod) { Color = Color.GhostWhite }; 81Assert.Equal(Color.GhostWhite, brush.Color); 87SolidBrush brush = new(default(Color)); 90AssertExtensions.Throws<ArgumentException>(null, () => brush.Color = Color.WhiteSmoke); 97AssertExtensions.Throws<ArgumentException>(null, () => brush.Color = Color.AntiqueWhite); 103SolidBrush brush = new(Color.Plum);
System\Drawing\SystemBrushesTests.cs (4)
45public static object[] Brush(Func<Brush> getBrush, Color expectedColor) => [getBrush, expectedColor]; 49public void SystemBrushes_Get_ReturnsExpected(Func<Brush> getBrush, Color expectedColor) 53AssertExtensions.Throws<ArgumentException>(null, () => brush.Color = Color.Red); 61AssertExtensions.Throws<ArgumentException>(null, () => SystemBrushes.FromSystemColor(Color.Blue));
System\Drawing\SystemPensTest.cs (4)
47public static object[] Pen(Func<Pen> getPen, Color expectedColor) => [getPen, expectedColor]; 51public void SystemPens_Get_ReturnsExpected(Func<Pen> getPen, Color expectedColor) 63AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.AliceBlue); 86AssertExtensions.Throws<ArgumentException>(null, () => SystemPens.FromSystemColor(Color.Blue));
System\Drawing\TextureBrushTests.cs (75)
729Color 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] 803private static void VerifyFillRect(WrapMode wrapMode, Color[][] expectedColors) 806brushBitmap.SetPixel(0, 0, Color.Red); 807brushBitmap.SetPixel(1, 0, Color.Green); 808brushBitmap.SetPixel(0, 1, Color.Blue); 809brushBitmap.SetPixel(1, 1, Color.Yellow);
System.Drawing.Primitives (340)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (11)
12public static Color ConvertFromString(string strValue, CultureInfo culture) 20return Color.Empty; 24Color c; 45return Color.FromName(colorName); 52return PossibleKnownColor(Color.FromArgb(unchecked((int)(0xFF000000 | (uint)IntFromString(text, culture))))); 641 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture))), 653 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture))), 664 => PossibleKnownColor(Color.FromArgb(IntFromString(textSpan[tokens[0]], culture), IntFromString(textSpan[tokens[1]], culture), IntFromString(textSpan[tokens[2]], culture), IntFromString(textSpan[tokens[3]], culture))), 71private static Color PossibleKnownColor(Color color) 79foreach (Color c in ColorTable.Colors.Values)
src\libraries\Common\src\System\Drawing\ColorTable.cs (10)
12private static readonly Lazy<Dictionary<string, Color>> s_colorConstants = new Lazy<Dictionary<string, Color>>(GetColors); 14private static Dictionary<string, Color> GetColors() 16var colors = new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase); 17FillWithProperties(colors, typeof(Color)); 23Dictionary<string, Color> dictionary, 28if (prop.PropertyType == typeof(Color)) 29dictionary[prop.Name] = (Color)prop.GetValue(null, null)!; 33internal static Dictionary<string, Color> Colors => s_colorConstants.Value; 35internal static bool TryGetNamedColor(string name, out Color result) => Colors.TryGetValue(name, out result);
System\Drawing\Color.cs (162)
17public readonly struct Color : IEquatable<Color> 19public static readonly Color Empty; 24public static Color Transparent => new Color(KnownColor.Transparent); 26public static Color AliceBlue => new Color(KnownColor.AliceBlue); 28public static Color AntiqueWhite => new Color(KnownColor.AntiqueWhite); 30public static Color Aqua => new Color(KnownColor.Aqua); 32public static Color Aquamarine => new Color(KnownColor.Aquamarine); 34public static Color Azure => new Color(KnownColor.Azure); 36public static Color Beige => new Color(KnownColor.Beige); 38public static Color Bisque => new Color(KnownColor.Bisque); 40public static Color Black => new Color(KnownColor.Black); 42public static Color BlanchedAlmond => new Color(KnownColor.BlanchedAlmond); 44public static Color Blue => new Color(KnownColor.Blue); 46public static Color BlueViolet => new Color(KnownColor.BlueViolet); 48public static Color Brown => new Color(KnownColor.Brown); 50public static Color BurlyWood => new Color(KnownColor.BurlyWood); 52public static Color CadetBlue => new Color(KnownColor.CadetBlue); 54public static Color Chartreuse => new Color(KnownColor.Chartreuse); 56public static Color Chocolate => new Color(KnownColor.Chocolate); 58public static Color Coral => new Color(KnownColor.Coral); 60public static Color CornflowerBlue => new Color(KnownColor.CornflowerBlue); 62public static Color Cornsilk => new Color(KnownColor.Cornsilk); 64public static Color Crimson => new Color(KnownColor.Crimson); 66public static Color Cyan => new Color(KnownColor.Cyan); 68public static Color DarkBlue => new Color(KnownColor.DarkBlue); 70public static Color DarkCyan => new Color(KnownColor.DarkCyan); 72public static Color DarkGoldenrod => new Color(KnownColor.DarkGoldenrod); 74public static Color DarkGray => new Color(KnownColor.DarkGray); 76public static Color DarkGreen => new Color(KnownColor.DarkGreen); 78public static Color DarkKhaki => new Color(KnownColor.DarkKhaki); 80public static Color DarkMagenta => new Color(KnownColor.DarkMagenta); 82public static Color DarkOliveGreen => new Color(KnownColor.DarkOliveGreen); 84public static Color DarkOrange => new Color(KnownColor.DarkOrange); 86public static Color DarkOrchid => new Color(KnownColor.DarkOrchid); 88public static Color DarkRed => new Color(KnownColor.DarkRed); 90public static Color DarkSalmon => new Color(KnownColor.DarkSalmon); 92public static Color DarkSeaGreen => new Color(KnownColor.DarkSeaGreen); 94public static Color DarkSlateBlue => new Color(KnownColor.DarkSlateBlue); 96public static Color DarkSlateGray => new Color(KnownColor.DarkSlateGray); 98public static Color DarkTurquoise => new Color(KnownColor.DarkTurquoise); 100public static Color DarkViolet => new Color(KnownColor.DarkViolet); 102public static Color DeepPink => new Color(KnownColor.DeepPink); 104public static Color DeepSkyBlue => new Color(KnownColor.DeepSkyBlue); 106public static Color DimGray => new Color(KnownColor.DimGray); 108public static Color DodgerBlue => new Color(KnownColor.DodgerBlue); 110public static Color Firebrick => new Color(KnownColor.Firebrick); 112public static Color FloralWhite => new Color(KnownColor.FloralWhite); 114public static Color ForestGreen => new Color(KnownColor.ForestGreen); 116public static Color Fuchsia => new Color(KnownColor.Fuchsia); 118public static Color Gainsboro => new Color(KnownColor.Gainsboro); 120public static Color GhostWhite => new Color(KnownColor.GhostWhite); 122public static Color Gold => new Color(KnownColor.Gold); 124public static Color Goldenrod => new Color(KnownColor.Goldenrod); 126public static Color Gray => new Color(KnownColor.Gray); 128public static Color Green => new Color(KnownColor.Green); 130public static Color GreenYellow => new Color(KnownColor.GreenYellow); 132public static Color Honeydew => new Color(KnownColor.Honeydew); 134public static Color HotPink => new Color(KnownColor.HotPink); 136public static Color IndianRed => new Color(KnownColor.IndianRed); 138public static Color Indigo => new Color(KnownColor.Indigo); 140public static Color Ivory => new Color(KnownColor.Ivory); 142public static Color Khaki => new Color(KnownColor.Khaki); 144public static Color Lavender => new Color(KnownColor.Lavender); 146public static Color LavenderBlush => new Color(KnownColor.LavenderBlush); 148public static Color LawnGreen => new Color(KnownColor.LawnGreen); 150public static Color LemonChiffon => new Color(KnownColor.LemonChiffon); 152public static Color LightBlue => new Color(KnownColor.LightBlue); 154public static Color LightCoral => new Color(KnownColor.LightCoral); 156public static Color LightCyan => new Color(KnownColor.LightCyan); 158public static Color LightGoldenrodYellow => new Color(KnownColor.LightGoldenrodYellow); 160public static Color LightGreen => new Color(KnownColor.LightGreen); 162public static Color LightGray => new Color(KnownColor.LightGray); 164public static Color LightPink => new Color(KnownColor.LightPink); 166public static Color LightSalmon => new Color(KnownColor.LightSalmon); 168public static Color LightSeaGreen => new Color(KnownColor.LightSeaGreen); 170public static Color LightSkyBlue => new Color(KnownColor.LightSkyBlue); 172public static Color LightSlateGray => new Color(KnownColor.LightSlateGray); 174public static Color LightSteelBlue => new Color(KnownColor.LightSteelBlue); 176public static Color LightYellow => new Color(KnownColor.LightYellow); 178public static Color Lime => new Color(KnownColor.Lime); 180public static Color LimeGreen => new Color(KnownColor.LimeGreen); 182public static Color Linen => new Color(KnownColor.Linen); 184public static Color Magenta => new Color(KnownColor.Magenta); 186public static Color Maroon => new Color(KnownColor.Maroon); 188public static Color MediumAquamarine => new Color(KnownColor.MediumAquamarine); 190public static Color MediumBlue => new Color(KnownColor.MediumBlue); 192public static Color MediumOrchid => new Color(KnownColor.MediumOrchid); 194public static Color MediumPurple => new Color(KnownColor.MediumPurple); 196public static Color MediumSeaGreen => new Color(KnownColor.MediumSeaGreen); 198public static Color MediumSlateBlue => new Color(KnownColor.MediumSlateBlue); 200public static Color MediumSpringGreen => new Color(KnownColor.MediumSpringGreen); 202public static Color MediumTurquoise => new Color(KnownColor.MediumTurquoise); 204public static Color MediumVioletRed => new Color(KnownColor.MediumVioletRed); 206public static Color MidnightBlue => new Color(KnownColor.MidnightBlue); 208public static Color MintCream => new Color(KnownColor.MintCream); 210public static Color MistyRose => new Color(KnownColor.MistyRose); 212public static Color Moccasin => new Color(KnownColor.Moccasin); 214public static Color NavajoWhite => new Color(KnownColor.NavajoWhite); 216public static Color Navy => new Color(KnownColor.Navy); 218public static Color OldLace => new Color(KnownColor.OldLace); 220public static Color Olive => new Color(KnownColor.Olive); 222public static Color OliveDrab => new Color(KnownColor.OliveDrab); 224public static Color Orange => new Color(KnownColor.Orange); 226public static Color OrangeRed => new Color(KnownColor.OrangeRed); 228public static Color Orchid => new Color(KnownColor.Orchid); 230public static Color PaleGoldenrod => new Color(KnownColor.PaleGoldenrod); 232public static Color PaleGreen => new Color(KnownColor.PaleGreen); 234public static Color PaleTurquoise => new Color(KnownColor.PaleTurquoise); 236public static Color PaleVioletRed => new Color(KnownColor.PaleVioletRed); 238public static Color PapayaWhip => new Color(KnownColor.PapayaWhip); 240public static Color PeachPuff => new Color(KnownColor.PeachPuff); 242public static Color Peru => new Color(KnownColor.Peru); 244public static Color Pink => new Color(KnownColor.Pink); 246public static Color Plum => new Color(KnownColor.Plum); 248public static Color PowderBlue => new Color(KnownColor.PowderBlue); 250public static Color Purple => new Color(KnownColor.Purple); 256public static Color RebeccaPurple => new Color(KnownColor.RebeccaPurple); 258public static Color Red => new Color(KnownColor.Red); 260public static Color RosyBrown => new Color(KnownColor.RosyBrown); 262public static Color RoyalBlue => new Color(KnownColor.RoyalBlue); 264public static Color SaddleBrown => new Color(KnownColor.SaddleBrown); 266public static Color Salmon => new Color(KnownColor.Salmon); 268public static Color SandyBrown => new Color(KnownColor.SandyBrown); 270public static Color SeaGreen => new Color(KnownColor.SeaGreen); 272public static Color SeaShell => new Color(KnownColor.SeaShell); 274public static Color Sienna => new Color(KnownColor.Sienna); 276public static Color Silver => new Color(KnownColor.Silver); 278public static Color SkyBlue => new Color(KnownColor.SkyBlue); 280public static Color SlateBlue => new Color(KnownColor.SlateBlue); 282public static Color SlateGray => new Color(KnownColor.SlateGray); 284public static Color Snow => new Color(KnownColor.Snow); 286public static Color SpringGreen => new Color(KnownColor.SpringGreen); 288public static Color SteelBlue => new Color(KnownColor.SteelBlue); 290public static Color Tan => new Color(KnownColor.Tan); 292public static Color Teal => new Color(KnownColor.Teal); 294public static Color Thistle => new Color(KnownColor.Thistle); 296public static Color Tomato => new Color(KnownColor.Tomato); 298public static Color Turquoise => new Color(KnownColor.Turquoise); 300public static Color Violet => new Color(KnownColor.Violet); 302public static Color Wheat => new Color(KnownColor.Wheat); 304public static Color White => new Color(KnownColor.White); 306public static Color WhiteSmoke => new Color(KnownColor.WhiteSmoke); 308public static Color Yellow => new Color(KnownColor.Yellow); 310public static Color YellowGreen => new Color(KnownColor.YellowGreen); 441private static Color FromArgb(uint argb) => new Color(argb, StateARGBValueValid, null, (KnownColor)0); 443public static Color FromArgb(int argb) => FromArgb(unchecked((uint)argb)); 445public static Color FromArgb(int alpha, int red, int green, int blue) 460public static Color FromArgb(int alpha, Color baseColor) 470public static Color FromArgb(int red, int green, int blue) => FromArgb(byte.MaxValue, red, green, blue); 472public static Color FromKnownColor(KnownColor color) => 475public static Color FromName(string name) 478if (ColorTable.TryGetNamedColor(name, out Color color)) 573IsNamedColor ? $"{nameof(Color)} [{Name}]" : 574(state & StateValueMask) != 0 ? $"{nameof(Color)} [A={A}, R={R}, G={G}, B={B}]" : 575$"{nameof(Color)} [Empty]"; 577public static bool operator ==(Color left, Color right) => 583public static bool operator !=(Color left, Color right) => !(left == right); 585public override bool Equals([NotNullWhen(true)] object? obj) => obj is Color other && Equals(other); 587public bool Equals(Color other) => this == other;
System\Drawing\ColorTranslator.cs (82)
11/// Translates colors to and from GDI+ <see cref='Color'/> objects. 22private 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. 33public static int ToWin32(Color c) 43/// Translates the specified <see cref='Color'/> to an Ole color. 45public static int ToOle(Color c) 133/// Translates an Ole color value to a GDI+ <see cref='Color'/>. 135public static Color FromOle(int oleColor) 145return Color.FromKnownColor(KnownColor.ActiveBorder); 147return Color.FromKnownColor(KnownColor.ActiveCaption); 149return Color.FromKnownColor(KnownColor.ActiveCaptionText); 151return Color.FromKnownColor(KnownColor.AppWorkspace); 153return Color.FromKnownColor(KnownColor.Control); 155return Color.FromKnownColor(KnownColor.ControlDark); 157return Color.FromKnownColor(KnownColor.ControlDarkDark); 159return Color.FromKnownColor(KnownColor.ControlLight); 161return Color.FromKnownColor(KnownColor.ControlLightLight); 163return Color.FromKnownColor(KnownColor.ControlText); 165return Color.FromKnownColor(KnownColor.Desktop); 167return Color.FromKnownColor(KnownColor.GradientActiveCaption); 169return Color.FromKnownColor(KnownColor.GradientInactiveCaption); 171return Color.FromKnownColor(KnownColor.GrayText); 173return Color.FromKnownColor(KnownColor.Highlight); 175return Color.FromKnownColor(KnownColor.HighlightText); 177return Color.FromKnownColor(KnownColor.HotTrack); 179return Color.FromKnownColor(KnownColor.InactiveBorder); 181return Color.FromKnownColor(KnownColor.InactiveCaption); 183return Color.FromKnownColor(KnownColor.InactiveCaptionText); 185return Color.FromKnownColor(KnownColor.Info); 187return Color.FromKnownColor(KnownColor.InfoText); 189return Color.FromKnownColor(KnownColor.Menu); 191return Color.FromKnownColor(KnownColor.MenuBar); 193return Color.FromKnownColor(KnownColor.MenuHighlight); 195return Color.FromKnownColor(KnownColor.MenuText); 197return Color.FromKnownColor(KnownColor.ScrollBar); 199return Color.FromKnownColor(KnownColor.Window); 201return Color.FromKnownColor(KnownColor.WindowFrame); 203return Color.FromKnownColor(KnownColor.WindowText); 212/// Translates an Win32 color value to a GDI+ <see cref='Color'/>. 214public static Color FromWin32(int win32Color) 220/// Translates an Html color representation to a GDI+ <see cref='Color'/>. 222public static Color FromHtml(string htmlColor) 224Color c = Color.Empty; 236c = Color.FromArgb(Convert.ToInt32(htmlColor.Substring(1, 2), 16), 246c = Color.FromArgb(Convert.ToInt32(r + r, 16), 255c = Color.LightGray; 286/// Translates the specified <see cref='Color'/> to an Html string color representation. 288public static string ToHtml(Color c) 381if (c == Color.LightGray) 402s_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)
475internal static Color ArgbToKnownColor(uint argb) 477Debug.Assert((argb & Color.ARGBAlphaMask) == Color.ARGBAlphaMask); 485return Color.FromKnownColor((KnownColor)index); 490return Color.FromArgb((int)argb); 541Debug.Assert(Color.IsKnownColorSystem(color));
System\Drawing\SystemColors.cs (69)
12public static Color ActiveBorder => Color.FromKnownColor(KnownColor.ActiveBorder); 13public static Color ActiveCaption => Color.FromKnownColor(KnownColor.ActiveCaption); 14public static Color ActiveCaptionText => Color.FromKnownColor(KnownColor.ActiveCaptionText); 15public static Color AppWorkspace => Color.FromKnownColor(KnownColor.AppWorkspace); 17public static Color ButtonFace => Color.FromKnownColor(KnownColor.ButtonFace); 18public static Color ButtonHighlight => Color.FromKnownColor(KnownColor.ButtonHighlight); 19public static Color ButtonShadow => Color.FromKnownColor(KnownColor.ButtonShadow); 21public static Color Control => Color.FromKnownColor(KnownColor.Control); 22public static Color ControlDark => Color.FromKnownColor(KnownColor.ControlDark); 23public static Color ControlDarkDark => Color.FromKnownColor(KnownColor.ControlDarkDark); 24public static Color ControlLight => Color.FromKnownColor(KnownColor.ControlLight); 25public static Color ControlLightLight => Color.FromKnownColor(KnownColor.ControlLightLight); 26public static Color ControlText => Color.FromKnownColor(KnownColor.ControlText); 28public static Color Desktop => Color.FromKnownColor(KnownColor.Desktop); 30public static Color GradientActiveCaption => Color.FromKnownColor(KnownColor.GradientActiveCaption); 31public static Color GradientInactiveCaption => Color.FromKnownColor(KnownColor.GradientInactiveCaption); 32public static Color GrayText => Color.FromKnownColor(KnownColor.GrayText); 34public static Color Highlight => Color.FromKnownColor(KnownColor.Highlight); 35public static Color HighlightText => Color.FromKnownColor(KnownColor.HighlightText); 36public static Color HotTrack => Color.FromKnownColor(KnownColor.HotTrack); 38public static Color InactiveBorder => Color.FromKnownColor(KnownColor.InactiveBorder); 39public static Color InactiveCaption => Color.FromKnownColor(KnownColor.InactiveCaption); 40public static Color InactiveCaptionText => Color.FromKnownColor(KnownColor.InactiveCaptionText); 41public static Color Info => Color.FromKnownColor(KnownColor.Info); 42public static Color InfoText => Color.FromKnownColor(KnownColor.InfoText); 44public static Color Menu => Color.FromKnownColor(KnownColor.Menu); 45public static Color MenuBar => Color.FromKnownColor(KnownColor.MenuBar); 46public static Color MenuHighlight => Color.FromKnownColor(KnownColor.MenuHighlight); 47public static Color MenuText => Color.FromKnownColor(KnownColor.MenuText); 49public static Color ScrollBar => Color.FromKnownColor(KnownColor.ScrollBar); 51public static Color Window => Color.FromKnownColor(KnownColor.Window); 52public static Color WindowFrame => Color.FromKnownColor(KnownColor.WindowFrame); 53public static Color WindowText => Color.FromKnownColor(KnownColor.WindowText); 58/// <see cref="Color.FromKnownColor(KnownColor)"/>). This is currently "dark mode" 63/// <see cref="KnownColor"/> <see cref="Color"/> values are always looked up every 65/// <see cref="Color"/> values will change when this property is set.
System.Private.Windows.Core (55)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (8)
254/// Writes a <see cref="Color"/> in binary format. 256public static void WriteColor(Stream stream, Color value) 261new ClassInfo(1, typeof(Color).FullName!, s_colorMemberNames), 272typeof(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)! 747case Color color:
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (3)
224/// Tries to get this object as a <see cref="Color"/>. 235|| !classInfo.TypeNameMatches(typeof(Color)) 244ConstructorInfo? ctor = typeof(Color).GetConstructor(
System\Value.cs (16)
452public Value(Color value) 466public Value(Color? value) 478public static implicit operator Value(Color value) => new(value); 479public static explicit operator Color(in Value value) => value.GetValue<Color>(); 480public static implicit operator Value(Color? value) => new(value); 481public static explicit operator Color?(in Value value) => value.GetValue<Color?>(); 632if (typeof(T) == typeof(Color)) 633return new(Unsafe.As<T, Color>(ref Unsafe.AsRef(in value))); 720else if (typeof(T) == typeof(Color) && _object == TypeFlags.PackedColor) 722Color color = _union.PackedColor.Extract(); 723value = Unsafe.As<Color, T>(ref Unsafe.AsRef(in color)); 881else if (typeof(T) == typeof(Color?) && _object == TypeFlags.PackedColor) 883Color? color = _union.PackedColor.Extract(); 884value = Unsafe.As<Color?, T>(ref Unsafe.AsRef(in color));
System\Value.PackedColor.cs (6)
34public static bool TryCreate(in Color color, out PackedColor packedColor) 36CastColor castColor = Unsafe.As<Color, CastColor>(ref Unsafe.AsRef(in color)); 52public Color Extract() => _knownColor != 0 53? Color.FromKnownColor((KnownColor)_knownColor) 54: _state == 0 ? Color.Empty : Color.FromArgb(_argb);
System\Value.PackedColorFlag.cs (2)
10private sealed class PackedColorFlag : TypeFlag<Color> 14public 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. 22public static implicit operator COLORREF(Color color) => new((uint)ColorTranslator.ToWin32(color)); 23public static implicit operator Color(COLORREF color) => ColorTranslator.FromWin32((int)color.Value);
Windows\Win32\Foundation\LPARAM.cs (1)
26public static explicit operator LPARAM(Color value) => (LPARAM)ColorTranslator.ToWin32(value);
Windows\Win32\Foundation\WPARAM.cs (1)
31public static explicit operator WPARAM(Color value) => new((nuint)ColorTranslator.ToWin32(value));
Windows\Win32\Graphics\Gdi\ARGB.cs (7)
42public static implicit operator ARGB(in Color color) => new((uint)color.ToArgb()); 44public static implicit operator Color(ARGB argb) => Color.FromArgb((int)argb.Value); 47public static Color[] ToColorArray(params ReadOnlySpan<ARGB> argbColors) 49Color[] colors = new Color[argbColors.Length]; 58public static Color[] ToColorArray(params ReadOnlySpan<uint> argbColors) => ToColorArray(
Windows\Win32\Graphics\Gdi\ArgbBuffer.cs (2)
30public ArgbBuffer(Span<Color> colors) : this(colors.Length) 41public readonly Color[] ToColorArray(int length) => ARGB.ToColorArray(_bufferScope[..length]);
Windows\Win32\Graphics\Gdi\CreateBrushScope.cs (1)
29public CreateBrushScope(Color color)
Windows\Win32\Graphics\Gdi\CreatePenScope.cs (1)
29public CreatePenScope(Color color, int width = 1) =>
Windows\Win32\Graphics\GdiPlus\GpBitmapExtensions.cs (2)
35public static HBITMAP GetHBITMAP(this IPointer<GpBitmap> bitmap) => bitmap.GetHBITMAP(Color.LightGray); 37public static HBITMAP GetHBITMAP(this IPointer<GpBitmap> bitmap, Color background)
Windows\Win32\PInvoke.GetSysColorBrush.cs (1)
11public static HBRUSH GetSysColorBrush(Color systemColor)
System.Private.Windows.Core.TestUtilities (7)
CommonTestHelper.cs (7)
59public static TheoryData<Color> GetColorTheoryData() 62Color.Red, 63Color.Blue, 64Color.Black 67public static TheoryData<Color> GetColorWithEmptyTheoryData() 70Color.Red, 71Color.Empty
System.Windows.Forms (2098)
System\Drawing\Design\UITypeEditor.cs (1)
53[typeof(Color)] = $"System.Drawing.Design.ColorEditor, {AssemblyRef.SystemDrawingDesign}",
System\Windows\Forms\ActiveX\AxHost.cs (4)
271public override Color BackColor 363public override Color ForeColor 3664protected static Color GetColorFromOleColor(uint color) 3674protected static uint GetOleColorFromColor(Color color)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (8)
32private Color ActiveXAmbientBackColor 38private Color ActiveXAmbientForeColor 175internal Color AmbientBackColor 190return property.Value is null ? Color.Empty : (Color)property.Value; 236internal Color AmbientForeColor 251return property.Value is null ? Color.Empty : (Color)property.Value;
System\Windows\Forms\AmbientProperties.cs (2)
18public Color BackColor { get; set; } 33public Color ForeColor { get; set; }
System\Windows\Forms\ComponentModel\COM2Interop\COM2ColorConverter.cs (3)
14public override Type ManagedType => typeof(Color); 30managedValue ??= Color.Black; 32if (managedValue is Color managedValueAsColor)
System\Windows\Forms\Control.cs (35)
694Color color = BackColor; 771public virtual Color BackColor 775Color c = RawBackColor; // inheritedProperties.BackColor 809if (!value.Equals(Color.Empty) && !GetStyle(ControlStyles.SupportsTransparentBackColor) && value.A < 255) 814Color previous = BackColor; 1546public static Color DefaultBackColor => SystemColors.Control; 1577public static Color DefaultForeColor => SystemColors.ControlText; 1610internal Color DisabledColor 1614Color color = BackColor; 1997public virtual Color ForeColor 2001Properties.TryGetValue(s_foreColorProperty, out Color color); 2030Color previous = ForeColor; 2391private bool IsValidBackColor(Color c) => c.IsEmpty || GetStyle(ControlStyles.SupportsTransparentBackColor) || c.A == 255; 2665internal Color RawBackColor => Properties.GetValueOrDefault<Color>(s_backColorProperty); 2777private bool RenderColorTransparent(Color c) 2949Color oldBackColor = Color.Empty; 2950Color oldForeColor = Color.Empty; 4156Color oldForeColor = ForeColor; 4157Color oldBackColor = BackColor; 6868Color backColor = Properties.GetValueOrDefault<Color>(s_backColorProperty); 7001Color foreColor = Properties.GetValueOrDefault<Color>(s_foreColorProperty); 8041internal void PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset = default) 8092private static void PaintBackColor(PaintEventArgs e, Rectangle rectangle, Color backColor) 8099Color color = backColor; 8121using Pen pen = new(Color.Red, width: 2); 9032BackColor = Color.Empty; 9061ForeColor = Color.Empty; 10438Color backColor = Properties.GetValueOrDefault<Color>(s_backColorProperty); 10458internal virtual bool ShouldSerializeForeColor() => !Properties.GetValueOrDefault<Color>(s_foreColorProperty).IsEmpty;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (2)
154public override Color BackColor 161if (value != Color.Empty)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorData.cs (10)
12public Color ButtonFace { get; set; } 13public Color ButtonShadow { get; set; } 14public Color ButtonShadowDark { get; set; } 15public Color ContrastButtonShadow { get; set; } 16public Color WindowText { get; set; } 17public Color WindowDisabled { get; set; } 18public Color Highlight { get; set; } 19public Color LowHighlight { get; set; } 20public Color LowButtonFace { get; set; } 21public Color WindowFrame { get; set; }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorOptions.cs (6)
12private readonly Color _backColor; 13private readonly Color _foreColor; 19internal ColorOptions(IDeviceContext deviceContext, Color foreColor, Color backColor) 72colors.LowButtonFace = Color.FromArgb( 83colors.LowHighlight = Color.FromArgb(
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (19)
26private protected static Color GetContrastingBorderColor(Color buttonBorderShadowColor) => Color.FromArgb( 73internal static Brush CreateDitherBrush(Color color1, Color color2) 97internal static void DrawDitheredFill(Graphics g, Color color1, Color color2, Rectangle bounds) 303Color color = GetContrastingBorderColor(colors.ButtonShadow); 325Color color, 356internal static void DrawFlatFocus(IDeviceContext deviceContext, Rectangle r, Color color) 423internal static void DrawDefaultBorder(IDeviceContext deviceContext, Rectangle r, Color color, bool isDefault) 451private void DrawText(PaintEventArgs e, LayoutData layout, Color color, ColorData colors) 530Color foreColor, 633Color foreColor, 634Color backColor, 648internal static ColorOptions PaintFlatRender(Graphics g, Color foreColor, Color backColor, bool enabled) => 653internal static ColorOptions PaintPopupRender(Graphics g, Color foreColor, Color backColor, bool enabled) =>
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (4)
14private void PaintBackground(PaintEventArgs e, Rectangle r, Color backColor) 40Color backColor = Control.BackColor; 133Color backColor = Control.BackColor; 226Color backColor;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (1)
43Color borderColor = colors.Options.HighContrast
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (3)
73Color color = isHighContrastHighlighted ? SystemColors.Highlight : Control.BackColor; 97Color.Transparent, 167Color highlightTextColor = SystemColors.HighlightText;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (15)
15private static Color t_checkImageCheckedBackColor; 20private static Color t_checkImageIndeterminateBackColor; 31Color checkColor, 32Color checkBackground, 33Color checkBorder, 87Color checkBackground, 92Color color; 100Color comboColor = SystemInformation.HighContrast ? SystemColors.ControlDark : SystemColors.Control; 101color = Color.FromArgb( 120Color checkBackground, 136protected void DrawCheckOnly(PaintEventArgs e, LayoutData layout, ColorData colors, Color checkColor) => 155Color checkColor) 294private static Bitmap GetCheckBoxImage(Color checkColor, Rectangle fullSize, ref Color cacheCheckColor, ref Bitmap? cacheCheckImage) 312offscreen.Clear(Color.Transparent);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxFlatAdapter.cs (3)
71private void PaintFlatWorker(PaintEventArgs e, Color checkColor, Color checkBackground, Color checkBorder, ColorData colors)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (10)
17Color checkColor, 18Color checkBackground, 19Color checkBorder) 28Color checkBackground, 34Color field = checkBackground; 58protected void DrawCheckBackgroundFlat(PaintEventArgs e, Rectangle bounds, Color borderColor, Color checkBackground) 60Color field = checkBackground; 61Color border = borderColor; 133protected void DrawCheckOnly(PaintEventArgs e, LayoutData layout, Color checkColor, bool disabledColors)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonFlatAdapter.cs (3)
74private void PaintFlatWorker(PaintEventArgs e, Color checkColor, Color checkBackground, Color checkBorder, ColorData colors)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonPopupAdapter.cs (1)
57Color checkBackgroundColor = colors.Options.HighContrast ? colors.ButtonFace : colors.Highlight;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (2)
145Color textColor; 244Color textColor;
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (2)
124Color textColor; 193Color textColor;
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (17)
16private Color _borderColor = Color.Empty; 17private Color _checkedBackColor = Color.Empty; 18private Color _mouseDownBackColor = Color.Empty; 19private Color _mouseOverBackColor = Color.Empty; 66[DefaultValue(typeof(Color), "")] 67public Color BorderColor 72if (value.Equals(Color.Transparent)) 94[DefaultValue(typeof(Color), "")] 95public Color CheckedBackColor 118[DefaultValue(typeof(Color), "")] 119public Color MouseDownBackColor 142[DefaultValue(typeof(Color), "")] 143public Color MouseOverBackColor
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (2)
133Color textColor; 222Color textColor;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
256public override Color BackColor 536public override Color ForeColor
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (6)
85Color borderPenColor = GetPopupOuterBorderColor(comboBox, focused); 119Color outerBorderColor = GetOuterBorderColor(comboBox); 120Color innerBorderColor = GetInnerBorderColor(comboBox); 189protected virtual Color GetOuterBorderColor(ComboBox comboBox) 192protected virtual Color GetPopupOuterBorderColor(ComboBox comboBox, bool focused) 202protected virtual Color GetInnerBorderColor(ComboBox comboBox)
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (2)
34Color windowColor = t_visualStyleRenderer.GetColor(ColorProperty.FillColor); 91Color textColor = t_visualStyleRenderer.GetColor(ColorProperty.TextColor);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (17)
356private static readonly Color s_defaultBackColor = SystemColors.Window; 357private static readonly Color s_defaultBackgroundColor = SystemColors.ControlDark; 358private Color _backgroundColor = s_defaultBackgroundColor; 991public override Color BackColor 1010public Color BackgroundColor 1971else if (_defaultCellStyle.BackColor == Color.Empty 1972|| _defaultCellStyle.ForeColor == Color.Empty 1973|| _defaultCellStyle.SelectionBackColor == Color.Empty 1974|| _defaultCellStyle.SelectionForeColor == Color.Empty 1983if (_defaultCellStyle.BackColor == Color.Empty) 1988if (_defaultCellStyle.ForeColor == Color.Empty) 1994if (_defaultCellStyle.SelectionBackColor == Color.Empty) 1999if (_defaultCellStyle.SelectionForeColor == Color.Empty) 2080private static Color DefaultGridColor => SystemColors.WindowFrame; 2599public override Color ForeColor 2635public Color GridColor 2663internal Color GridPenColor { get; private set; }
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5680ControlPaint.FillReversibleRectangle(RectangleToScreen(rectInsertionBar), Color.White);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
668Color backBrushColor = PaintSelectionBackground(paintParts) && cellSelected 671Color foreBrushColor = cellSelected ? cellStyle.SelectionForeColor : cellStyle.ForeColor; 890ControlPaint.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1), Color.Empty, cellStyle.ForeColor); 953Color.Empty, 976Color textColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (15)
945internal static int ColorDistance(Color color1, Color color2) 1429internal (Color darkColor, Color lightColor) GetContrastedColors(Color baseline) 1436Color darkColor; 1437Color lightColor; 1893inheritedCellStyleTmp.BackColor = Color.Empty; 1894inheritedCellStyleTmp.ForeColor = Color.Empty; 1895inheritedCellStyleTmp.SelectionBackColor = Color.Empty; 1896inheritedCellStyleTmp.SelectionForeColor = Color.Empty; 3140(Color darkColor, Color lightColor) = GetContrastedColors(cellStyle.BackColor); 3152Color dividerWidthColor = advancedBorderStyle.Right switch 3187Color dividerHeightColor = advancedBorderStyle.Bottom switch
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (17)
107public Color BackColor 109get => Properties.GetValueOrDefault<Color>(s_propBackColor); 112Color previous = Properties.AddOrRemoveValue(s_propBackColor, value); 158public Color ForeColor 160get => Properties.TryGetValue(s_propForeColor, out Color color) ? color : Color.Empty; 163Color previous = Properties.AddOrRemoveValue(s_propForeColor, value); 307public Color SelectionBackColor 309get => Properties.GetValueOrDefault<Color>(s_propSelectionBackColor); 312Color previous = Properties.AddOrRemoveValue(s_propSelectionBackColor, value); 321public Color SelectionForeColor 323get => Properties.GetValueOrDefault<Color>(s_propSelectionForeColor); 326Color previous = Properties.AddOrRemoveValue(s_propSelectionForeColor, value); 538if (BackColor != Color.Empty) 544if (ForeColor != Color.Empty) 555if (SelectionBackColor != Color.Empty) 566if (SelectionForeColor != Color.Empty)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (6)
1109Color brushColor = PaintSelectionBackground(paintParts) && cellSelected 1279Color foreBrushColor = default; 1280Color backBrushColor = default; 1281Color highlight = default; 1303highlight = Color.FromArgb( 1353offscreen.Clear(Color.Transparent);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (4)
867Color brushColor = (PaintSelectionBackground(paintParts) && cellSelected) || IsHighlighted() 908Color textColor; 1004(Color darkColor, Color lightColor) = GetContrastedColors(cellStyle.BackColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (5)
1931Color brushColor = PaintSelectionBackground(paintParts) && cellSelected && !cellEdited 2270ControlPaint.DrawFocusRectangle(g, focusBounds, Color.Empty, cellStyle.ForeColor); 2281ControlPaint.DrawFocusRectangle(g, focusBounds, Color.Empty, cellStyle.ForeColor); 2286ControlPaint.DrawFocusRectangle(g, textBounds, Color.Empty, cellStyle.ForeColor); 2329Color textColor;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (2)
78Color opaqueBackColor = Color.FromArgb(255, dataGridViewCellStyle.BackColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
544Color backColor = PaintSelectionBackground(paintParts) && cellSelected
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (2)
776Color brushColor = PaintSelectionBackground(paintParts) && cellSelected 897ControlPaint.DrawFocusRectangle(g, valBounds, Color.Empty, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (15)
43public Color ActiveLinkColor 47if (Properties.TryGetValue(s_propLinkCellActiveLinkColor, out Color color)) 81internal Color ActiveLinkColorInternal 151public Color LinkColor 155if (Properties.TryGetValue(s_propLinkCellLinkColor, out Color color)) 189internal Color LinkColorInternal 288public Color VisitedLinkColor 292if (Properties.TryGetValue(s_propLinkCellVisitedLinkColor, out Color color)) 328internal Color VisitedLinkColorInternal 349private Color HighContrastLinkColor 913Color brushColor = PaintSelectionBackground(paintParts) && cellSelected 1003ControlPaint.DrawFocusRectangle(g, focusBounds, Color.Empty, brushColor); 1006Color linkColor; 1044ControlPaint.DrawFocusRectangle(g, errorBounds, Color.Empty, brushColor); 1059ControlPaint.DrawFocusRectangle(g, valBounds, Color.Empty, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (3)
27public Color ActiveLinkColor 138public Color LinkColor 318public Color VisitedLinkColor
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (2)
1187Color backColor; 1197ControlPaint.DrawFocusRectangle(graphics, bounds, Color.Empty, backColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (11)
731Color brushColor = PaintSelectionBackground(paintParts) && cellSelected 813Color iconColor; 873Color textColor; 971Color iconColor; 1021Color foreColor, 1022Color backColor) 1031(Color OldColor, Color NewColor) map = new(Color.Black, foreColor); 1033attr.SetRemapTable(ColorAdjustType.Bitmap, new ReadOnlySpan<(Color OldColor, Color NewColor)>(ref map));
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
681Color brushColor = PaintSelectionBackground(paintParts) && cellSelected && !cellEdited 711ControlPaint.DrawFocusRectangle(graphics, valBounds, Color.Empty, cellStyle.ForeColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (2)
104Color opaqueBackColor = Color.FromArgb(255, dataGridViewCellStyle.BackColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (4)
264Color brushColor = PaintSelectionBackground(paintParts) && cellSelected 308Color textColor; 373(Color darkColor, Color lightColor) = GetContrastedColors(cellStyle.BackColor);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (17)
28protected static readonly Color DefaultTitleBackColor = SystemColors.ActiveCaption; 33protected static readonly Color DefaultTitleForeColor = SystemColors.ActiveCaptionText; 38protected static readonly Color DefaultMonthBackColor = SystemColors.Window; 43protected static readonly Color DefaultTrailingForeColor = SystemColors.GrayText; 90private Color _calendarForeColor = DefaultForeColor; 91private Color _calendarTitleBackColor = DefaultTitleBackColor; 92private Color _calendarTitleForeColor = DefaultTitleForeColor; 93private Color _calendarMonthBackground = DefaultMonthBackColor; 94private Color _calendarTrailingText = DefaultTrailingForeColor; 128public override Color BackColor 179public Color CalendarForeColor 239public Color CalendarTitleBackColor 262public Color CalendarTitleForeColor 285public Color CalendarTrailingForeColor 308public Color CalendarMonthBackground 489public override Color ForeColor 1276private void SetControlColor(uint colorIndex, Color value)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
430Color textColor = Enabled ? ForeColor : TextRenderer.DisabledTextColor(BackColor); 467Color backColor = DisabledColor; 547Color boxColor = Enabled ? ForeColor : SystemColors.GrayText; 664Color backColor = BackColor;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (7)
88Color textColor, 130Color textColor, 140Color textColor, 171Color textColor, 248Color backColor = SystemColors.Control; 277Color textColor, 344private static Color DefaultTextColor(GroupBoxState state)
System\Windows\Forms\Controls\ImageList\ImageList.cs (7)
26private static readonly Color s_fakeTransparencyColor = Color.FromArgb(0x0d, 0x0b, 0x0c); 260public Color TransparentColor { get; set; } = Color.Transparent; 281Color transparent = TransparentColor; 747private void ResetTransparentColor() => TransparentColor = Color.LightGray; 749private bool ShouldSerializeTransparentColor() => !TransparentColor.Equals(Color.LightGray);
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (1)
295public int Add(Image value, Color transparentColor)
System\Windows\Forms\Controls\ImageList\ImageList.Original.cs (6)
17internal Color _customTransparentColor = Color.Transparent; 21internal Original(object image, OriginalOptions options) : this(image, options, Color.Transparent) 25internal Original(object image, OriginalOptions options, int nImages) : this(image, options, Color.Transparent) 30internal Original(object image, OriginalOptions options, Color customTransparentColor) 42Debug.Assert(customTransparentColor.Equals(Color.Transparent), "Specified a custom transparent color then told us to ignore it");
System\Windows\Forms\Controls\Labels\Label.cs (2)
1261Color color; 1306Color disabledTextForeColor = TextRenderer.DisabledTextColor(BackColor);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (27)
23private static Color s_iedisabledLinkColor = Color.Empty; 29private Color _linkColor = Color.Empty; 30private Color _activeLinkColor = Color.Empty; 31private Color _visitedLinkColor = Color.Empty; 32private Color _disabledLinkColor = Color.Empty; 70public Color ActiveLinkColor 88public Color DisabledLinkColor 126private static Color IELinkColor => LinkUtilities.IELinkColor; 128private static Color IEActiveLinkColor => LinkUtilities.IEActiveLinkColor; 130private static Color IEVisitedLinkColor => LinkUtilities.IEVisitedLinkColor; 132private Color IEDisabledLinkColor 235public Color LinkColor 346public Color VisitedLinkColor 1129Color foreColor; 1256Color brushColor = Color.Empty; 1285if (brushColor == Color.Empty) 1357Color color; 1528internal void ResetActiveLinkColor() => _activeLinkColor = Color.Empty; 1530internal void ResetDisabledLinkColor() => _disabledLinkColor = Color.Empty; 1534_linkColor = Color.Empty; 1538private void ResetVisitedLinkColor() => _visitedLinkColor = Color.Empty;
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (17)
13private static Color s_ielinkColor = Color.Empty; 14private static Color s_ieactiveLinkColor = Color.Empty; 15private static Color s_ievisitedLinkColor = Color.Empty; 27private static Color GetIEColor(string name) 52return Color.FromArgb(rgb[0], rgb[1], rgb[2]); 58return Color.Blue; 62return Color.Purple; 66return Color.Red; 70return Color.Red; 74public static Color IELinkColor 87public static Color IEActiveLinkColor 100public static Color IEVisitedLinkColor 114public static Color GetVisitedLinkColor() 120return Color.FromArgb(r, g, b);
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (4)
581Color backColor = (SelectionMode != SelectionMode.None) ? e.BackColor : BackColor; 582Color foreColor = (SelectionMode != SelectionMode.None) ? e.ForeColor : ForeColor; 717Color backColor = (SelectionMode != SelectionMode.None) ? e.BackColor : BackColor; 728Color foreColor = (SelectionMode != SelectionMode.None) ? e.ForeColor : ForeColor;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
153public override Color BackColor 446public override Color ForeColor
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (4)
24Color foreColor, 25Color backColor, 66public Color ForeColor { get; } 71public Color BackColor { get; }
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (2)
96Color backColor = ItemIndex == -1 ? Item!.BackColor : SubItem!.BackColor; 139Color color = ItemIndex == -1 ? Item!.ForeColor : SubItem!.ForeColor;
System\Windows\Forms\Controls\ListView\ListView.cs (17)
106private Color _odCacheForeColor = SystemColors.WindowText; 107private Color _odCacheBackColor = SystemColors.Window; 346public override Color BackColor 831public override Color ForeColor 2780Color subItemForeColor = Color.Empty; 2781Color subItemBackColor = Color.Empty; 2811Color riFore = Color.Empty; 2812Color riBack = Color.Empty; 4931Color c; 5991Color foreColor = Color.FromArgb((int)PInvoke.GetTextColor(nmcd->hdc).Value); 5992Color backColor = Color.FromArgb((int)PInvoke.GetBkColor(nmcd->hdc).Value);
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (3)
16private Color _color = Color.Empty; 65public Color Color
System\Windows\Forms\Controls\ListView\ListViewItem.cs (14)
106public ListViewItem(string[]? items, int imageIndex, Color foreColor, Color backColor, Font? font) 162public ListViewItem(string[]? items, int imageIndex, Color foreColor, Color backColor, Font? font, ListViewGroup? group) 197public ListViewItem(string[]? items, string? imageKey, Color foreColor, Color backColor, Font? font) 235public ListViewItem(string[]? items, string? imageKey, Color foreColor, Color backColor, Font? font, ListViewGroup? group) 280public Color BackColor 411public Color ForeColor 1214BackColor = (Color)info.GetValue(nameof(BackColor), typeof(Color))!; 1226ForeColor = (Color)info.GetValue(nameof(ForeColor), typeof(Color))!;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (6)
46public ListViewSubItem(ListViewItem? owner, string? text, Color foreColor, Color backColor, Font font) 71public Color BackColor 75if (style is not null && style.backColor != Color.Empty) 164public Color ForeColor 168if (style is not null && style.foreColor != Color.Empty)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.SubItemStyle.cs (4)
15public Color backColor = Color.Empty; // Do NOT rename (binary serialization). 17public Color foreColor = Color.Empty; // Do NOT rename (binary serialization).
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (4)
125public ListViewSubItem Add(string? text, Color foreColor, Color backColor, Font font) 167public void AddRange(string[] items, Color foreColor, Color backColor, Font font)
System\Windows\Forms\Controls\ListView\ListViewItemConverter.cs (8)
88typeof(Color), 89typeof(Color), 97item.SubItems[0].CustomForeColor ? item.ForeColor : Color.Empty, 98item.SubItems[0].CustomBackColor ? item.BackColor : Color.Empty, 108typeof(Color), 109typeof(Color), 117item.SubItems[0].CustomForeColor ? item.ForeColor : Color.Empty, 118item.SubItems[0].CustomBackColor ? item.BackColor : Color.Empty,
System\Windows\Forms\Controls\ListView\ListViewSubItemConverter.cs (2)
39typeof(Color), 40typeof(Color),
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (12)
62private static readonly Color s_defaultTitleBackColor = SystemColors.ActiveCaption; 63private static readonly Color s_defaultTitleForeColor = SystemColors.ActiveCaptionText; 64private static readonly Color s_trailingForeColor = SystemColors.GrayText; 90private Color _titleBackColor = s_defaultTitleBackColor; 91private Color _titleForeColor = s_defaultTitleForeColor; 92private Color _trailingForeColor = s_trailingForeColor; 196public override Color BackColor 412public override Color ForeColor 908public Color TitleBackColor 929public Color TitleForeColor 950public Color TrailingForeColor 1687private void SetControlColor(uint colorIndex, Color value)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
264public override Color ForeColor
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
28private static readonly Color s_defaultForeColor = SystemColors.Highlight;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (43)
73private Color _lineColor = SystemInformation.HighContrast ? SystemColors.ControlDarkDark : SystemColors.InactiveBorder; 74private Color _categoryForegroundColor = SystemColors.ControlText; 75private Color _categorySplitterColor = SystemColors.Control; 76private Color _viewBorderColor = SystemColors.ControlDark; 77private Color _selectedItemWithFocusForeColor = SystemColors.HighlightText; 78private Color _selectedItemWithFocusBackColor = SystemColors.Highlight; 313public override Color BackColor 406[DefaultValue(typeof(Color), "ControlText")] 407public Color CategoryForeColor 425public Color CommandsBackColor 440public Color CommandsForeColor 455public Color CommandsLinkColor 466public Color CommandsActiveLinkColor 477public Color CommandsDisabledLinkColor 488[DefaultValue(typeof(Color), "ControlDark")] 489public Color CommandsBorderColor 574public override Color ForeColor 627[DefaultValue(typeof(Color), "Control")] 628public Color HelpBackColor 639[DefaultValue(typeof(Color), "ControlText")] 640public Color HelpForeColor 651[DefaultValue(typeof(Color), "ControlDark")] 652public Color HelpBorderColor 699[DefaultValue(typeof(Color), "Highlight")] 700public Color SelectedItemWithFocusBackColor 718[DefaultValue(typeof(Color), "HighlightText")] 719public Color SelectedItemWithFocusForeColor 737[DefaultValue(typeof(Color), "GrayText")] 738public Color DisabledItemForeColor 753[DefaultValue(typeof(Color), "Control")] 754public Color CategorySplitterColor 789[DefaultValue(typeof(Color), "InactiveBorder")] 790public Color LineColor 1271[DefaultValue(typeof(Color), "Window")] 1272public Color ViewBackColor 1284[DefaultValue(typeof(Color), "WindowText")] 1285public Color ViewForeColor 1300[DefaultValue(typeof(Color), "ControlDark")] 1301public 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)
35public Color BorderColor { get; set; } = SystemColors.ControlDark;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (2)
60protected override Color BackgroundColor => OwnerGridView?.LineColor ?? default; 62protected override Color LabelTextColor => OwnerGrid.CategoryForeColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (6)
151internal void SetColors(Color background, Color normalText, Color link, Color activeLink, Color visitedLink, Color disabledLink)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (4)
22Color c = ControlPaint.LightLight(Control.BackColor); 39Color c = ControlPaint.Light(Control.BackColor); 75Color c = (ARGB)SystemColors.Window; 90Color backgroundColor = isHighContrastHighlighted ? SystemColors.Highlight : Control.BackColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (12)
68private static Color InvertColor(Color color) 69=> Color.FromArgb(color.A, (byte)~color.R, (byte)~color.G, (byte)~color.B); 130protected virtual Color BackgroundColor => OwnerGridView?.BackColor ?? default; 132protected virtual Color LabelTextColor 1526Color backColor = selected ? ownerGrid.SelectedItemWithFocusBackColor : BackgroundColor; 1591Color textColor = selected && _hasFocus 1678Color textColor = InvertColor(OwnerGrid.LineColor); 1710Color backgroundColor = ColorInversionNeededInHighContrast ? InvertColor(OwnerGrid.LineColor) : OwnerGrid.LineColor; 1740Color penColor = OwnerGridView?.TextColor ?? default; 1800Color textColor = ShouldRenderReadOnly ? ownerGrid.GrayTextColor : ownerGrid.TextColor; 1830Color backColor = BackgroundColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (9)
56private Color _grayTextColor; 149public override Color BackColor 350internal Color GrayTextColor 380return Color.FromArgb(colorRGB); 1306public Color LineColor => OwnerGrid.LineColor; 1308public Color SelectedItemWithFocusForeColor => OwnerGrid.SelectedItemWithFocusForeColor; 1310public Color SelectedItemWithFocusBackColor => OwnerGrid.SelectedItemWithFocusBackColor; 1963public Color TextColor => ForeColor; 2361Color color = BackColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (4)
37leftColor: Color.Black, leftWidth: 1, leftStyle: ButtonBorderStyle.Dashed, 38topColor: Color.Black, topWidth: 1, topStyle: ButtonBorderStyle.Dashed, 39rightColor: Color.Black, rightWidth: 1, rightStyle: ButtonBorderStyle.Dashed, 40bottomColor: Color.Black, bottomWidth: 1, bottomStyle: ButtonBorderStyle.Dashed);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (12)
61private Color _selectionBackColorToSetOnHandleCreated; 369public override Color ForeColor 836/// <returns>The color or <see cref="Color.Empty"/> if the selection has more than one color.</returns> 840public Color SelectionColor 844Color selColor = Color.Empty; 876public unsafe Color SelectionBackColor 880Color selColor = Color.Empty; 914if (value == Color.Empty) 2113private bool InternalSetForeColor(Color value) 2445if (_selectionBackColorToSetOnHandleCreated != Color.Empty)
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
110public override Color ForeColor
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
170public override Color BackColor 249public override Color ForeColor
System\Windows\Forms\Controls\TabControl\TabPage.cs (6)
98public override Color BackColor 102Color color = base.BackColor; 113return Color.Transparent; 123if (value != Color.Empty) 606Color bkColor = (UseVisualStyleBackColor && !Application.IsDarkModeEnabled) 607? Color.Transparent
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (2)
79Color textColor = t_visualStyleRenderer.GetColor(ColorProperty.TextColor); 130Color textColor = t_visualStyleRenderer.GetColor(ColorProperty.TextColor);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
282public override Color BackColor 496public override Color ForeColor
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (2)
30Color windowColor = t_visualStyleRenderer.GetColor(ColorProperty.FillColor); 83Color textColor = t_visualStyleRenderer.GetColor(ColorProperty.TextColor);
System\Windows\Forms\Controls\ToolStrips\ProfessionalColors.cs (57)
36public static Color ButtonSelectedHighlight => ColorTable.ButtonSelectedHighlight; 39public static Color ButtonSelectedHighlightBorder => ColorTable.ButtonSelectedHighlightBorder; 42public static Color ButtonPressedHighlight => ColorTable.ButtonPressedHighlight; 45public static Color ButtonPressedHighlightBorder => ColorTable.ButtonPressedHighlightBorder; 48public static Color ButtonCheckedHighlight => ColorTable.ButtonCheckedHighlight; 51public static Color ButtonCheckedHighlightBorder => ColorTable.ButtonCheckedHighlightBorder; 54public static Color ButtonPressedBorder => ColorTable.ButtonPressedBorder; 57public static Color ButtonSelectedBorder => ColorTable.ButtonSelectedBorder; 60public static Color ButtonCheckedGradientBegin => ColorTable.ButtonCheckedGradientBegin; 63public static Color ButtonCheckedGradientMiddle => ColorTable.ButtonCheckedGradientMiddle; 66public static Color ButtonCheckedGradientEnd => ColorTable.ButtonCheckedGradientEnd; 69public static Color ButtonSelectedGradientBegin => ColorTable.ButtonSelectedGradientBegin; 72public static Color ButtonSelectedGradientMiddle => ColorTable.ButtonSelectedGradientMiddle; 75public static Color ButtonSelectedGradientEnd => ColorTable.ButtonSelectedGradientEnd; 78public static Color ButtonPressedGradientBegin => ColorTable.ButtonPressedGradientBegin; 81public static Color ButtonPressedGradientMiddle => ColorTable.ButtonPressedGradientMiddle; 84public static Color ButtonPressedGradientEnd => ColorTable.ButtonPressedGradientEnd; 87public static Color CheckBackground => ColorTable.CheckBackground; 90public static Color CheckSelectedBackground => ColorTable.CheckSelectedBackground; 93public static Color CheckPressedBackground => ColorTable.CheckPressedBackground; 96public static Color GripDark => ColorTable.GripDark; 99public static Color GripLight => ColorTable.GripLight; 102public static Color ImageMarginGradientBegin => ColorTable.ImageMarginGradientBegin; 105public static Color ImageMarginGradientMiddle => ColorTable.ImageMarginGradientMiddle; 108public static Color ImageMarginGradientEnd => ColorTable.ImageMarginGradientEnd; 111public static Color ImageMarginRevealedGradientBegin => ColorTable.ImageMarginRevealedGradientBegin; 114public static Color ImageMarginRevealedGradientMiddle => ColorTable.ImageMarginRevealedGradientMiddle; 117public static Color ImageMarginRevealedGradientEnd => ColorTable.ImageMarginRevealedGradientEnd; 120public static Color MenuStripGradientBegin => ColorTable.MenuStripGradientBegin; 123public static Color MenuStripGradientEnd => ColorTable.MenuStripGradientEnd; 126public static Color MenuBorder => ColorTable.MenuBorder; 129public static Color MenuItemSelected => ColorTable.MenuItemSelected; 132public static Color MenuItemBorder => ColorTable.MenuItemBorder; 135public static Color MenuItemSelectedGradientBegin => ColorTable.MenuItemSelectedGradientBegin; 138public static Color MenuItemSelectedGradientEnd => ColorTable.MenuItemSelectedGradientEnd; 141public static Color MenuItemPressedGradientBegin => ColorTable.MenuItemPressedGradientBegin; 144public static Color MenuItemPressedGradientMiddle => ColorTable.MenuItemPressedGradientMiddle; 147public static Color MenuItemPressedGradientEnd => ColorTable.MenuItemPressedGradientEnd; 150public static Color RaftingContainerGradientBegin => ColorTable.RaftingContainerGradientBegin; 153public static Color RaftingContainerGradientEnd => ColorTable.RaftingContainerGradientEnd; 156public static Color SeparatorDark => ColorTable.SeparatorDark; 159public static Color SeparatorLight => ColorTable.SeparatorLight; 162public static Color StatusStripBorder => ColorTable.StatusStripBorder; 165public static Color StatusStripGradientBegin => ColorTable.StatusStripGradientBegin; 168public static Color StatusStripGradientEnd => ColorTable.StatusStripGradientEnd; 171public static Color ToolStripBorder => ColorTable.ToolStripBorder; 174public static Color ToolStripDropDownBackground => ColorTable.ToolStripDropDownBackground; 177public static Color ToolStripGradientBegin => ColorTable.ToolStripGradientBegin; 180public static Color ToolStripGradientMiddle => ColorTable.ToolStripGradientMiddle; 183public static Color ToolStripGradientEnd => ColorTable.ToolStripGradientEnd; 186public static Color ToolStripContentPanelGradientBegin => ColorTable.ToolStripContentPanelGradientBegin; 189public static Color ToolStripContentPanelGradientEnd => ColorTable.ToolStripContentPanelGradientEnd; 192public static Color ToolStripPanelGradientBegin => ColorTable.ToolStripPanelGradientBegin; 195public static Color ToolStripPanelGradientEnd => ColorTable.ToolStripPanelGradientEnd; 198public static Color OverflowButtonGradientBegin => ColorTable.OverflowButtonGradientBegin; 201public static Color OverflowButtonGradientMiddle => ColorTable.OverflowButtonGradientMiddle; 204public static Color OverflowButtonGradientEnd => ColorTable.OverflowButtonGradientEnd;
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (1037)
11private Dictionary<KnownColors, Color>? _professionalRGB; 31private 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); 87private Color FromKnownColor(KnownColors color) 107public virtual Color ButtonSelectedHighlight => FromKnownColor(KnownColors.ButtonSelectedHighlight); 110public virtual Color ButtonSelectedHighlightBorder => ButtonPressedBorder; 113public virtual Color ButtonPressedHighlight => FromKnownColor(KnownColors.ButtonPressedHighlight); 116public virtual Color ButtonPressedHighlightBorder => SystemColors.Highlight; 119public virtual Color ButtonCheckedHighlight => FromKnownColor(KnownColors.ButtonCheckedHighlight); 122public virtual Color ButtonCheckedHighlightBorder => SystemColors.Highlight; 125public virtual Color ButtonPressedBorder => FromKnownColor(KnownColors.msocbvcrCBCtlBdrMouseOver); 128public virtual Color ButtonSelectedBorder => FromKnownColor(KnownColors.msocbvcrCBCtlBdrMouseOver); 131public virtual Color ButtonCheckedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradSelectedBegin); 134public virtual Color ButtonCheckedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradSelectedMiddle); 137public virtual Color ButtonCheckedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradSelectedEnd); 140public virtual Color ButtonSelectedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverBegin); 143public virtual Color ButtonSelectedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverMiddle); 146public virtual Color ButtonSelectedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverEnd); 149public virtual Color ButtonPressedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMouseDownBegin); 152public virtual Color ButtonPressedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradMouseDownMiddle); 155public virtual Color ButtonPressedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMouseDownEnd); 157public virtual Color CheckBackground => FromKnownColor(KnownColors.msocbvcrCBCtlBkgdSelected); 160public virtual Color CheckSelectedBackground => FromKnownColor(KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver); 163public virtual Color CheckPressedBackground => FromKnownColor(KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver); 166public virtual Color GripDark => FromKnownColor(KnownColors.msocbvcrCBDragHandle); 169public virtual Color GripLight => FromKnownColor(KnownColors.msocbvcrCBDragHandleShadow); 172public virtual Color ImageMarginGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradVertBegin); 175public virtual Color ImageMarginGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradVertMiddle); 178public virtual Color ImageMarginGradientEnd => (_usingSystemColors) ? SystemColors.Control : FromKnownColor(KnownColors.msocbvcrCBGradVertEnd); 181public virtual Color ImageMarginRevealedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin); 184public virtual Color ImageMarginRevealedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle); 187public virtual Color ImageMarginRevealedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd); 190public virtual Color MenuStripGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin); 193public virtual Color MenuStripGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd); 196public virtual Color MenuItemSelected => FromKnownColor(KnownColors.msocbvcrCBCtlBkgdMouseOver); 199public virtual Color MenuItemBorder => FromKnownColor(KnownColors.msocbvcrCBCtlBdrSelected); 202public virtual Color MenuBorder => FromKnownColor(KnownColors.msocbvcrCBMenuBdrOuter); 205public virtual Color MenuItemSelectedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverBegin); 208public virtual Color MenuItemSelectedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMouseOverEnd); 211public virtual Color MenuItemPressedGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMenuTitleBkgdBegin); 214public virtual Color MenuItemPressedGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle); 217public virtual Color MenuItemPressedGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMenuTitleBkgdEnd); 220public virtual Color RaftingContainerGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin); 223public virtual Color RaftingContainerGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd); 226public virtual Color SeparatorDark => FromKnownColor(KnownColors.msocbvcrCBSplitterLine); 229public virtual Color SeparatorLight => FromKnownColor(KnownColors.msocbvcrCBSplitterLineLight); 233public virtual Color StatusStripBorder => SystemColors.ButtonHighlight; 236public virtual Color StatusStripGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin); 239public virtual Color StatusStripGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd); 242public virtual Color ToolStripBorder => FromKnownColor(KnownColors.msocbvcrCBShadow); 245public virtual Color ToolStripDropDownBackground => FromKnownColor(KnownColors.msocbvcrCBMenuBkgd); 248public virtual Color ToolStripGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradVertBegin); 251public virtual Color ToolStripGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradVertMiddle); 254public virtual Color ToolStripGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradVertEnd); 257public virtual Color ToolStripContentPanelGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin); 260public virtual Color ToolStripContentPanelGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd); 263public virtual Color ToolStripPanelGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzBegin); 266public virtual Color ToolStripPanelGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradMainMenuHorzEnd); 269public virtual Color OverflowButtonGradientBegin => FromKnownColor(KnownColors.msocbvcrCBGradOptionsBegin); 272public virtual Color OverflowButtonGradientMiddle => FromKnownColor(KnownColors.msocbvcrCBGradOptionsMiddle); 275public virtual Color OverflowButtonGradientEnd => FromKnownColor(KnownColors.msocbvcrCBGradOptionsEnd); 277internal Color ComboBoxButtonGradientBegin => MenuItemPressedGradientBegin; 278internal Color ComboBoxButtonGradientEnd => MenuItemPressedGradientEnd; 279internal Color ComboBoxButtonSelectedGradientBegin => MenuItemSelectedGradientBegin; 280internal Color ComboBoxButtonSelectedGradientEnd => MenuItemSelectedGradientEnd; 281internal Color ComboBoxButtonPressedGradientBegin => ButtonPressedGradientBegin; 282internal Color ComboBoxButtonPressedGradientEnd => ButtonPressedGradientEnd; 283internal Color ComboBoxButtonOnOverflow => ToolStripDropDownBackground; 284internal Color ComboBoxBorder => ButtonSelectedHighlightBorder; 285internal Color TextBoxBorder => ButtonSelectedHighlightBorder; 287private static Color GetAlphaBlendedColor(Graphics g, Color src, Color dest, int alpha) 295return Color.FromArgb(newAlpha, red, green, blue); 299return g.FindNearestColor(Color.FromArgb(newAlpha, red, green, blue)); 305private static Color GetAlphaBlendedColorHighRes(Graphics? graphics, Color src, Color dest, int alpha) 330return Color.FromArgb(r, g, b); 333return graphics.FindNearestColor(Color.FromArgb(r, g, b)); 336private static void InitCommonColors(ref Dictionary<KnownColors, Color> rgbTable) 364private void InitSystemColors(ref Dictionary<KnownColors, Color> rgbTable) 371Color buttonFace = SystemColors.ButtonFace; 372Color buttonShadow = SystemColors.ButtonShadow; 373Color highlight = SystemColors.Highlight; 374Color window = SystemColors.Window; 375Color empty = Color.Empty; 376Color controlText = SystemColors.ControlText; 377Color buttonHighlight = SystemColors.ButtonHighlight; 378Color grayText = SystemColors.GrayText; 379Color highlightText = SystemColors.HighlightText; 380Color windowText = SystemColors.WindowText; 383Color gradientBegin = buttonFace; 384Color gradientMiddle = buttonFace; 385Color gradientEnd = buttonFace; 386Color msocbvcrCBCtlBkgdMouseOver = highlight; 387Color msocbvcrCBCtlBkgdMouseDown = highlight; 668private static void InitOliveLunaColors(ref Dictionary<KnownColors, Color> rgbTable) 670rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] = Color.FromArgb(81, 94, 51); 671rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] = Color.FromArgb(81, 94, 51); 672rgbTable[KnownColors.msocbvcrCBBdrOuterFloating] = Color.FromArgb(116, 134, 94); 673rgbTable[KnownColors.msocbvcrCBBkgd] = Color.FromArgb(209, 222, 173); 674rgbTable[KnownColors.msocbvcrCBCtlBdrMouseDown] = Color.FromArgb(63, 93, 56); 675rgbTable[KnownColors.msocbvcrCBCtlBdrMouseOver] = Color.FromArgb(63, 93, 56); 676rgbTable[KnownColors.msocbvcrCBCtlBdrSelected] = Color.FromArgb(63, 93, 56); 677rgbTable[KnownColors.msocbvcrCBCtlBdrSelectedMouseOver] = Color.FromArgb(63, 93, 56); 678rgbTable[KnownColors.msocbvcrCBCtlBkgd] = Color.FromArgb(209, 222, 173); 679rgbTable[KnownColors.msocbvcrCBCtlBkgdLight] = Color.FromArgb(255, 255, 255); 680rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseDown] = Color.FromArgb(254, 128, 62); 681rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] = Color.FromArgb(255, 238, 194); 682rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] = Color.FromArgb(255, 238, 194); 683rgbTable[KnownColors.msocbvcrCBCtlBkgdSelected] = Color.FromArgb(255, 192, 111); 684rgbTable[KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver] = Color.FromArgb(254, 128, 62); 685rgbTable[KnownColors.msocbvcrCBCtlText] = Color.FromArgb(0, 0, 0); 686rgbTable[KnownColors.msocbvcrCBCtlTextDisabled] = Color.FromArgb(141, 141, 141); 687rgbTable[KnownColors.msocbvcrCBCtlTextLight] = Color.FromArgb(128, 128, 128); 688rgbTable[KnownColors.msocbvcrCBCtlTextMouseDown] = Color.FromArgb(0, 0, 0); 689rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] = Color.FromArgb(0, 0, 0); 690rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] = Color.FromArgb(0, 0, 0); 691rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] = Color.FromArgb(0, 0, 0); 692rgbTable[KnownColors.msocbvcrCBDockSeparatorLine] = Color.FromArgb(96, 119, 66); 693rgbTable[KnownColors.msocbvcrCBDragHandle] = Color.FromArgb(81, 94, 51); 694rgbTable[KnownColors.msocbvcrCBDragHandleShadow] = Color.FromArgb(255, 255, 255); 695rgbTable[KnownColors.msocbvcrCBDropDownArrow] = Color.FromArgb(236, 233, 216); 696rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzBegin] = Color.FromArgb(217, 217, 167); 697rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzEnd] = Color.FromArgb(242, 241, 228); 698rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin] = Color.FromArgb(230, 230, 209); 699rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd] = Color.FromArgb(160, 177, 116); 700rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle] = Color.FromArgb(186, 201, 143); 701rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdBegin] = Color.FromArgb(237, 240, 214); 702rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdEnd] = Color.FromArgb(181, 196, 143); 703rgbTable[KnownColors.msocbvcrCBGradMouseDownBegin] = Color.FromArgb(254, 128, 62); 704rgbTable[KnownColors.msocbvcrCBGradMouseDownEnd] = Color.FromArgb(255, 223, 154); 705rgbTable[KnownColors.msocbvcrCBGradMouseDownMiddle] = Color.FromArgb(255, 177, 109); 706rgbTable[KnownColors.msocbvcrCBGradMouseOverBegin] = Color.FromArgb(255, 255, 222); 707rgbTable[KnownColors.msocbvcrCBGradMouseOverEnd] = Color.FromArgb(255, 203, 136); 708rgbTable[KnownColors.msocbvcrCBGradMouseOverMiddle] = Color.FromArgb(255, 225, 172); 709rgbTable[KnownColors.msocbvcrCBGradOptionsBegin] = Color.FromArgb(186, 204, 150); 710rgbTable[KnownColors.msocbvcrCBGradOptionsEnd] = Color.FromArgb(96, 119, 107); 711rgbTable[KnownColors.msocbvcrCBGradOptionsMiddle] = Color.FromArgb(141, 160, 107); 712rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverBegin] = Color.FromArgb(255, 255, 222); 713rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverEnd] = Color.FromArgb(255, 193, 118); 714rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverMiddle] = Color.FromArgb(255, 225, 172); 715rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedBegin] = Color.FromArgb(254, 140, 73); 716rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedEnd] = Color.FromArgb(255, 221, 152); 717rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedMiddle] = Color.FromArgb(255, 184, 116); 718rgbTable[KnownColors.msocbvcrCBGradSelectedBegin] = Color.FromArgb(255, 223, 154); 719rgbTable[KnownColors.msocbvcrCBGradSelectedEnd] = Color.FromArgb(255, 166, 76); 720rgbTable[KnownColors.msocbvcrCBGradSelectedMiddle] = Color.FromArgb(255, 195, 116); 721rgbTable[KnownColors.msocbvcrCBGradVertBegin] = Color.FromArgb(255, 255, 237); 722rgbTable[KnownColors.msocbvcrCBGradVertEnd] = Color.FromArgb(181, 196, 143); 723rgbTable[KnownColors.msocbvcrCBGradVertMiddle] = Color.FromArgb(206, 220, 167); 724rgbTable[KnownColors.msocbvcrCBIconDisabledDark] = Color.FromArgb(131, 144, 113); 725rgbTable[KnownColors.msocbvcrCBIconDisabledLight] = Color.FromArgb(243, 244, 240); 726rgbTable[KnownColors.msocbvcrCBLabelBkgnd] = Color.FromArgb(218, 227, 187); 727rgbTable[KnownColors.msocbvcrCBLabelBkgnd] = Color.FromArgb(218, 227, 187); 728rgbTable[KnownColors.msocbvcrCBLowColorIconDisabled] = Color.FromArgb(159, 174, 122); 729rgbTable[KnownColors.msocbvcrCBMainMenuBkgd] = Color.FromArgb(236, 233, 216); 730rgbTable[KnownColors.msocbvcrCBMenuBdrOuter] = Color.FromArgb(117, 141, 94); 731rgbTable[KnownColors.msocbvcrCBMenuBkgd] = Color.FromArgb(244, 244, 238); 732rgbTable[KnownColors.msocbvcrCBMenuCtlText] = Color.FromArgb(0, 0, 0); 733rgbTable[KnownColors.msocbvcrCBMenuCtlTextDisabled] = Color.FromArgb(141, 141, 141); 734rgbTable[KnownColors.msocbvcrCBMenuIconBkgd] = Color.FromArgb(216, 227, 182); 735rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] = Color.FromArgb(173, 181, 157); 736rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] = Color.FromArgb(173, 181, 157); 737rgbTable[KnownColors.msocbvcrCBMenuShadow] = Color.FromArgb(134, 148, 108); 738rgbTable[KnownColors.msocbvcrCBMenuSplitArrow] = Color.FromArgb(0, 0, 0); 739rgbTable[KnownColors.msocbvcrCBOptionsButtonShadow] = Color.FromArgb(255, 255, 255); 740rgbTable[KnownColors.msocbvcrCBShadow] = Color.FromArgb(96, 128, 88); 741rgbTable[KnownColors.msocbvcrCBSplitterLine] = Color.FromArgb(96, 128, 88); 742rgbTable[KnownColors.msocbvcrCBSplitterLineLight] = Color.FromArgb(244, 247, 222); 743rgbTable[KnownColors.msocbvcrCBTearOffHandle] = Color.FromArgb(197, 212, 159); 744rgbTable[KnownColors.msocbvcrCBTearOffHandleMouseOver] = Color.FromArgb(255, 238, 194); 745rgbTable[KnownColors.msocbvcrCBTitleBkgd] = Color.FromArgb(116, 134, 94); 746rgbTable[KnownColors.msocbvcrCBTitleText] = Color.FromArgb(255, 255, 255); 747rgbTable[KnownColors.msocbvcrDisabledFocuslessHighlightedText] = Color.FromArgb(172, 168, 153); 748rgbTable[KnownColors.msocbvcrDisabledHighlightedText] = Color.FromArgb(220, 224, 208); 749rgbTable[KnownColors.msocbvcrDlgGroupBoxText] = Color.FromArgb(153, 84, 10); 750rgbTable[KnownColors.msocbvcrDocTabBdr] = Color.FromArgb(96, 119, 107); 751rgbTable[KnownColors.msocbvcrDocTabBdrDark] = Color.FromArgb(176, 194, 140); 752rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseDown] = Color.FromArgb(63, 93, 56); 753rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(63, 93, 56); 754rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(63, 93, 56); 755rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(63, 93, 56); 756rgbTable[KnownColors.msocbvcrDocTabBdrLight] = Color.FromArgb(255, 255, 255); 757rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseDown] = Color.FromArgb(63, 93, 56); 758rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(63, 93, 56); 759rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(63, 93, 56); 760rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(63, 93, 56); 761rgbTable[KnownColors.msocbvcrDocTabBdrMouseDown] = Color.FromArgb(63, 93, 56); 762rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(63, 93, 56); 763rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(63, 93, 56); 764rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(63, 93, 56); 765rgbTable[KnownColors.msocbvcrDocTabBdrSelected] = Color.FromArgb(96, 128, 88); 766rgbTable[KnownColors.msocbvcrDocTabBkgd] = Color.FromArgb(218, 227, 187); 767rgbTable[KnownColors.msocbvcrDocTabBkgdMouseDown] = Color.FromArgb(254, 128, 62); 768rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 769rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 770rgbTable[KnownColors.msocbvcrDocTabBkgdSelected] = Color.FromArgb(255, 255, 255); 771rgbTable[KnownColors.msocbvcrDocTabText] = Color.FromArgb(0, 0, 0); 772rgbTable[KnownColors.msocbvcrDocTabTextMouseDown] = Color.FromArgb(0, 0, 0); 773rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 774rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 775rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 776rgbTable[KnownColors.msocbvcrDocTabTextSelected] = Color.FromArgb(0, 0, 0); 777rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] = Color.FromArgb(218, 227, 187); 778rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] = Color.FromArgb(218, 227, 187); 779rgbTable[KnownColors.msocbvcrDWActiveTabText] = Color.FromArgb(0, 0, 0); 780rgbTable[KnownColors.msocbvcrDWActiveTabText] = Color.FromArgb(0, 0, 0); 781rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] = Color.FromArgb(128, 128, 128); 782rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] = Color.FromArgb(128, 128, 128); 783rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] = Color.FromArgb(183, 198, 145); 784rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] = Color.FromArgb(183, 198, 145); 785rgbTable[KnownColors.msocbvcrDWInactiveTabText] = Color.FromArgb(255, 255, 255); 786rgbTable[KnownColors.msocbvcrDWInactiveTabText] = Color.FromArgb(255, 255, 255); 787rgbTable[KnownColors.msocbvcrDWTabBkgdMouseDown] = Color.FromArgb(254, 128, 62); 788rgbTable[KnownColors.msocbvcrDWTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 789rgbTable[KnownColors.msocbvcrDWTabTextMouseDown] = Color.FromArgb(0, 0, 0); 790rgbTable[KnownColors.msocbvcrDWTabTextMouseOver] = Color.FromArgb(0, 0, 0); 791rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] = Color.FromArgb(236, 233, 216); 792rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] = Color.FromArgb(236, 233, 216); 793rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] = Color.FromArgb(0, 0, 0); 794rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] = Color.FromArgb(0, 0, 0); 795rgbTable[KnownColors.msocbvcrGDHeaderBdr] = Color.FromArgb(191, 191, 223); 796rgbTable[KnownColors.msocbvcrGDHeaderBkgd] = Color.FromArgb(239, 235, 222); 797rgbTable[KnownColors.msocbvcrGDHeaderCellBdr] = Color.FromArgb(126, 125, 104); 798rgbTable[KnownColors.msocbvcrGDHeaderCellBkgd] = Color.FromArgb(239, 235, 222); 799rgbTable[KnownColors.msocbvcrGDHeaderCellBkgdSelected] = Color.FromArgb(255, 192, 111); 800rgbTable[KnownColors.msocbvcrGDHeaderSeeThroughSelection] = Color.FromArgb(128, 128, 128); 801rgbTable[KnownColors.msocbvcrGSPDarkBkgd] = Color.FromArgb(159, 171, 128); 802rgbTable[KnownColors.msocbvcrGSPDarkBkgd] = Color.FromArgb(159, 171, 128); 803rgbTable[KnownColors.msocbvcrGSPGroupContentDarkBkgd] = Color.FromArgb(217, 227, 187); 804rgbTable[KnownColors.msocbvcrGSPGroupContentLightBkgd] = Color.FromArgb(230, 234, 208); 805rgbTable[KnownColors.msocbvcrGSPGroupContentText] = Color.FromArgb(0, 0, 0); 806rgbTable[KnownColors.msocbvcrGSPGroupContentTextDisabled] = Color.FromArgb(150, 145, 133); 807rgbTable[KnownColors.msocbvcrGSPGroupHeaderDarkBkgd] = Color.FromArgb(161, 176, 128); 808rgbTable[KnownColors.msocbvcrGSPGroupHeaderLightBkgd] = Color.FromArgb(210, 223, 174); 809rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] = Color.FromArgb(90, 107, 70); 810rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] = Color.FromArgb(90, 107, 70); 811rgbTable[KnownColors.msocbvcrGSPGroupline] = Color.FromArgb(255, 255, 255); 812rgbTable[KnownColors.msocbvcrGSPGroupline] = Color.FromArgb(255, 255, 255); 813rgbTable[KnownColors.msocbvcrGSPHyperlink] = Color.FromArgb(0, 61, 178); 814rgbTable[KnownColors.msocbvcrGSPLightBkgd] = Color.FromArgb(243, 242, 231); 815rgbTable[KnownColors.msocbvcrHyperlink] = Color.FromArgb(0, 61, 178); 816rgbTable[KnownColors.msocbvcrHyperlinkFollowed] = Color.FromArgb(170, 0, 170); 817rgbTable[KnownColors.msocbvcrJotNavUIBdr] = Color.FromArgb(96, 128, 88); 818rgbTable[KnownColors.msocbvcrJotNavUIBdr] = Color.FromArgb(96, 128, 88); 819rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] = Color.FromArgb(217, 217, 167); 820rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] = Color.FromArgb(217, 217, 167); 821rgbTable[KnownColors.msocbvcrJotNavUIGradEnd] = Color.FromArgb(255, 255, 255); 822rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] = Color.FromArgb(242, 241, 228); 823rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] = Color.FromArgb(242, 241, 228); 824rgbTable[KnownColors.msocbvcrJotNavUIText] = Color.FromArgb(0, 0, 0); 825rgbTable[KnownColors.msocbvcrListHeaderArrow] = Color.FromArgb(172, 168, 153); 826rgbTable[KnownColors.msocbvcrNetLookBkgnd] = Color.FromArgb(255, 255, 237); 827rgbTable[KnownColors.msocbvcrOABBkgd] = Color.FromArgb(255, 255, 255); 828rgbTable[KnownColors.msocbvcrOBBkgdBdr] = Color.FromArgb(211, 211, 211); 829rgbTable[KnownColors.msocbvcrOBBkgdBdrContrast] = Color.FromArgb(128, 128, 128); 830rgbTable[KnownColors.msocbvcrOGMDIParentWorkspaceBkgd] = Color.FromArgb(151, 160, 123); 831rgbTable[KnownColors.msocbvcrOGRulerActiveBkgd] = Color.FromArgb(255, 255, 255); 832rgbTable[KnownColors.msocbvcrOGRulerBdr] = Color.FromArgb(0, 0, 0); 833rgbTable[KnownColors.msocbvcrOGRulerBkgd] = Color.FromArgb(226, 231, 191); 834rgbTable[KnownColors.msocbvcrOGRulerInactiveBkgd] = Color.FromArgb(171, 192, 138); 835rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdr] = Color.FromArgb(117, 141, 94); 836rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdrHighlight] = Color.FromArgb(255, 255, 255); 837rgbTable[KnownColors.msocbvcrOGRulerTabStopTicks] = Color.FromArgb(128, 128, 128); 838rgbTable[KnownColors.msocbvcrOGRulerText] = Color.FromArgb(0, 0, 0); 839rgbTable[KnownColors.msocbvcrOGTaskPaneGroupBoxHeaderBkgd] = Color.FromArgb(218, 227, 187); 840rgbTable[KnownColors.msocbvcrOGWorkspaceBkgd] = Color.FromArgb(151, 160, 123); 841rgbTable[KnownColors.msocbvcrOLKFlagNone] = Color.FromArgb(242, 240, 228); 842rgbTable[KnownColors.msocbvcrOLKFolderbarDark] = Color.FromArgb(96, 119, 66); 843rgbTable[KnownColors.msocbvcrOLKFolderbarLight] = Color.FromArgb(175, 192, 130); 844rgbTable[KnownColors.msocbvcrOLKFolderbarText] = Color.FromArgb(255, 255, 255); 845rgbTable[KnownColors.msocbvcrOLKGridlines] = Color.FromArgb(234, 233, 225); 846rgbTable[KnownColors.msocbvcrOLKGroupLine] = Color.FromArgb(181, 196, 143); 847rgbTable[KnownColors.msocbvcrOLKGroupNested] = Color.FromArgb(253, 238, 201); 848rgbTable[KnownColors.msocbvcrOLKGroupShaded] = Color.FromArgb(175, 186, 145); 849rgbTable[KnownColors.msocbvcrOLKGroupText] = Color.FromArgb(115, 137, 84); 850rgbTable[KnownColors.msocbvcrOLKIconBar] = Color.FromArgb(253, 247, 233); 851rgbTable[KnownColors.msocbvcrOLKInfoBarBkgd] = Color.FromArgb(151, 160, 123); 852rgbTable[KnownColors.msocbvcrOLKInfoBarText] = Color.FromArgb(255, 255, 255); 853rgbTable[KnownColors.msocbvcrOLKPreviewPaneLabelText] = Color.FromArgb(151, 160, 123); 854rgbTable[KnownColors.msocbvcrOLKTodayIndicatorDark] = Color.FromArgb(187, 85, 3); 855rgbTable[KnownColors.msocbvcrOLKTodayIndicatorLight] = Color.FromArgb(251, 200, 79); 856rgbTable[KnownColors.msocbvcrOLKWBActionDividerLine] = Color.FromArgb(200, 212, 172); 857rgbTable[KnownColors.msocbvcrOLKWBButtonDark] = Color.FromArgb(176, 191, 138); 858rgbTable[KnownColors.msocbvcrOLKWBButtonLight] = Color.FromArgb(234, 240, 207); 859rgbTable[KnownColors.msocbvcrOLKWBButtonLight] = Color.FromArgb(234, 240, 207); 860rgbTable[KnownColors.msocbvcrOLKWBDarkOutline] = Color.FromArgb(96, 128, 88); 861rgbTable[KnownColors.msocbvcrOLKWBFoldersBackground] = Color.FromArgb(255, 255, 255); 862rgbTable[KnownColors.msocbvcrOLKWBHoverButtonDark] = Color.FromArgb(247, 190, 87); 863rgbTable[KnownColors.msocbvcrOLKWBHoverButtonLight] = Color.FromArgb(255, 255, 220); 864rgbTable[KnownColors.msocbvcrOLKWBLabelText] = Color.FromArgb(50, 69, 105); 865rgbTable[KnownColors.msocbvcrOLKWBPressedButtonDark] = Color.FromArgb(248, 222, 128); 866rgbTable[KnownColors.msocbvcrOLKWBPressedButtonLight] = Color.FromArgb(232, 127, 8); 867rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonDark] = Color.FromArgb(238, 147, 17); 868rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonLight] = Color.FromArgb(251, 230, 148); 869rgbTable[KnownColors.msocbvcrOLKWBSplitterDark] = Color.FromArgb(64, 81, 59); 870rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] = Color.FromArgb(120, 142, 111); 871rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] = Color.FromArgb(120, 142, 111); 872rgbTable[KnownColors.msocbvcrPlacesBarBkgd] = Color.FromArgb(236, 233, 216); 873rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd] = Color.FromArgb(242, 240, 228); 874rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabBdr] = Color.FromArgb(96, 128, 88); 875rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd] = Color.FromArgb(206, 220, 167); 876rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabText] = Color.FromArgb(0, 0, 0); 877rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelected] = Color.FromArgb(107, 129, 107); 878rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelectedMouseOver] = Color.FromArgb(107, 129, 107); 879rgbTable[KnownColors.msocbvcrPPSlideBdrInactiveSelected] = Color.FromArgb(128, 128, 128); 880rgbTable[KnownColors.msocbvcrPPSlideBdrMouseOver] = Color.FromArgb(107, 129, 107); 881rgbTable[KnownColors.msocbvcrPubPrintDocScratchPageBkgd] = Color.FromArgb(151, 160, 123); 882rgbTable[KnownColors.msocbvcrPubWebDocScratchPageBkgd] = Color.FromArgb(193, 198, 176); 883rgbTable[KnownColors.msocbvcrSBBdr] = Color.FromArgb(211, 211, 211); 884rgbTable[KnownColors.msocbvcrScrollbarBkgd] = Color.FromArgb(249, 249, 247); 885rgbTable[KnownColors.msocbvcrToastGradBegin] = Color.FromArgb(237, 242, 212); 886rgbTable[KnownColors.msocbvcrToastGradEnd] = Color.FromArgb(191, 206, 153); 887rgbTable[KnownColors.msocbvcrWPBdrInnerDocked] = Color.FromArgb(255, 255, 255); 888rgbTable[KnownColors.msocbvcrWPBdrOuterDocked] = Color.FromArgb(242, 241, 228); 889rgbTable[KnownColors.msocbvcrWPBdrOuterFloating] = Color.FromArgb(116, 134, 94); 890rgbTable[KnownColors.msocbvcrWPBkgd] = Color.FromArgb(243, 242, 231); 891rgbTable[KnownColors.msocbvcrWPCtlBdr] = Color.FromArgb(164, 185, 127); 892rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] = Color.FromArgb(0, 0, 0); 893rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] = Color.FromArgb(0, 0, 0); 894rgbTable[KnownColors.msocbvcrWPCtlBdrDisabled] = Color.FromArgb(128, 128, 128); 895rgbTable[KnownColors.msocbvcrWPCtlBkgd] = Color.FromArgb(197, 212, 159); 896rgbTable[KnownColors.msocbvcrWPCtlBkgdDisabled] = Color.FromArgb(222, 222, 222); 897rgbTable[KnownColors.msocbvcrWPCtlText] = Color.FromArgb(0, 0, 0); 898rgbTable[KnownColors.msocbvcrWPCtlTextDisabled] = Color.FromArgb(172, 168, 153); 899rgbTable[KnownColors.msocbvcrWPCtlTextMouseDown] = Color.FromArgb(0, 0, 0); 900rgbTable[KnownColors.msocbvcrWPGroupline] = Color.FromArgb(188, 187, 177); 901rgbTable[KnownColors.msocbvcrWPInfoTipBkgd] = Color.FromArgb(255, 255, 204); 902rgbTable[KnownColors.msocbvcrWPInfoTipText] = Color.FromArgb(0, 0, 0); 903rgbTable[KnownColors.msocbvcrWPNavBarBkgnd] = Color.FromArgb(116, 134, 94); 904rgbTable[KnownColors.msocbvcrWPText] = Color.FromArgb(0, 0, 0); 905rgbTable[KnownColors.msocbvcrWPText] = Color.FromArgb(0, 0, 0); 906rgbTable[KnownColors.msocbvcrWPTextDisabled] = Color.FromArgb(172, 168, 153); 907rgbTable[KnownColors.msocbvcrWPTitleBkgdActive] = Color.FromArgb(216, 227, 182); 908rgbTable[KnownColors.msocbvcrWPTitleBkgdInactive] = Color.FromArgb(188, 205, 131); 909rgbTable[KnownColors.msocbvcrWPTitleTextActive] = Color.FromArgb(0, 0, 0); 910rgbTable[KnownColors.msocbvcrWPTitleTextInactive] = Color.FromArgb(0, 0, 0); 911rgbTable[KnownColors.msocbvcrXLFormulaBarBkgd] = Color.FromArgb(217, 217, 167); 914private static void InitSilverLunaColors(ref Dictionary<KnownColors, Color> rgbTable) 916rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] = Color.FromArgb(173, 174, 193); 917rgbTable[KnownColors.msocbvcrCBBdrOuterFloating] = Color.FromArgb(122, 121, 153); 918rgbTable[KnownColors.msocbvcrCBBkgd] = Color.FromArgb(219, 218, 228); 919rgbTable[KnownColors.msocbvcrCBCtlBdrMouseDown] = Color.FromArgb(75, 75, 111); 920rgbTable[KnownColors.msocbvcrCBCtlBdrMouseOver] = Color.FromArgb(75, 75, 111); 921rgbTable[KnownColors.msocbvcrCBCtlBdrSelected] = Color.FromArgb(75, 75, 111); 922rgbTable[KnownColors.msocbvcrCBCtlBdrSelectedMouseOver] = Color.FromArgb(75, 75, 111); 923rgbTable[KnownColors.msocbvcrCBCtlBkgd] = Color.FromArgb(219, 218, 228); 924rgbTable[KnownColors.msocbvcrCBCtlBkgdLight] = Color.FromArgb(255, 255, 255); 925rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseDown] = Color.FromArgb(254, 128, 62); 926rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] = Color.FromArgb(255, 238, 194); 927rgbTable[KnownColors.msocbvcrCBCtlBkgdSelected] = Color.FromArgb(255, 192, 111); 928rgbTable[KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver] = Color.FromArgb(254, 128, 62); 929rgbTable[KnownColors.msocbvcrCBCtlText] = Color.FromArgb(0, 0, 0); 930rgbTable[KnownColors.msocbvcrCBCtlTextDisabled] = Color.FromArgb(141, 141, 141); 931rgbTable[KnownColors.msocbvcrCBCtlTextLight] = Color.FromArgb(128, 128, 128); 932rgbTable[KnownColors.msocbvcrCBCtlTextMouseDown] = Color.FromArgb(0, 0, 0); 933rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] = Color.FromArgb(0, 0, 0); 934rgbTable[KnownColors.msocbvcrCBDockSeparatorLine] = Color.FromArgb(110, 109, 143); 935rgbTable[KnownColors.msocbvcrCBDragHandle] = Color.FromArgb(84, 84, 117); 936rgbTable[KnownColors.msocbvcrCBDragHandleShadow] = Color.FromArgb(255, 255, 255); 937rgbTable[KnownColors.msocbvcrCBDropDownArrow] = Color.FromArgb(224, 223, 227); 938rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzBegin] = Color.FromArgb(215, 215, 229); 939rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzEnd] = Color.FromArgb(243, 243, 247); 940rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin] = Color.FromArgb(215, 215, 226); 941rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd] = Color.FromArgb(118, 116, 151); 942rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle] = Color.FromArgb(184, 185, 202); 943rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdBegin] = Color.FromArgb(232, 233, 242); 944rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdEnd] = Color.FromArgb(172, 170, 194); 945rgbTable[KnownColors.msocbvcrCBGradMouseDownBegin] = Color.FromArgb(254, 128, 62); 946rgbTable[KnownColors.msocbvcrCBGradMouseDownEnd] = Color.FromArgb(255, 223, 154); 947rgbTable[KnownColors.msocbvcrCBGradMouseDownMiddle] = Color.FromArgb(255, 177, 109); 948rgbTable[KnownColors.msocbvcrCBGradMouseOverBegin] = Color.FromArgb(255, 255, 222); 949rgbTable[KnownColors.msocbvcrCBGradMouseOverEnd] = Color.FromArgb(255, 203, 136); 950rgbTable[KnownColors.msocbvcrCBGradMouseOverMiddle] = Color.FromArgb(255, 225, 172); 951rgbTable[KnownColors.msocbvcrCBGradOptionsBegin] = Color.FromArgb(186, 185, 206); 952rgbTable[KnownColors.msocbvcrCBGradOptionsEnd] = Color.FromArgb(118, 116, 146); 953rgbTable[KnownColors.msocbvcrCBGradOptionsMiddle] = Color.FromArgb(156, 155, 180); 954rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverBegin] = Color.FromArgb(255, 255, 222); 955rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverEnd] = Color.FromArgb(255, 193, 118); 956rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverMiddle] = Color.FromArgb(255, 225, 172); 957rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedBegin] = Color.FromArgb(254, 140, 73); 958rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedEnd] = Color.FromArgb(255, 221, 152); 959rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedMiddle] = Color.FromArgb(255, 184, 116); 960rgbTable[KnownColors.msocbvcrCBGradSelectedBegin] = Color.FromArgb(255, 223, 154); 961rgbTable[KnownColors.msocbvcrCBGradSelectedEnd] = Color.FromArgb(255, 166, 76); 962rgbTable[KnownColors.msocbvcrCBGradSelectedMiddle] = Color.FromArgb(255, 195, 116); 963rgbTable[KnownColors.msocbvcrCBGradVertBegin] = Color.FromArgb(249, 249, 255); 964rgbTable[KnownColors.msocbvcrCBGradVertEnd] = Color.FromArgb(147, 145, 176); 965rgbTable[KnownColors.msocbvcrCBGradVertMiddle] = Color.FromArgb(225, 226, 236); 966rgbTable[KnownColors.msocbvcrCBIconDisabledDark] = Color.FromArgb(122, 121, 153); 967rgbTable[KnownColors.msocbvcrCBIconDisabledLight] = Color.FromArgb(247, 245, 249); 968rgbTable[KnownColors.msocbvcrCBLabelBkgnd] = Color.FromArgb(212, 212, 226); 969rgbTable[KnownColors.msocbvcrCBLabelBkgnd] = Color.FromArgb(212, 212, 226); 970rgbTable[KnownColors.msocbvcrCBLowColorIconDisabled] = Color.FromArgb(168, 167, 190); 971rgbTable[KnownColors.msocbvcrCBMainMenuBkgd] = Color.FromArgb(198, 200, 215); 972rgbTable[KnownColors.msocbvcrCBMenuBdrOuter] = Color.FromArgb(124, 124, 148); 973rgbTable[KnownColors.msocbvcrCBMenuBkgd] = Color.FromArgb(253, 250, 255); 974rgbTable[KnownColors.msocbvcrCBMenuCtlText] = Color.FromArgb(0, 0, 0); 975rgbTable[KnownColors.msocbvcrCBMenuCtlTextDisabled] = Color.FromArgb(141, 141, 141); 976rgbTable[KnownColors.msocbvcrCBMenuIconBkgd] = Color.FromArgb(214, 211, 231); 977rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] = Color.FromArgb(185, 187, 200); 978rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] = Color.FromArgb(185, 187, 200); 979rgbTable[KnownColors.msocbvcrCBMenuShadow] = Color.FromArgb(154, 140, 176); 980rgbTable[KnownColors.msocbvcrCBMenuSplitArrow] = Color.FromArgb(0, 0, 0); 981rgbTable[KnownColors.msocbvcrCBOptionsButtonShadow] = Color.FromArgb(255, 255, 255); 982rgbTable[KnownColors.msocbvcrCBShadow] = Color.FromArgb(124, 124, 148); 983rgbTable[KnownColors.msocbvcrCBSplitterLine] = Color.FromArgb(110, 109, 143); 984rgbTable[KnownColors.msocbvcrCBSplitterLineLight] = Color.FromArgb(255, 255, 255); 985rgbTable[KnownColors.msocbvcrCBTearOffHandle] = Color.FromArgb(192, 192, 211); 986rgbTable[KnownColors.msocbvcrCBTearOffHandleMouseOver] = Color.FromArgb(255, 238, 194); 987rgbTable[KnownColors.msocbvcrCBTitleBkgd] = Color.FromArgb(122, 121, 153); 988rgbTable[KnownColors.msocbvcrCBTitleText] = Color.FromArgb(255, 255, 255); 989rgbTable[KnownColors.msocbvcrDisabledFocuslessHighlightedText] = Color.FromArgb(172, 168, 153); 990rgbTable[KnownColors.msocbvcrDisabledHighlightedText] = Color.FromArgb(59, 59, 63); 991rgbTable[KnownColors.msocbvcrDlgGroupBoxText] = Color.FromArgb(7, 70, 213); 992rgbTable[KnownColors.msocbvcrDocTabBdr] = Color.FromArgb(118, 116, 146); 993rgbTable[KnownColors.msocbvcrDocTabBdrDark] = Color.FromArgb(186, 185, 206); 994rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseDown] = Color.FromArgb(75, 75, 111); 995rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(75, 75, 111); 996rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(75, 75, 111); 997rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(75, 75, 111); 998rgbTable[KnownColors.msocbvcrDocTabBdrLight] = Color.FromArgb(255, 255, 255); 999rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseDown] = Color.FromArgb(75, 75, 111); 1000rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(75, 75, 111); 1001rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(75, 75, 111); 1002rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(75, 75, 111); 1003rgbTable[KnownColors.msocbvcrDocTabBdrMouseDown] = Color.FromArgb(75, 75, 111); 1004rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(75, 75, 111); 1005rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(75, 75, 111); 1006rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(75, 75, 111); 1007rgbTable[KnownColors.msocbvcrDocTabBdrSelected] = Color.FromArgb(124, 124, 148); 1008rgbTable[KnownColors.msocbvcrDocTabBkgd] = Color.FromArgb(212, 212, 226); 1009rgbTable[KnownColors.msocbvcrDocTabBkgdMouseDown] = Color.FromArgb(254, 128, 62); 1010rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 1011rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 1012rgbTable[KnownColors.msocbvcrDocTabBkgdSelected] = Color.FromArgb(255, 255, 255); 1013rgbTable[KnownColors.msocbvcrDocTabText] = Color.FromArgb(0, 0, 0); 1014rgbTable[KnownColors.msocbvcrDocTabTextMouseDown] = Color.FromArgb(0, 0, 0); 1015rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 1016rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 1017rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 1018rgbTable[KnownColors.msocbvcrDocTabTextSelected] = Color.FromArgb(0, 0, 0); 1019rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] = Color.FromArgb(212, 212, 226); 1020rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] = Color.FromArgb(212, 212, 226); 1021rgbTable[KnownColors.msocbvcrDWActiveTabText] = Color.FromArgb(0, 0, 0); 1022rgbTable[KnownColors.msocbvcrDWActiveTabText] = Color.FromArgb(0, 0, 0); 1023rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] = Color.FromArgb(148, 148, 148); 1024rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] = Color.FromArgb(148, 148, 148); 1025rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] = Color.FromArgb(171, 169, 194); 1026rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] = Color.FromArgb(171, 169, 194); 1027rgbTable[KnownColors.msocbvcrDWInactiveTabText] = Color.FromArgb(255, 255, 255); 1028rgbTable[KnownColors.msocbvcrDWInactiveTabText] = Color.FromArgb(255, 255, 255); 1029rgbTable[KnownColors.msocbvcrDWTabBkgdMouseDown] = Color.FromArgb(254, 128, 62); 1030rgbTable[KnownColors.msocbvcrDWTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 1031rgbTable[KnownColors.msocbvcrDWTabTextMouseDown] = Color.FromArgb(0, 0, 0); 1032rgbTable[KnownColors.msocbvcrDWTabTextMouseOver] = Color.FromArgb(0, 0, 0); 1033rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] = Color.FromArgb(224, 223, 227); 1034rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] = Color.FromArgb(224, 223, 227); 1035rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] = Color.FromArgb(0, 0, 0); 1036rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] = Color.FromArgb(0, 0, 0); 1037rgbTable[KnownColors.msocbvcrGDHeaderBdr] = Color.FromArgb(191, 191, 223); 1038rgbTable[KnownColors.msocbvcrGDHeaderBkgd] = Color.FromArgb(239, 235, 222); 1039rgbTable[KnownColors.msocbvcrGDHeaderCellBdr] = Color.FromArgb(126, 125, 104); 1040rgbTable[KnownColors.msocbvcrGDHeaderCellBkgd] = Color.FromArgb(223, 223, 234); 1041rgbTable[KnownColors.msocbvcrGDHeaderCellBkgdSelected] = Color.FromArgb(255, 192, 111); 1042rgbTable[KnownColors.msocbvcrGDHeaderSeeThroughSelection] = Color.FromArgb(128, 128, 128); 1043rgbTable[KnownColors.msocbvcrGSPDarkBkgd] = Color.FromArgb(162, 162, 181); 1044rgbTable[KnownColors.msocbvcrGSPDarkBkgd] = Color.FromArgb(162, 162, 181); 1045rgbTable[KnownColors.msocbvcrGSPGroupContentDarkBkgd] = Color.FromArgb(212, 213, 229); 1046rgbTable[KnownColors.msocbvcrGSPGroupContentLightBkgd] = Color.FromArgb(227, 227, 236); 1047rgbTable[KnownColors.msocbvcrGSPGroupContentText] = Color.FromArgb(0, 0, 0); 1048rgbTable[KnownColors.msocbvcrGSPGroupContentTextDisabled] = Color.FromArgb(150, 145, 133); 1049rgbTable[KnownColors.msocbvcrGSPGroupHeaderDarkBkgd] = Color.FromArgb(169, 168, 191); 1050rgbTable[KnownColors.msocbvcrGSPGroupHeaderLightBkgd] = Color.FromArgb(208, 208, 223); 1051rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] = Color.FromArgb(92, 91, 121); 1052rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] = Color.FromArgb(92, 91, 121); 1053rgbTable[KnownColors.msocbvcrGSPGroupline] = Color.FromArgb(255, 255, 255); 1054rgbTable[KnownColors.msocbvcrGSPGroupline] = Color.FromArgb(255, 255, 255); 1055rgbTable[KnownColors.msocbvcrGSPHyperlink] = Color.FromArgb(0, 61, 178); 1056rgbTable[KnownColors.msocbvcrGSPLightBkgd] = Color.FromArgb(238, 238, 244); 1057rgbTable[KnownColors.msocbvcrHyperlink] = Color.FromArgb(0, 61, 178); 1058rgbTable[KnownColors.msocbvcrHyperlinkFollowed] = Color.FromArgb(170, 0, 170); 1059rgbTable[KnownColors.msocbvcrJotNavUIBdr] = Color.FromArgb(124, 124, 148); 1060rgbTable[KnownColors.msocbvcrJotNavUIBdr] = Color.FromArgb(124, 124, 148); 1061rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] = Color.FromArgb(215, 215, 229); 1062rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] = Color.FromArgb(215, 215, 229); 1063rgbTable[KnownColors.msocbvcrJotNavUIGradEnd] = Color.FromArgb(255, 255, 255); 1064rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] = Color.FromArgb(243, 243, 247); 1065rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] = Color.FromArgb(243, 243, 247); 1066rgbTable[KnownColors.msocbvcrJotNavUIText] = Color.FromArgb(0, 0, 0); 1067rgbTable[KnownColors.msocbvcrListHeaderArrow] = Color.FromArgb(172, 168, 153); 1068rgbTable[KnownColors.msocbvcrNetLookBkgnd] = Color.FromArgb(249, 249, 255); 1069rgbTable[KnownColors.msocbvcrOABBkgd] = Color.FromArgb(255, 255, 255); 1070rgbTable[KnownColors.msocbvcrOBBkgdBdr] = Color.FromArgb(211, 211, 211); 1071rgbTable[KnownColors.msocbvcrOBBkgdBdrContrast] = Color.FromArgb(128, 128, 128); 1072rgbTable[KnownColors.msocbvcrOGMDIParentWorkspaceBkgd] = Color.FromArgb(155, 154, 179); 1073rgbTable[KnownColors.msocbvcrOGRulerActiveBkgd] = Color.FromArgb(255, 255, 255); 1074rgbTable[KnownColors.msocbvcrOGRulerBdr] = Color.FromArgb(0, 0, 0); 1075rgbTable[KnownColors.msocbvcrOGRulerBkgd] = Color.FromArgb(223, 223, 234); 1076rgbTable[KnownColors.msocbvcrOGRulerInactiveBkgd] = Color.FromArgb(177, 176, 195); 1077rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdr] = Color.FromArgb(124, 124, 148); 1078rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdrHighlight] = Color.FromArgb(255, 255, 255); 1079rgbTable[KnownColors.msocbvcrOGRulerTabStopTicks] = Color.FromArgb(128, 128, 128); 1080rgbTable[KnownColors.msocbvcrOGRulerText] = Color.FromArgb(0, 0, 0); 1081rgbTable[KnownColors.msocbvcrOGTaskPaneGroupBoxHeaderBkgd] = Color.FromArgb(212, 212, 226); 1082rgbTable[KnownColors.msocbvcrOGWorkspaceBkgd] = Color.FromArgb(155, 154, 179); 1083rgbTable[KnownColors.msocbvcrOLKFlagNone] = Color.FromArgb(239, 239, 244); 1084rgbTable[KnownColors.msocbvcrOLKFolderbarDark] = Color.FromArgb(110, 109, 143); 1085rgbTable[KnownColors.msocbvcrOLKFolderbarLight] = Color.FromArgb(168, 167, 191); 1086rgbTable[KnownColors.msocbvcrOLKFolderbarText] = Color.FromArgb(255, 255, 255); 1087rgbTable[KnownColors.msocbvcrOLKGridlines] = Color.FromArgb(234, 233, 225); 1088rgbTable[KnownColors.msocbvcrOLKGroupLine] = Color.FromArgb(165, 164, 189); 1089rgbTable[KnownColors.msocbvcrOLKGroupNested] = Color.FromArgb(253, 238, 201); 1090rgbTable[KnownColors.msocbvcrOLKGroupShaded] = Color.FromArgb(229, 229, 235); 1091rgbTable[KnownColors.msocbvcrOLKGroupText] = Color.FromArgb(112, 111, 145); 1092rgbTable[KnownColors.msocbvcrOLKIconBar] = Color.FromArgb(253, 247, 233); 1093rgbTable[KnownColors.msocbvcrOLKInfoBarBkgd] = Color.FromArgb(155, 154, 179); 1094rgbTable[KnownColors.msocbvcrOLKInfoBarText] = Color.FromArgb(255, 255, 255); 1095rgbTable[KnownColors.msocbvcrOLKPreviewPaneLabelText] = Color.FromArgb(155, 154, 179); 1096rgbTable[KnownColors.msocbvcrOLKTodayIndicatorDark] = Color.FromArgb(187, 85, 3); 1097rgbTable[KnownColors.msocbvcrOLKTodayIndicatorLight] = Color.FromArgb(251, 200, 79); 1098rgbTable[KnownColors.msocbvcrOLKWBActionDividerLine] = Color.FromArgb(204, 206, 219); 1099rgbTable[KnownColors.msocbvcrOLKWBButtonDark] = Color.FromArgb(147, 145, 176); 1100rgbTable[KnownColors.msocbvcrOLKWBButtonLight] = Color.FromArgb(225, 226, 236); 1101rgbTable[KnownColors.msocbvcrOLKWBButtonLight] = Color.FromArgb(225, 226, 236); 1102rgbTable[KnownColors.msocbvcrOLKWBDarkOutline] = Color.FromArgb(124, 124, 148); 1103rgbTable[KnownColors.msocbvcrOLKWBFoldersBackground] = Color.FromArgb(255, 255, 255); 1104rgbTable[KnownColors.msocbvcrOLKWBHoverButtonDark] = Color.FromArgb(247, 190, 87); 1105rgbTable[KnownColors.msocbvcrOLKWBHoverButtonLight] = Color.FromArgb(255, 255, 220); 1106rgbTable[KnownColors.msocbvcrOLKWBLabelText] = Color.FromArgb(50, 69, 105); 1107rgbTable[KnownColors.msocbvcrOLKWBPressedButtonDark] = Color.FromArgb(248, 222, 128); 1108rgbTable[KnownColors.msocbvcrOLKWBPressedButtonLight] = Color.FromArgb(232, 127, 8); 1109rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonDark] = Color.FromArgb(238, 147, 17); 1110rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonLight] = Color.FromArgb(251, 230, 148); 1111rgbTable[KnownColors.msocbvcrOLKWBSplitterDark] = Color.FromArgb(110, 109, 143); 1112rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] = Color.FromArgb(168, 167, 191); 1113rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] = Color.FromArgb(168, 167, 191); 1114rgbTable[KnownColors.msocbvcrPlacesBarBkgd] = Color.FromArgb(224, 223, 227); 1115rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd] = Color.FromArgb(243, 243, 247); 1116rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabBdr] = Color.FromArgb(124, 124, 148); 1117rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd] = Color.FromArgb(215, 215, 229); 1118rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabText] = Color.FromArgb(0, 0, 0); 1119rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelected] = Color.FromArgb(142, 142, 170); 1120rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelectedMouseOver] = Color.FromArgb(142, 142, 170); 1121rgbTable[KnownColors.msocbvcrPPSlideBdrInactiveSelected] = Color.FromArgb(128, 128, 128); 1122rgbTable[KnownColors.msocbvcrPPSlideBdrMouseOver] = Color.FromArgb(142, 142, 170); 1123rgbTable[KnownColors.msocbvcrPubPrintDocScratchPageBkgd] = Color.FromArgb(155, 154, 179); 1124rgbTable[KnownColors.msocbvcrPubWebDocScratchPageBkgd] = Color.FromArgb(195, 195, 210); 1125rgbTable[KnownColors.msocbvcrSBBdr] = Color.FromArgb(236, 234, 218); 1126rgbTable[KnownColors.msocbvcrScrollbarBkgd] = Color.FromArgb(247, 247, 249); 1127rgbTable[KnownColors.msocbvcrToastGradBegin] = Color.FromArgb(239, 239, 247); 1128rgbTable[KnownColors.msocbvcrToastGradEnd] = Color.FromArgb(179, 178, 204); 1129rgbTable[KnownColors.msocbvcrWPBdrInnerDocked] = Color.FromArgb(255, 255, 255); 1130rgbTable[KnownColors.msocbvcrWPBdrOuterDocked] = Color.FromArgb(243, 243, 247); 1131rgbTable[KnownColors.msocbvcrWPBdrOuterFloating] = Color.FromArgb(122, 121, 153); 1132rgbTable[KnownColors.msocbvcrWPBkgd] = Color.FromArgb(238, 238, 244); 1133rgbTable[KnownColors.msocbvcrWPCtlBdr] = Color.FromArgb(165, 172, 178); 1134rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] = Color.FromArgb(0, 0, 0); 1135rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] = Color.FromArgb(0, 0, 0); 1136rgbTable[KnownColors.msocbvcrWPCtlBdrDisabled] = Color.FromArgb(128, 128, 128); 1137rgbTable[KnownColors.msocbvcrWPCtlBkgd] = Color.FromArgb(192, 192, 211); 1138rgbTable[KnownColors.msocbvcrWPCtlBkgdDisabled] = Color.FromArgb(222, 222, 222); 1139rgbTable[KnownColors.msocbvcrWPCtlText] = Color.FromArgb(0, 0, 0); 1140rgbTable[KnownColors.msocbvcrWPCtlTextDisabled] = Color.FromArgb(172, 168, 153); 1141rgbTable[KnownColors.msocbvcrWPCtlTextMouseDown] = Color.FromArgb(0, 0, 0); 1142rgbTable[KnownColors.msocbvcrWPGroupline] = Color.FromArgb(161, 160, 187); 1143rgbTable[KnownColors.msocbvcrWPInfoTipBkgd] = Color.FromArgb(255, 255, 204); 1144rgbTable[KnownColors.msocbvcrWPInfoTipText] = Color.FromArgb(0, 0, 0); 1145rgbTable[KnownColors.msocbvcrWPNavBarBkgnd] = Color.FromArgb(122, 121, 153); 1146rgbTable[KnownColors.msocbvcrWPText] = Color.FromArgb(0, 0, 0); 1147rgbTable[KnownColors.msocbvcrWPText] = Color.FromArgb(0, 0, 0); 1148rgbTable[KnownColors.msocbvcrWPTextDisabled] = Color.FromArgb(172, 168, 153); 1149rgbTable[KnownColors.msocbvcrWPTitleBkgdActive] = Color.FromArgb(184, 188, 234); 1150rgbTable[KnownColors.msocbvcrWPTitleBkgdInactive] = Color.FromArgb(198, 198, 217); 1151rgbTable[KnownColors.msocbvcrWPTitleTextActive] = Color.FromArgb(0, 0, 0); 1152rgbTable[KnownColors.msocbvcrWPTitleTextInactive] = Color.FromArgb(0, 0, 0); 1153rgbTable[KnownColors.msocbvcrXLFormulaBarBkgd] = Color.FromArgb(215, 215, 229); 1156private static void InitRoyaleColors(ref Dictionary<KnownColors, Color> rgbTable) 1158rgbTable[KnownColors.msocbvcrCBBkgd] = Color.FromArgb(238, 237, 240); // msocbvcrCBBkgd 1159rgbTable[KnownColors.msocbvcrCBDragHandle] = Color.FromArgb(189, 188, 191); // msocbvcrCBDragHandle -> Needs to equal VSCOLOR_COMMANDBAR_DRAGHANDLE in vscolors.cpp 1160rgbTable[KnownColors.msocbvcrCBSplitterLine] = Color.FromArgb(193, 193, 196); // msocbvcrCBSplitterLine 1161rgbTable[KnownColors.msocbvcrCBTitleBkgd] = Color.FromArgb(167, 166, 170); // msocbvcrCBTitleBkgd 1162rgbTable[KnownColors.msocbvcrCBTitleText] = Color.FromArgb(255, 255, 255); // msocbvcrCBTitleText 1163rgbTable[KnownColors.msocbvcrCBBdrOuterFloating] = Color.FromArgb(142, 141, 145); // msocbvcrCBBdrOuterFloating 1164rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] = Color.FromArgb(235, 233, 237); // msocbvcrCBBdrOuterDocked 1165rgbTable[KnownColors.msocbvcrCBTearOffHandle] = Color.FromArgb(238, 237, 240); // msocbvcrCBTearOffHandle 1166rgbTable[KnownColors.msocbvcrCBTearOffHandleMouseOver] = Color.FromArgb(194, 207, 229); // msocbvcrCBTearOffHandleMouseOver 1167rgbTable[KnownColors.msocbvcrCBCtlBkgd] = Color.FromArgb(238, 237, 240); // msocbvcrCBCtlBkgd 1168rgbTable[KnownColors.msocbvcrCBCtlText] = Color.FromArgb(000, 000, 000); // msocbvcrCBCtlText 1169rgbTable[KnownColors.msocbvcrCBCtlTextDisabled] = Color.FromArgb(176, 175, 179); // msocbvcrCBCtlTextDisabled 1170rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] = Color.FromArgb(194, 207, 229); // msocbvcrCBCtlBkgdMouseOver -> Needs to equal VSCOLOR_COMMANDBAR_HOVER in vscolors.cpp 1171rgbTable[KnownColors.msocbvcrCBCtlBdrMouseOver] = Color.FromArgb(51, 94, 168); // msocbvcrCBCtlBdrMouseOver -> Needs to equal VSCOLOR_COMMANDBAR_BORDER in vscolors.cpp 1172rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] = Color.FromArgb(000, 000, 000); // msocbvcrCBCtlTextMouseOver 1173rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseDown] = Color.FromArgb(153, 175, 212); // msocbvcrCBCtlBkgdMouseDown -> Needs to equal VSCOLOR_COMMANDBAR_HOVEROVERSELECTED in vscolors.cpp 1174rgbTable[KnownColors.msocbvcrCBCtlBdrMouseDown] = Color.FromArgb(51, 94, 168); // msocbvcrCBCtlBdrMouseDown 1175rgbTable[KnownColors.msocbvcrCBCtlTextMouseDown] = Color.FromArgb(255, 255, 255); // msocbvcrCBCtlTextMouseDown 1176rgbTable[KnownColors.msocbvcrCBCtlBkgdSelected] = Color.FromArgb(226, 229, 238); // msocbvcrCBCtlBkgdSelected -> Needs to equal VSCOLOR_COMMANDBAR_SELECTED in vscolors.cpp 1177rgbTable[KnownColors.msocbvcrCBCtlBdrSelected] = Color.FromArgb(51, 94, 168); // msocbvcrCBCtlBdrSelected 1178rgbTable[KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver] = Color.FromArgb(51, 94, 168); // msocbvcrCBCtlBkgdSelectedMouseOver -> Needs to equal VSCOLOR_COMMANDBAR_HOVEROVERSELECTEDICON in vscolors.cpp 1179rgbTable[KnownColors.msocbvcrCBCtlBdrSelectedMouseOver] = Color.FromArgb(51, 94, 168); // msocbvcrCBCtlBdrSelectedMouseOver -> Needs to equal VSCOLOR_COMMANDBAR_HOVEROVERSELECTEDICON_BORDER in vscolors.cpp 1180rgbTable[KnownColors.msocbvcrCBCtlBkgdLight] = Color.FromArgb(255, 255, 255); // msocbvcrCBCtlBkgdLight 1181rgbTable[KnownColors.msocbvcrCBCtlTextLight] = Color.FromArgb(167, 166, 170); // msocbvcrCBCtlTextLight 1182rgbTable[KnownColors.msocbvcrCBMainMenuBkgd] = Color.FromArgb(235, 233, 237); // msocbvcrCBMainMenuBkgd 1183rgbTable[KnownColors.msocbvcrCBMenuBkgd] = Color.FromArgb(252, 252, 252); // msocbvcrCBMenuBkgd 1184rgbTable[KnownColors.msocbvcrCBMenuCtlText] = Color.FromArgb(0, 0, 0); // msocbvcrCBMenuCtlText 1185rgbTable[KnownColors.msocbvcrCBMenuCtlTextDisabled] = Color.FromArgb(193, 193, 196); // msocbvcrCBMenuCtlTextDisabled 1186rgbTable[KnownColors.msocbvcrCBMenuBdrOuter] = Color.FromArgb(134, 133, 136); // msocbvcrCBMenuBdrOuter 1187rgbTable[KnownColors.msocbvcrCBMenuIconBkgd] = Color.FromArgb(238, 237, 240); // msocbvcrCBMenuIconBkgd 1188rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] = Color.FromArgb(228, 226, 230); // msocbvcrCBMenuIconBkgdDropped 1189rgbTable[KnownColors.msocbvcrCBMenuSplitArrow] = Color.FromArgb(167, 166, 170); // msocbvcrCBMenuSplitArrow 1190rgbTable[KnownColors.msocbvcrWPBkgd] = Color.FromArgb(245, 244, 246); // msocbvcrWPBkgd 1191rgbTable[KnownColors.msocbvcrWPText] = Color.FromArgb(255, 51, 153); // msocbvcrWPText 1192rgbTable[KnownColors.msocbvcrWPTitleBkgdActive] = Color.FromArgb(255, 51, 153); // msocbvcrWPTitleBkgdActive 1193rgbTable[KnownColors.msocbvcrWPTitleBkgdInactive] = Color.FromArgb(255, 51, 153); // msocbvcrWPTitleBkgdInactive 1194rgbTable[KnownColors.msocbvcrWPTitleTextActive] = Color.FromArgb(255, 51, 153); // msocbvcrWPTitleTextActive 1195rgbTable[KnownColors.msocbvcrWPTitleTextInactive] = Color.FromArgb(255, 51, 153); // msocbvcrWPTitleTextInactive 1196rgbTable[KnownColors.msocbvcrWPBdrOuterFloating] = Color.FromArgb(255, 51, 153); // msocbvcrWPBdrOuterFloating 1197rgbTable[KnownColors.msocbvcrWPBdrOuterDocked] = Color.FromArgb(255, 51, 153); // msocbvcrWPBdrOuterDocked 1198rgbTable[KnownColors.msocbvcrWPCtlBdr] = Color.FromArgb(255, 51, 153); // msocbvcrWPCtlBdr 1199rgbTable[KnownColors.msocbvcrWPCtlText] = Color.FromArgb(255, 51, 153); // msocbvcrWPCtlText 1200rgbTable[KnownColors.msocbvcrWPCtlBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrWPCtlBkgd 1201rgbTable[KnownColors.msocbvcrWPCtlBdrDisabled] = Color.FromArgb(255, 51, 153); // msocbvcrWPCtlBdrDisabled 1202rgbTable[KnownColors.msocbvcrWPCtlTextDisabled] = Color.FromArgb(255, 51, 153); // msocbvcrWPCtlTextDisabled 1203rgbTable[KnownColors.msocbvcrWPCtlBkgdDisabled] = Color.FromArgb(255, 51, 153); // msocbvcrWPCtlBkgdDisabled 1204rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] = Color.FromArgb(255, 51, 153); // msocbvcrWPCtlBdrDefault 1205rgbTable[KnownColors.msocbvcrWPGroupline] = Color.FromArgb(255, 51, 153); // msocbvcrWPGroupline 1206rgbTable[KnownColors.msocbvcrSBBdr] = Color.FromArgb(255, 51, 153); // msocbvcrSBBdr 1207rgbTable[KnownColors.msocbvcrOBBkgdBdr] = Color.FromArgb(255, 51, 153); // msocbvcrOBBkgdBdr 1208rgbTable[KnownColors.msocbvcrOBBkgdBdrContrast] = Color.FromArgb(255, 51, 153); // msocbvcrOBBkgdBdrContrast 1209rgbTable[KnownColors.msocbvcrOABBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrOABBkgd 1210rgbTable[KnownColors.msocbvcrGDHeaderBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrGDHeaderBkgd 1211rgbTable[KnownColors.msocbvcrGDHeaderBdr] = Color.FromArgb(255, 51, 153); // msocbvcrGDHeaderBdr 1212rgbTable[KnownColors.msocbvcrGDHeaderCellBdr] = Color.FromArgb(255, 51, 153); // msocbvcrGDHeaderCellBdr 1213rgbTable[KnownColors.msocbvcrGDHeaderSeeThroughSelection] = Color.FromArgb(255, 51, 153); // msocbvcrGDHeaderSeeThroughSelection 1214rgbTable[KnownColors.msocbvcrGDHeaderCellBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrGDHeaderCellBkgd 1215rgbTable[KnownColors.msocbvcrGDHeaderCellBkgdSelected] = Color.FromArgb(255, 51, 153); // msocbvcrGDHeaderCellBkgdSelected 1216rgbTable[KnownColors.msocbvcrCBSplitterLineLight] = Color.FromArgb(255, 255, 255); // msocbvcrCBSplitterLineLight 1217rgbTable[KnownColors.msocbvcrCBShadow] = Color.FromArgb(238, 237, 240); // msocbvcrCBShadow -> Needs to equal VSCOLOR_COMMANDBAR_SHADOW in vscolors.cpp 1218rgbTable[KnownColors.msocbvcrCBOptionsButtonShadow] = Color.FromArgb(245, 244, 246); // msocbvcrCBOptionsButtonShadow 1219rgbTable[KnownColors.msocbvcrWPNavBarBkgnd] = Color.FromArgb(193, 193, 196); // msocbvcrWPNavBarBkgnd 1220rgbTable[KnownColors.msocbvcrWPBdrInnerDocked] = Color.FromArgb(245, 244, 246); // msocbvcrWPBdrInnerDocked 1221rgbTable[KnownColors.msocbvcrCBLabelBkgnd] = Color.FromArgb(235, 233, 237); // msocbvcrCBLabelBkgnd 1222rgbTable[KnownColors.msocbvcrCBIconDisabledLight] = Color.FromArgb(235, 233, 237); // msocbvcrCBIconDisabledLight 1223rgbTable[KnownColors.msocbvcrCBIconDisabledDark] = Color.FromArgb(167, 166, 170); // msocbvcrCBIconDisabledDark 1224rgbTable[KnownColors.msocbvcrCBLowColorIconDisabled] = Color.FromArgb(176, 175, 179); // msocbvcrCBLowColorIconDisabled 1225rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzBegin] = Color.FromArgb(235, 233, 237); // msocbvcrCBGradMainMenuHorzBegin -> Needs to equal VSCOLOR_ENVIRONMENT_BACKGROUND and VSCOLOR_ENVIRONMENT_BACKGROUND_GRADIENTBEGIN in vscolors.cpp 1226rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzEnd] = Color.FromArgb(251, 250, 251); // msocbvcrCBGradMainMenuHorzEnd -> Needs to equal VSCOLOR_ENVIRONMENT_BACKGROUND_GRADIENTEND in vscolors.cpp 1227rgbTable[KnownColors.msocbvcrCBGradVertBegin] = Color.FromArgb(252, 252, 252); // msocbvcrCBGradVertBegin -> Needs to equal VSCOLOR_COMMANDBAR_GRADIENT_BEGIN in vscolors.cpp 1228rgbTable[KnownColors.msocbvcrCBGradVertMiddle] = Color.FromArgb(245, 244, 246); // msocbvcrCBGradVertMiddle -> Needs to equal VSCOLOR_COMMANDBAR_GRADIENT_MIDDLE in vscolors.cpp 1229rgbTable[KnownColors.msocbvcrCBGradVertEnd] = Color.FromArgb(235, 233, 237); // msocbvcrCBGradVertEnd -> Needs to equal VSCOLOR_COMMANDBAR_GRADIENT_END in vscolors.cpp 1230rgbTable[KnownColors.msocbvcrCBGradOptionsBegin] = Color.FromArgb(242, 242, 242); // msocbvcrCBGradOptionsBegin 1231rgbTable[KnownColors.msocbvcrCBGradOptionsMiddle] = Color.FromArgb(224, 224, 225); // msocbvcrCBGradOptionsMiddle 1232rgbTable[KnownColors.msocbvcrCBGradOptionsEnd] = Color.FromArgb(167, 166, 170); // msocbvcrCBGradOptionsEnd 1233rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdBegin] = Color.FromArgb(252, 252, 252); // msocbvcrCBGradMenuTitleBkgdBegin 1234rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdEnd] = Color.FromArgb(245, 244, 246); // msocbvcrCBGradMenuTitleBkgdEnd 1235rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin] = Color.FromArgb(247, 246, 248); // msocbvcrCBGradMenuIconBkgdDroppedBegin 1236rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle] = Color.FromArgb(241, 240, 242); // msocbvcrCBGradMenuIconBkgdDroppedMiddle 1237rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd] = Color.FromArgb(228, 226, 230); // msocbvcrCBGradMenuIconBkgdDroppedEnd 1238rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedBegin] = Color.FromArgb(226, 229, 238); // msocbvcrCBGradOptionsSelectedBegin 1239rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedMiddle] = Color.FromArgb(226, 229, 238); // msocbvcrCBGradOptionsSelectedMiddle 1240rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedEnd] = Color.FromArgb(226, 229, 238); // msocbvcrCBGradOptionsSelectedEnd 1241rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverBegin] = Color.FromArgb(194, 207, 229); // msocbvcrCBGradOptionsMouseOverBegin 1242rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverMiddle] = Color.FromArgb(194, 207, 229); // msocbvcrCBGradOptionsMouseOverMiddle 1243rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverEnd] = Color.FromArgb(194, 207, 229); // msocbvcrCBGradOptionsMouseOverEnd 1244rgbTable[KnownColors.msocbvcrCBGradSelectedBegin] = Color.FromArgb(226, 229, 238); // msocbvcrCBGradSelectedBegin 1245rgbTable[KnownColors.msocbvcrCBGradSelectedMiddle] = Color.FromArgb(226, 229, 238); // msocbvcrCBGradSelectedMiddle 1246rgbTable[KnownColors.msocbvcrCBGradSelectedEnd] = Color.FromArgb(226, 229, 238); // msocbvcrCBGradSelectedEnd 1247rgbTable[KnownColors.msocbvcrCBGradMouseOverBegin] = Color.FromArgb(194, 207, 229); // msocbvcrCBGradMouseOverBegin 1248rgbTable[KnownColors.msocbvcrCBGradMouseOverMiddle] = Color.FromArgb(194, 207, 229); // msocbvcrCBGradMouseOverMiddle 1249rgbTable[KnownColors.msocbvcrCBGradMouseOverEnd] = Color.FromArgb(194, 207, 229); // msocbvcrCBGradMouseOverEnd 1250rgbTable[KnownColors.msocbvcrCBGradMouseDownBegin] = Color.FromArgb(153, 175, 212); // msocbvcrCBGradMouseDownBegin 1251rgbTable[KnownColors.msocbvcrCBGradMouseDownMiddle] = Color.FromArgb(153, 175, 212); // msocbvcrCBGradMouseDownMiddle 1252rgbTable[KnownColors.msocbvcrCBGradMouseDownEnd] = Color.FromArgb(153, 175, 212); // msocbvcrCBGradMouseDownEnd 1253rgbTable[KnownColors.msocbvcrNetLookBkgnd] = Color.FromArgb(235, 233, 237); // msocbvcrNetLookBkgnd 1254rgbTable[KnownColors.msocbvcrCBMenuShadow] = Color.FromArgb(000, 000, 000); // msocbvcrCBMenuShadow 1255rgbTable[KnownColors.msocbvcrCBDockSeparatorLine] = Color.FromArgb(51, 94, 168); // msocbvcrCBDockSeparatorLine 1256rgbTable[KnownColors.msocbvcrCBDropDownArrow] = Color.FromArgb(235, 233, 237); // msocbvcrCBDropDownArrow 1257rgbTable[KnownColors.msocbvcrOLKGridlines] = Color.FromArgb(255, 51, 153); // msocbvcrOLKGridlines 1258rgbTable[KnownColors.msocbvcrOLKGroupText] = Color.FromArgb(255, 51, 153); // msocbvcrOLKGroupText 1259rgbTable[KnownColors.msocbvcrOLKGroupLine] = Color.FromArgb(255, 51, 153); // msocbvcrOLKGroupLine 1260rgbTable[KnownColors.msocbvcrOLKGroupShaded] = Color.FromArgb(255, 51, 153); // msocbvcrOLKGroupShaded 1261rgbTable[KnownColors.msocbvcrOLKGroupNested] = Color.FromArgb(255, 51, 153); // msocbvcrOLKGroupNested 1262rgbTable[KnownColors.msocbvcrOLKIconBar] = Color.FromArgb(255, 51, 153); // msocbvcrOLKIconBar 1263rgbTable[KnownColors.msocbvcrOLKFlagNone] = Color.FromArgb(255, 51, 153); // msocbvcrOLKFlagNone 1264rgbTable[KnownColors.msocbvcrOLKFolderbarLight] = Color.FromArgb(255, 51, 153); // msocbvcrOLKFolderbarLight 1265rgbTable[KnownColors.msocbvcrOLKFolderbarDark] = Color.FromArgb(255, 51, 153); // msocbvcrOLKFolderbarDark 1266rgbTable[KnownColors.msocbvcrOLKFolderbarText] = Color.FromArgb(255, 51, 153); // msocbvcrOLKFolderbarText 1267rgbTable[KnownColors.msocbvcrOLKWBButtonLight] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBButtonLight 1268rgbTable[KnownColors.msocbvcrOLKWBButtonDark] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBButtonDark 1269rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonLight] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBSelectedButtonLight 1270rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonDark] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBSelectedButtonDark 1271rgbTable[KnownColors.msocbvcrOLKWBHoverButtonLight] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBHoverButtonLight 1272rgbTable[KnownColors.msocbvcrOLKWBHoverButtonDark] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBHoverButtonDark 1273rgbTable[KnownColors.msocbvcrOLKWBPressedButtonLight] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBPressedButtonLight 1274rgbTable[KnownColors.msocbvcrOLKWBPressedButtonDark] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBPressedButtonDark 1275rgbTable[KnownColors.msocbvcrOLKWBDarkOutline] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBDarkOutline 1276rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBSplitterLight 1277rgbTable[KnownColors.msocbvcrOLKWBSplitterDark] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBSplitterDark 1278rgbTable[KnownColors.msocbvcrOLKWBActionDividerLine] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBActionDividerLine 1279rgbTable[KnownColors.msocbvcrOLKWBLabelText] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBLabelText 1280rgbTable[KnownColors.msocbvcrOLKWBFoldersBackground] = Color.FromArgb(255, 51, 153); // msocbvcrOLKWBFoldersBackground 1281rgbTable[KnownColors.msocbvcrOLKTodayIndicatorLight] = Color.FromArgb(255, 51, 153); // msocbvcrOLKTodayIndicatorLight 1282rgbTable[KnownColors.msocbvcrOLKTodayIndicatorDark] = Color.FromArgb(255, 51, 153); // msocbvcrOLKTodayIndicatorDark 1283rgbTable[KnownColors.msocbvcrOLKInfoBarBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrOLKInfoBarBkgd 1284rgbTable[KnownColors.msocbvcrOLKInfoBarText] = Color.FromArgb(255, 51, 153); // msocbvcrOLKInfoBarText 1285rgbTable[KnownColors.msocbvcrOLKPreviewPaneLabelText] = Color.FromArgb(255, 51, 153); // msocbvcrOLKPreviewPaneLabelText 1286rgbTable[KnownColors.msocbvcrHyperlink] = Color.FromArgb(0, 61, 178); // msocbvcrHyperlink 1287rgbTable[KnownColors.msocbvcrHyperlinkFollowed] = Color.FromArgb(170, 0, 170); // msocbvcrHyperlinkFollowed 1288rgbTable[KnownColors.msocbvcrOGWorkspaceBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrOGWorkspaceBkgd 1289rgbTable[KnownColors.msocbvcrOGMDIParentWorkspaceBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrOGMDIParentWorkspaceBkgd 1290rgbTable[KnownColors.msocbvcrOGRulerBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrOGRulerBkgd 1291rgbTable[KnownColors.msocbvcrOGRulerActiveBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrOGRulerActiveBkgd 1292rgbTable[KnownColors.msocbvcrOGRulerInactiveBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrOGRulerInactiveBkgd 1293rgbTable[KnownColors.msocbvcrOGRulerText] = Color.FromArgb(255, 51, 153); // msocbvcrOGRulerText 1294rgbTable[KnownColors.msocbvcrOGRulerTabStopTicks] = Color.FromArgb(255, 51, 153); // msocbvcrOGRulerTabStopTicks 1295rgbTable[KnownColors.msocbvcrOGRulerBdr] = Color.FromArgb(255, 51, 153); // msocbvcrOGRulerBdr 1296rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdr] = Color.FromArgb(255, 51, 153); // msocbvcrOGRulerTabBoxBdr 1297rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdrHighlight] = Color.FromArgb(255, 51, 153); // msocbvcrOGRulerTabBoxBdrHighlight 1298rgbTable[KnownColors.msocbvcrXLFormulaBarBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrXLFormulaBarBkgd 1299rgbTable[KnownColors.msocbvcrCBDragHandleShadow] = Color.FromArgb(255, 255, 255); // msocbvcrCBDragHandleShadow -> Needs to equal VSCOLOR_COMMANDBAR_DRAGHANDLE_SHADOW in vscolors.cpp 1300rgbTable[KnownColors.msocbvcrOGTaskPaneGroupBoxHeaderBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrOGTaskPaneGroupBoxHeaderBkgd 1301rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd 1302rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd 1303rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabBdr] = Color.FromArgb(255, 51, 153); // msocbvcrPPOutlineThumbnailsPaneTabBdr 1304rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabText] = Color.FromArgb(255, 51, 153); // msocbvcrPPOutlineThumbnailsPaneTabText 1305rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelected] = Color.FromArgb(255, 51, 153); // msocbvcrPPSlideBdrActiveSelected 1306rgbTable[KnownColors.msocbvcrPPSlideBdrInactiveSelected] = Color.FromArgb(255, 51, 153); // msocbvcrPPSlideBdrInactiveSelected 1307rgbTable[KnownColors.msocbvcrPPSlideBdrMouseOver] = Color.FromArgb(255, 51, 153); // msocbvcrPPSlideBdrMouseOver 1308rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelectedMouseOver] = Color.FromArgb(255, 51, 153); // msocbvcrPPSlideBdrActiveSelectedMouseOver 1309rgbTable[KnownColors.msocbvcrDlgGroupBoxText] = Color.FromArgb(0, 0, 0); // msocbvcrDlgGroupBoxText 1310rgbTable[KnownColors.msocbvcrScrollbarBkgd] = Color.FromArgb(237, 235, 239); // msocbvcrScrollbarBkgd 1311rgbTable[KnownColors.msocbvcrListHeaderArrow] = Color.FromArgb(155, 154, 156); // msocbvcrListHeaderArrow 1312rgbTable[KnownColors.msocbvcrDisabledHighlightedText] = Color.FromArgb(188, 202, 226); // msocbvcrDisabledHighlightedText 1313rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] = Color.FromArgb(235, 233, 237); // msocbvcrFocuslessHighlightedBkgd 1314rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] = Color.FromArgb(000, 000, 000); // msocbvcrFocuslessHighlightedText 1315rgbTable[KnownColors.msocbvcrDisabledFocuslessHighlightedText] = Color.FromArgb(167, 166, 170); // msocbvcrDisabledFocuslessHighlightedText 1316rgbTable[KnownColors.msocbvcrWPCtlTextMouseDown] = Color.FromArgb(255, 51, 153); // msocbvcrWPCtlTextMouseDown 1317rgbTable[KnownColors.msocbvcrWPTextDisabled] = Color.FromArgb(255, 51, 153); // msocbvcrWPTextDisabled 1318rgbTable[KnownColors.msocbvcrWPInfoTipBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrWPInfoTipBkgd 1319rgbTable[KnownColors.msocbvcrWPInfoTipText] = Color.FromArgb(255, 51, 153); // msocbvcrWPInfoTipText 1320rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrDWActiveTabBkgd 1321rgbTable[KnownColors.msocbvcrDWActiveTabText] = Color.FromArgb(255, 51, 153); // msocbvcrDWActiveTabText 1322rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] = Color.FromArgb(255, 51, 153); // msocbvcrDWActiveTabTextDisabled 1323rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrDWInactiveTabBkgd 1324rgbTable[KnownColors.msocbvcrDWInactiveTabText] = Color.FromArgb(255, 51, 153); // msocbvcrDWInactiveTabText 1325rgbTable[KnownColors.msocbvcrDWTabBkgdMouseOver] = Color.FromArgb(255, 51, 153); // msocbvcrDWTabBkgdMouseOver 1326rgbTable[KnownColors.msocbvcrDWTabTextMouseOver] = Color.FromArgb(255, 51, 153); // msocbvcrDWTabTextMouseOver 1327rgbTable[KnownColors.msocbvcrDWTabBkgdMouseDown] = Color.FromArgb(255, 51, 153); // msocbvcrDWTabBkgdMouseDown 1328rgbTable[KnownColors.msocbvcrDWTabTextMouseDown] = Color.FromArgb(255, 51, 153); // msocbvcrDWTabTextMouseDown 1329rgbTable[KnownColors.msocbvcrGSPLightBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrGSPLightBkgd 1330rgbTable[KnownColors.msocbvcrGSPDarkBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrGSPDarkBkgd 1331rgbTable[KnownColors.msocbvcrGSPGroupHeaderLightBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrGSPGroupHeaderLightBkgd 1332rgbTable[KnownColors.msocbvcrGSPGroupHeaderDarkBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrGSPGroupHeaderDarkBkgd 1333rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] = Color.FromArgb(255, 51, 153); // msocbvcrGSPGroupHeaderText 1334rgbTable[KnownColors.msocbvcrGSPGroupContentLightBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrGSPGroupContentLightBkgd 1335rgbTable[KnownColors.msocbvcrGSPGroupContentDarkBkgd] = Color.FromArgb(255, 51, 153); // msocbvcrGSPGroupContentDarkBkgd 1336rgbTable[KnownColors.msocbvcrGSPGroupContentText] = Color.FromArgb(255, 51, 153); // msocbvcrGSPGroupContentText 1337rgbTable[KnownColors.msocbvcrGSPGroupContentTextDisabled] = Color.FromArgb(255, 51, 153); // msocbvcrGSPGroupContentTextDisabled 1338rgbTable[KnownColors.msocbvcrGSPGroupline] = Color.FromArgb(255, 51, 153); // msocbvcrGSPGroupline 1339rgbTable[KnownColors.msocbvcrGSPHyperlink] = Color.FromArgb(255, 51, 153); // msocbvcrGSPHyperlink 1340rgbTable[KnownColors.msocbvcrDocTabBkgd] = Color.FromArgb(212, 212, 226); // msocbvcrDocTabBkgd 1341rgbTable[KnownColors.msocbvcrDocTabText] = Color.FromArgb(000, 000, 000); // msocbvcrDocTabText 1342rgbTable[KnownColors.msocbvcrDocTabBdr] = Color.FromArgb(118, 116, 146); // msocbvcrDocTabBdr 1343rgbTable[KnownColors.msocbvcrDocTabBdrLight] = Color.FromArgb(255, 255, 255); // msocbvcrDocTabBdrLight 1344rgbTable[KnownColors.msocbvcrDocTabBdrDark] = Color.FromArgb(186, 185, 206); // msocbvcrDocTabBdrDark 1345rgbTable[KnownColors.msocbvcrDocTabBkgdSelected] = Color.FromArgb(255, 255, 255); // msocbvcrDocTabBkgdSelected 1346rgbTable[KnownColors.msocbvcrDocTabTextSelected] = Color.FromArgb(000, 000, 000); // msocbvcrDocTabTextSelected 1347rgbTable[KnownColors.msocbvcrDocTabBdrSelected] = Color.FromArgb(124, 124, 148); // msocbvcrDocTabBdrSelected 1348rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] = Color.FromArgb(193, 210, 238); // msocbvcrDocTabBkgdMouseOver 1349rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(49, 106, 197); // msocbvcrDocTabTextMouseOver 1350rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(49, 106, 197); // msocbvcrDocTabBdrMouseOver 1351rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(49, 106, 197); // msocbvcrDocTabBdrLightMouseOver 1352rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(49, 106, 197); // msocbvcrDocTabBdrDarkMouseOver 1353rgbTable[KnownColors.msocbvcrDocTabBkgdMouseDown] = Color.FromArgb(154, 183, 228); // msocbvcrDocTabBkgdMouseDown 1354rgbTable[KnownColors.msocbvcrDocTabTextMouseDown] = Color.FromArgb(000, 000, 000); // msocbvcrDocTabTextMouseDown 1355rgbTable[KnownColors.msocbvcrDocTabBdrMouseDown] = Color.FromArgb(75, 75, 111); // msocbvcrDocTabBdrMouseDown 1356rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseDown] = Color.FromArgb(75, 75, 111); // msocbvcrDocTabBdrLightMouseDown 1357rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseDown] = Color.FromArgb(75, 75, 111); // msocbvcrDocTabBdrDarkMouseDown 1358rgbTable[KnownColors.msocbvcrToastGradBegin] = Color.FromArgb(246, 244, 236); // msocbvcrToastGradBegin 1359rgbTable[KnownColors.msocbvcrToastGradEnd] = Color.FromArgb(179, 178, 204); // msocbvcrToastGradEnd 1360rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] = Color.FromArgb(236, 233, 216); // msocbvcrJotNavUIGradBegin 1361rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] = Color.FromArgb(236, 233, 216); // msocbvcrJotNavUIGradMiddle 1362rgbTable[KnownColors.msocbvcrJotNavUIGradEnd] = Color.FromArgb(255, 255, 255); // msocbvcrJotNavUIGradEnd 1363rgbTable[KnownColors.msocbvcrJotNavUIText] = Color.FromArgb(000, 000, 000); // msocbvcrJotNavUIText 1364rgbTable[KnownColors.msocbvcrJotNavUIBdr] = Color.FromArgb(172, 168, 153); // msocbvcrJotNavUIBdr 1365rgbTable[KnownColors.msocbvcrPlacesBarBkgd] = Color.FromArgb(224, 223, 227); // msocbvcrPlacesBarBkgd 1366rgbTable[KnownColors.msocbvcrPubPrintDocScratchPageBkgd] = Color.FromArgb(152, 181, 226); // msocbvcrPubPrintDocScratchPageBkgd 1367rgbTable[KnownColors.msocbvcrPubWebDocScratchPageBkgd] = Color.FromArgb(193, 210, 238); // msocbvcrPubWebDocScratchPageBkgd 1370private void InitThemedColors(ref Dictionary<KnownColors, Color> rgbTable) 1438private static void InitBlueLunaColors(ref Dictionary<KnownColors, Color> rgbTable) 1440rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] = Color.FromArgb(196, 205, 218); 1441rgbTable[KnownColors.msocbvcrCBBdrOuterDocked] = Color.FromArgb(196, 205, 218); 1442rgbTable[KnownColors.msocbvcrCBBdrOuterFloating] = Color.FromArgb(42, 102, 201); 1443rgbTable[KnownColors.msocbvcrCBBkgd] = Color.FromArgb(196, 219, 249); 1444rgbTable[KnownColors.msocbvcrCBCtlBdrMouseDown] = Color.FromArgb(0, 0, 128); 1445rgbTable[KnownColors.msocbvcrCBCtlBdrMouseOver] = Color.FromArgb(0, 0, 128); 1446rgbTable[KnownColors.msocbvcrCBCtlBdrSelected] = Color.FromArgb(0, 0, 128); 1447rgbTable[KnownColors.msocbvcrCBCtlBdrSelectedMouseOver] = Color.FromArgb(0, 0, 128); 1448rgbTable[KnownColors.msocbvcrCBCtlBkgd] = Color.FromArgb(196, 219, 249); 1449rgbTable[KnownColors.msocbvcrCBCtlBkgdLight] = Color.FromArgb(255, 255, 255); 1450rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseDown] = Color.FromArgb(254, 128, 62); 1451rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] = Color.FromArgb(255, 238, 194); 1452rgbTable[KnownColors.msocbvcrCBCtlBkgdMouseOver] = Color.FromArgb(255, 238, 194); 1453rgbTable[KnownColors.msocbvcrCBCtlBkgdSelected] = Color.FromArgb(255, 192, 111); 1454rgbTable[KnownColors.msocbvcrCBCtlBkgdSelectedMouseOver] = Color.FromArgb(254, 128, 62); 1455rgbTable[KnownColors.msocbvcrCBCtlText] = Color.FromArgb(0, 0, 0); 1456rgbTable[KnownColors.msocbvcrCBCtlTextDisabled] = Color.FromArgb(141, 141, 141); 1457rgbTable[KnownColors.msocbvcrCBCtlTextLight] = Color.FromArgb(128, 128, 128); 1458rgbTable[KnownColors.msocbvcrCBCtlTextMouseDown] = Color.FromArgb(0, 0, 0); 1459rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] = Color.FromArgb(0, 0, 0); 1460rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] = Color.FromArgb(0, 0, 0); 1461rgbTable[KnownColors.msocbvcrCBCtlTextMouseOver] = Color.FromArgb(0, 0, 0); 1462rgbTable[KnownColors.msocbvcrCBDockSeparatorLine] = Color.FromArgb(0, 53, 145); 1463rgbTable[KnownColors.msocbvcrCBDragHandle] = Color.FromArgb(39, 65, 118); 1464rgbTable[KnownColors.msocbvcrCBDragHandleShadow] = Color.FromArgb(255, 255, 255); 1465rgbTable[KnownColors.msocbvcrCBDropDownArrow] = Color.FromArgb(236, 233, 216); 1466rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzBegin] = Color.FromArgb(158, 190, 245); 1467rgbTable[KnownColors.msocbvcrCBGradMainMenuHorzEnd] = Color.FromArgb(196, 218, 250); 1468rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedBegin] = Color.FromArgb(203, 221, 246); 1469rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedEnd] = Color.FromArgb(114, 155, 215); 1470rgbTable[KnownColors.msocbvcrCBGradMenuIconBkgdDroppedMiddle] = Color.FromArgb(161, 197, 249); 1471rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdBegin] = Color.FromArgb(227, 239, 255); 1472rgbTable[KnownColors.msocbvcrCBGradMenuTitleBkgdEnd] = Color.FromArgb(123, 164, 224); 1473rgbTable[KnownColors.msocbvcrCBGradMouseDownBegin] = Color.FromArgb(254, 128, 62); 1474rgbTable[KnownColors.msocbvcrCBGradMouseDownEnd] = Color.FromArgb(255, 223, 154); 1475rgbTable[KnownColors.msocbvcrCBGradMouseDownMiddle] = Color.FromArgb(255, 177, 109); 1476rgbTable[KnownColors.msocbvcrCBGradMouseOverBegin] = Color.FromArgb(255, 255, 222); 1477rgbTable[KnownColors.msocbvcrCBGradMouseOverEnd] = Color.FromArgb(255, 203, 136); 1478rgbTable[KnownColors.msocbvcrCBGradMouseOverMiddle] = Color.FromArgb(255, 225, 172); 1479rgbTable[KnownColors.msocbvcrCBGradOptionsBegin] = Color.FromArgb(127, 177, 250); 1480rgbTable[KnownColors.msocbvcrCBGradOptionsEnd] = Color.FromArgb(0, 53, 145); 1481rgbTable[KnownColors.msocbvcrCBGradOptionsMiddle] = Color.FromArgb(82, 127, 208); 1482rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverBegin] = Color.FromArgb(255, 255, 222); 1483rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverEnd] = Color.FromArgb(255, 193, 118); 1484rgbTable[KnownColors.msocbvcrCBGradOptionsMouseOverMiddle] = Color.FromArgb(255, 225, 172); 1485rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedBegin] = Color.FromArgb(254, 140, 73); 1486rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedEnd] = Color.FromArgb(255, 221, 152); 1487rgbTable[KnownColors.msocbvcrCBGradOptionsSelectedMiddle] = Color.FromArgb(255, 184, 116); 1488rgbTable[KnownColors.msocbvcrCBGradSelectedBegin] = Color.FromArgb(255, 223, 154); 1489rgbTable[KnownColors.msocbvcrCBGradSelectedEnd] = Color.FromArgb(255, 166, 76); 1490rgbTable[KnownColors.msocbvcrCBGradSelectedMiddle] = Color.FromArgb(255, 195, 116); 1491rgbTable[KnownColors.msocbvcrCBGradVertBegin] = Color.FromArgb(227, 239, 255); 1492rgbTable[KnownColors.msocbvcrCBGradVertEnd] = Color.FromArgb(123, 164, 224); 1493rgbTable[KnownColors.msocbvcrCBGradVertMiddle] = Color.FromArgb(203, 225, 252); 1494rgbTable[KnownColors.msocbvcrCBIconDisabledDark] = Color.FromArgb(97, 122, 172); 1495rgbTable[KnownColors.msocbvcrCBIconDisabledLight] = Color.FromArgb(233, 236, 242); 1496rgbTable[KnownColors.msocbvcrCBLabelBkgnd] = Color.FromArgb(186, 211, 245); 1497rgbTable[KnownColors.msocbvcrCBLabelBkgnd] = Color.FromArgb(186, 211, 245); 1498rgbTable[KnownColors.msocbvcrCBLowColorIconDisabled] = Color.FromArgb(109, 150, 208); 1499rgbTable[KnownColors.msocbvcrCBMainMenuBkgd] = Color.FromArgb(153, 204, 255); 1500rgbTable[KnownColors.msocbvcrCBMenuBdrOuter] = Color.FromArgb(0, 45, 150); 1501rgbTable[KnownColors.msocbvcrCBMenuBkgd] = Color.FromArgb(246, 246, 246); 1502rgbTable[KnownColors.msocbvcrCBMenuCtlText] = Color.FromArgb(0, 0, 0); 1503rgbTable[KnownColors.msocbvcrCBMenuCtlTextDisabled] = Color.FromArgb(141, 141, 141); 1504rgbTable[KnownColors.msocbvcrCBMenuIconBkgd] = Color.FromArgb(203, 225, 252); 1505rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] = Color.FromArgb(172, 183, 201); 1506rgbTable[KnownColors.msocbvcrCBMenuIconBkgdDropped] = Color.FromArgb(172, 183, 201); 1507rgbTable[KnownColors.msocbvcrCBMenuShadow] = Color.FromArgb(95, 130, 234); 1508rgbTable[KnownColors.msocbvcrCBMenuSplitArrow] = Color.FromArgb(128, 128, 128); 1509rgbTable[KnownColors.msocbvcrCBOptionsButtonShadow] = Color.FromArgb(255, 255, 255); 1510rgbTable[KnownColors.msocbvcrCBShadow] = Color.FromArgb(59, 97, 156); 1511rgbTable[KnownColors.msocbvcrCBSplitterLine] = Color.FromArgb(106, 140, 203); 1512rgbTable[KnownColors.msocbvcrCBSplitterLineLight] = Color.FromArgb(241, 249, 255); 1513rgbTable[KnownColors.msocbvcrCBTearOffHandle] = Color.FromArgb(169, 199, 240); 1514rgbTable[KnownColors.msocbvcrCBTearOffHandleMouseOver] = Color.FromArgb(255, 238, 194); 1515rgbTable[KnownColors.msocbvcrCBTitleBkgd] = Color.FromArgb(42, 102, 201); 1516rgbTable[KnownColors.msocbvcrCBTitleText] = Color.FromArgb(255, 255, 255); 1517rgbTable[KnownColors.msocbvcrDisabledFocuslessHighlightedText] = Color.FromArgb(172, 168, 153); 1518rgbTable[KnownColors.msocbvcrDisabledHighlightedText] = Color.FromArgb(187, 206, 236); 1519rgbTable[KnownColors.msocbvcrDlgGroupBoxText] = Color.FromArgb(0, 70, 213); 1520rgbTable[KnownColors.msocbvcrDocTabBdr] = Color.FromArgb(0, 53, 154); 1521rgbTable[KnownColors.msocbvcrDocTabBdrDark] = Color.FromArgb(117, 166, 241); 1522rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseDown] = Color.FromArgb(0, 0, 128); 1523rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(0, 0, 128); 1524rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(0, 0, 128); 1525rgbTable[KnownColors.msocbvcrDocTabBdrDarkMouseOver] = Color.FromArgb(0, 0, 128); 1526rgbTable[KnownColors.msocbvcrDocTabBdrLight] = Color.FromArgb(255, 255, 255); 1527rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseDown] = Color.FromArgb(0, 0, 128); 1528rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(0, 0, 128); 1529rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(0, 0, 128); 1530rgbTable[KnownColors.msocbvcrDocTabBdrLightMouseOver] = Color.FromArgb(0, 0, 128); 1531rgbTable[KnownColors.msocbvcrDocTabBdrMouseDown] = Color.FromArgb(0, 0, 128); 1532rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(0, 0, 128); 1533rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(0, 0, 128); 1534rgbTable[KnownColors.msocbvcrDocTabBdrMouseOver] = Color.FromArgb(0, 0, 128); 1535rgbTable[KnownColors.msocbvcrDocTabBdrSelected] = Color.FromArgb(59, 97, 156); 1536rgbTable[KnownColors.msocbvcrDocTabBkgd] = Color.FromArgb(186, 211, 245); 1537rgbTable[KnownColors.msocbvcrDocTabBkgdMouseDown] = Color.FromArgb(254, 128, 62); 1538rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 1539rgbTable[KnownColors.msocbvcrDocTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 1540rgbTable[KnownColors.msocbvcrDocTabBkgdSelected] = Color.FromArgb(255, 255, 255); 1541rgbTable[KnownColors.msocbvcrDocTabText] = Color.FromArgb(0, 0, 0); 1542rgbTable[KnownColors.msocbvcrDocTabTextMouseDown] = Color.FromArgb(0, 0, 0); 1543rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 1544rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 1545rgbTable[KnownColors.msocbvcrDocTabTextMouseOver] = Color.FromArgb(0, 0, 0); 1546rgbTable[KnownColors.msocbvcrDocTabTextSelected] = Color.FromArgb(0, 0, 0); 1547rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] = Color.FromArgb(186, 211, 245); 1548rgbTable[KnownColors.msocbvcrDWActiveTabBkgd] = Color.FromArgb(186, 211, 245); 1549rgbTable[KnownColors.msocbvcrDWActiveTabText] = Color.FromArgb(0, 0, 0); 1550rgbTable[KnownColors.msocbvcrDWActiveTabText] = Color.FromArgb(0, 0, 0); 1551rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] = Color.FromArgb(94, 94, 94); 1552rgbTable[KnownColors.msocbvcrDWActiveTabTextDisabled] = Color.FromArgb(94, 94, 94); 1553rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] = Color.FromArgb(129, 169, 226); 1554rgbTable[KnownColors.msocbvcrDWInactiveTabBkgd] = Color.FromArgb(129, 169, 226); 1555rgbTable[KnownColors.msocbvcrDWInactiveTabText] = Color.FromArgb(255, 255, 255); 1556rgbTable[KnownColors.msocbvcrDWInactiveTabText] = Color.FromArgb(255, 255, 255); 1557rgbTable[KnownColors.msocbvcrDWTabBkgdMouseDown] = Color.FromArgb(254, 128, 62); 1558rgbTable[KnownColors.msocbvcrDWTabBkgdMouseOver] = Color.FromArgb(255, 238, 194); 1559rgbTable[KnownColors.msocbvcrDWTabTextMouseDown] = Color.FromArgb(0, 0, 0); 1560rgbTable[KnownColors.msocbvcrDWTabTextMouseOver] = Color.FromArgb(0, 0, 0); 1561rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] = Color.FromArgb(236, 233, 216); 1562rgbTable[KnownColors.msocbvcrFocuslessHighlightedBkgd] = Color.FromArgb(236, 233, 216); 1563rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] = Color.FromArgb(0, 0, 0); 1564rgbTable[KnownColors.msocbvcrFocuslessHighlightedText] = Color.FromArgb(0, 0, 0); 1565rgbTable[KnownColors.msocbvcrGDHeaderBdr] = Color.FromArgb(89, 89, 172); 1566rgbTable[KnownColors.msocbvcrGDHeaderBkgd] = Color.FromArgb(239, 235, 222); 1567rgbTable[KnownColors.msocbvcrGDHeaderCellBdr] = Color.FromArgb(126, 125, 104); 1568rgbTable[KnownColors.msocbvcrGDHeaderCellBkgd] = Color.FromArgb(239, 235, 222); 1569rgbTable[KnownColors.msocbvcrGDHeaderCellBkgdSelected] = Color.FromArgb(255, 192, 111); 1570rgbTable[KnownColors.msocbvcrGDHeaderSeeThroughSelection] = Color.FromArgb(191, 191, 223); 1571rgbTable[KnownColors.msocbvcrGSPDarkBkgd] = Color.FromArgb(74, 122, 201); 1572rgbTable[KnownColors.msocbvcrGSPDarkBkgd] = Color.FromArgb(74, 122, 201); 1573rgbTable[KnownColors.msocbvcrGSPGroupContentDarkBkgd] = Color.FromArgb(185, 208, 241); 1574rgbTable[KnownColors.msocbvcrGSPGroupContentLightBkgd] = Color.FromArgb(221, 236, 254); 1575rgbTable[KnownColors.msocbvcrGSPGroupContentText] = Color.FromArgb(0, 0, 0); 1576rgbTable[KnownColors.msocbvcrGSPGroupContentTextDisabled] = Color.FromArgb(150, 145, 133); 1577rgbTable[KnownColors.msocbvcrGSPGroupHeaderDarkBkgd] = Color.FromArgb(101, 143, 224); 1578rgbTable[KnownColors.msocbvcrGSPGroupHeaderLightBkgd] = Color.FromArgb(196, 219, 249); 1579rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] = Color.FromArgb(0, 45, 134); 1580rgbTable[KnownColors.msocbvcrGSPGroupHeaderText] = Color.FromArgb(0, 45, 134); 1581rgbTable[KnownColors.msocbvcrGSPGroupline] = Color.FromArgb(255, 255, 255); 1582rgbTable[KnownColors.msocbvcrGSPGroupline] = Color.FromArgb(255, 255, 255); 1583rgbTable[KnownColors.msocbvcrGSPHyperlink] = Color.FromArgb(0, 61, 178); 1584rgbTable[KnownColors.msocbvcrGSPLightBkgd] = Color.FromArgb(221, 236, 254); 1585rgbTable[KnownColors.msocbvcrHyperlink] = Color.FromArgb(0, 61, 178); 1586rgbTable[KnownColors.msocbvcrHyperlinkFollowed] = Color.FromArgb(170, 0, 170); 1587rgbTable[KnownColors.msocbvcrJotNavUIBdr] = Color.FromArgb(59, 97, 156); 1588rgbTable[KnownColors.msocbvcrJotNavUIBdr] = Color.FromArgb(59, 97, 156); 1589rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] = Color.FromArgb(158, 190, 245); 1590rgbTable[KnownColors.msocbvcrJotNavUIGradBegin] = Color.FromArgb(158, 190, 245); 1591rgbTable[KnownColors.msocbvcrJotNavUIGradEnd] = Color.FromArgb(255, 255, 255); 1592rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] = Color.FromArgb(196, 218, 250); 1593rgbTable[KnownColors.msocbvcrJotNavUIGradMiddle] = Color.FromArgb(196, 218, 250); 1594rgbTable[KnownColors.msocbvcrJotNavUIText] = Color.FromArgb(0, 0, 0); 1595rgbTable[KnownColors.msocbvcrListHeaderArrow] = Color.FromArgb(172, 168, 153); 1596rgbTable[KnownColors.msocbvcrNetLookBkgnd] = Color.FromArgb(227, 239, 255); 1597rgbTable[KnownColors.msocbvcrOABBkgd] = Color.FromArgb(128, 128, 128); 1598rgbTable[KnownColors.msocbvcrOBBkgdBdr] = Color.FromArgb(128, 128, 128); 1599rgbTable[KnownColors.msocbvcrOBBkgdBdrContrast] = Color.FromArgb(255, 255, 255); 1600rgbTable[KnownColors.msocbvcrOGMDIParentWorkspaceBkgd] = Color.FromArgb(144, 153, 174); 1601rgbTable[KnownColors.msocbvcrOGRulerActiveBkgd] = Color.FromArgb(255, 255, 255); 1602rgbTable[KnownColors.msocbvcrOGRulerBdr] = Color.FromArgb(0, 0, 0); 1603rgbTable[KnownColors.msocbvcrOGRulerBkgd] = Color.FromArgb(216, 231, 252); 1604rgbTable[KnownColors.msocbvcrOGRulerInactiveBkgd] = Color.FromArgb(158, 190, 245); 1605rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdr] = Color.FromArgb(75, 120, 202); 1606rgbTable[KnownColors.msocbvcrOGRulerTabBoxBdrHighlight] = Color.FromArgb(255, 255, 255); 1607rgbTable[KnownColors.msocbvcrOGRulerTabStopTicks] = Color.FromArgb(128, 128, 128); 1608rgbTable[KnownColors.msocbvcrOGRulerText] = Color.FromArgb(0, 0, 0); 1609rgbTable[KnownColors.msocbvcrOGTaskPaneGroupBoxHeaderBkgd] = Color.FromArgb(186, 211, 245); 1610rgbTable[KnownColors.msocbvcrOGWorkspaceBkgd] = Color.FromArgb(144, 153, 174); 1611rgbTable[KnownColors.msocbvcrOLKFlagNone] = Color.FromArgb(242, 240, 228); 1612rgbTable[KnownColors.msocbvcrOLKFolderbarDark] = Color.FromArgb(0, 53, 145); 1613rgbTable[KnownColors.msocbvcrOLKFolderbarLight] = Color.FromArgb(89, 135, 214); 1614rgbTable[KnownColors.msocbvcrOLKFolderbarText] = Color.FromArgb(255, 255, 255); 1615rgbTable[KnownColors.msocbvcrOLKGridlines] = Color.FromArgb(234, 233, 225); 1616rgbTable[KnownColors.msocbvcrOLKGroupLine] = Color.FromArgb(123, 164, 224); 1617rgbTable[KnownColors.msocbvcrOLKGroupNested] = Color.FromArgb(253, 238, 201); 1618rgbTable[KnownColors.msocbvcrOLKGroupShaded] = Color.FromArgb(190, 218, 251); 1619rgbTable[KnownColors.msocbvcrOLKGroupText] = Color.FromArgb(55, 104, 185); 1620rgbTable[KnownColors.msocbvcrOLKIconBar] = Color.FromArgb(253, 247, 233); 1621rgbTable[KnownColors.msocbvcrOLKInfoBarBkgd] = Color.FromArgb(144, 153, 174); 1622rgbTable[KnownColors.msocbvcrOLKInfoBarText] = Color.FromArgb(255, 255, 255); 1623rgbTable[KnownColors.msocbvcrOLKPreviewPaneLabelText] = Color.FromArgb(144, 153, 174); 1624rgbTable[KnownColors.msocbvcrOLKTodayIndicatorDark] = Color.FromArgb(187, 85, 3); 1625rgbTable[KnownColors.msocbvcrOLKTodayIndicatorLight] = Color.FromArgb(251, 200, 79); 1626rgbTable[KnownColors.msocbvcrOLKWBActionDividerLine] = Color.FromArgb(215, 228, 251); 1627rgbTable[KnownColors.msocbvcrOLKWBButtonDark] = Color.FromArgb(123, 164, 224); 1628rgbTable[KnownColors.msocbvcrOLKWBButtonLight] = Color.FromArgb(203, 225, 252); 1629rgbTable[KnownColors.msocbvcrOLKWBButtonLight] = Color.FromArgb(203, 225, 252); 1630rgbTable[KnownColors.msocbvcrOLKWBDarkOutline] = Color.FromArgb(0, 45, 150); 1631rgbTable[KnownColors.msocbvcrOLKWBFoldersBackground] = Color.FromArgb(255, 255, 255); 1632rgbTable[KnownColors.msocbvcrOLKWBHoverButtonDark] = Color.FromArgb(247, 190, 87); 1633rgbTable[KnownColors.msocbvcrOLKWBHoverButtonLight] = Color.FromArgb(255, 255, 220); 1634rgbTable[KnownColors.msocbvcrOLKWBLabelText] = Color.FromArgb(50, 69, 105); 1635rgbTable[KnownColors.msocbvcrOLKWBPressedButtonDark] = Color.FromArgb(248, 222, 128); 1636rgbTable[KnownColors.msocbvcrOLKWBPressedButtonLight] = Color.FromArgb(232, 127, 8); 1637rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonDark] = Color.FromArgb(238, 147, 17); 1638rgbTable[KnownColors.msocbvcrOLKWBSelectedButtonLight] = Color.FromArgb(251, 230, 148); 1639rgbTable[KnownColors.msocbvcrOLKWBSplitterDark] = Color.FromArgb(0, 53, 145); 1640rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] = Color.FromArgb(89, 135, 214); 1641rgbTable[KnownColors.msocbvcrOLKWBSplitterLight] = Color.FromArgb(89, 135, 214); 1642rgbTable[KnownColors.msocbvcrPlacesBarBkgd] = Color.FromArgb(236, 233, 216); 1643rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabAreaBkgd] = Color.FromArgb(195, 218, 249); 1644rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabBdr] = Color.FromArgb(59, 97, 156); 1645rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabInactiveBkgd] = Color.FromArgb(158, 190, 245); 1646rgbTable[KnownColors.msocbvcrPPOutlineThumbnailsPaneTabText] = Color.FromArgb(0, 0, 0); 1647rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelected] = Color.FromArgb(61, 108, 192); 1648rgbTable[KnownColors.msocbvcrPPSlideBdrActiveSelectedMouseOver] = Color.FromArgb(61, 108, 192); 1649rgbTable[KnownColors.msocbvcrPPSlideBdrInactiveSelected] = Color.FromArgb(128, 128, 128); 1650rgbTable[KnownColors.msocbvcrPPSlideBdrMouseOver] = Color.FromArgb(61, 108, 192); 1651rgbTable[KnownColors.msocbvcrPubPrintDocScratchPageBkgd] = Color.FromArgb(144, 153, 174); 1652rgbTable[KnownColors.msocbvcrPubWebDocScratchPageBkgd] = Color.FromArgb(189, 194, 207); 1653rgbTable[KnownColors.msocbvcrSBBdr] = Color.FromArgb(211, 211, 211); 1654rgbTable[KnownColors.msocbvcrScrollbarBkgd] = Color.FromArgb(251, 251, 248); 1655rgbTable[KnownColors.msocbvcrToastGradBegin] = Color.FromArgb(220, 236, 254); 1656rgbTable[KnownColors.msocbvcrToastGradEnd] = Color.FromArgb(167, 197, 238); 1657rgbTable[KnownColors.msocbvcrWPBdrInnerDocked] = Color.FromArgb(185, 212, 249); 1658rgbTable[KnownColors.msocbvcrWPBdrOuterDocked] = Color.FromArgb(196, 218, 250); 1659rgbTable[KnownColors.msocbvcrWPBdrOuterFloating] = Color.FromArgb(42, 102, 201); 1660rgbTable[KnownColors.msocbvcrWPBkgd] = Color.FromArgb(221, 236, 254); 1661rgbTable[KnownColors.msocbvcrWPCtlBdr] = Color.FromArgb(127, 157, 185); 1662rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] = Color.FromArgb(0, 0, 0); 1663rgbTable[KnownColors.msocbvcrWPCtlBdrDefault] = Color.FromArgb(0, 0, 0); 1664rgbTable[KnownColors.msocbvcrWPCtlBdrDisabled] = Color.FromArgb(128, 128, 128); 1665rgbTable[KnownColors.msocbvcrWPCtlBkgd] = Color.FromArgb(169, 199, 240); 1666rgbTable[KnownColors.msocbvcrWPCtlBkgdDisabled] = Color.FromArgb(222, 222, 222); 1667rgbTable[KnownColors.msocbvcrWPCtlText] = Color.FromArgb(0, 0, 0); 1668rgbTable[KnownColors.msocbvcrWPCtlTextDisabled] = Color.FromArgb(172, 168, 153); 1669rgbTable[KnownColors.msocbvcrWPCtlTextMouseDown] = Color.FromArgb(0, 0, 0); 1670rgbTable[KnownColors.msocbvcrWPGroupline] = Color.FromArgb(123, 164, 224); 1671rgbTable[KnownColors.msocbvcrWPInfoTipBkgd] = Color.FromArgb(255, 255, 204); 1672rgbTable[KnownColors.msocbvcrWPInfoTipText] = Color.FromArgb(0, 0, 0); 1673rgbTable[KnownColors.msocbvcrWPNavBarBkgnd] = Color.FromArgb(74, 122, 201); 1674rgbTable[KnownColors.msocbvcrWPText] = Color.FromArgb(0, 0, 0); 1675rgbTable[KnownColors.msocbvcrWPText] = Color.FromArgb(0, 0, 0); 1676rgbTable[KnownColors.msocbvcrWPTextDisabled] = Color.FromArgb(172, 168, 153); 1677rgbTable[KnownColors.msocbvcrWPTitleBkgdActive] = Color.FromArgb(123, 164, 224); 1678rgbTable[KnownColors.msocbvcrWPTitleBkgdInactive] = Color.FromArgb(148, 187, 239); 1679rgbTable[KnownColors.msocbvcrWPTitleTextActive] = Color.FromArgb(0, 0, 0); 1680rgbTable[KnownColors.msocbvcrWPTitleTextInactive] = Color.FromArgb(0, 0, 0); 1681rgbTable[KnownColors.msocbvcrXLFormulaBarBkgd] = Color.FromArgb(158, 190, 245);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
615BackColor = Color.Transparent;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
366public new Color BackColor 759public new Color ForeColor
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (5)
10private Color _arrowColor = Color.Empty; 17Color arrowColor, 29public Color ArrowColor 39internal Color DefaultArrowColor { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (2)
41protected override Color GetOuterBorderColor(ComboBox comboBox) 51protected override Color GetPopupOuterBorderColor(ComboBox comboBox, bool focused)
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (2)
87public new Color BackColor 241public new Color ForeColor
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanel.cs (3)
92public override Color BackColor 101if (ParentInternal is ToolStripContainer && value == Color.Transparent) 103ParentInternal.BackColor = Color.Transparent;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (3)
56public override Color BackColor 213public override Color ForeColor 250public new Color ImageTransparentColor
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
200Color arrowColor;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (11)
154Color arrowColor = item.Selected && !item.Pressed ? SystemColors.HighlightText : SystemColors.ControlText; 205Color arrowColor = !item.Enabled ? SystemColors.ControlDark 382return SystemColors.Control.ToArgb() == Color.Black.ToArgb(); 497Span<(Color OldColor, Color NewColor)> map = 499new(Color.Black, Color.White), 500new(Color.White, Color.Black), 501new(Color.FromArgb(0, 0, 128), Color.White)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (30)
43private Color _imageTransparentColor = Color.Empty; 505public virtual Color BackColor 509Color c = RawBackColor; 525Color previous = BackColor; 526Properties.AddOrRemoveValue(s_backColorProperty, value, defaultValue: Color.Empty); 859public virtual Color ForeColor 863Color foreColor = Properties.GetValueOrDefault<Color>(s_foreColorProperty); 879Color previous = ForeColor; 1052if (value is Bitmap bmp && ImageTransparentColor != Color.Empty) 1078public Color ImageTransparentColor 1089if (Image is Bitmap currentImage && value != Color.Empty) 1196Color color = Properties.GetValueOrDefault<Color>(s_foreColorProperty); 1617internal Color RawBackColor => Properties.GetValueOrDefault<Color>(s_backColorProperty, Color.Empty); 2889Color backColor = Properties.GetValueOrDefault<Color>(s_backColorProperty); 2937Color foreColor = Properties.GetValueOrDefault<Color>(s_foreColorProperty); 3286private bool ShouldSerializeImageTransparentColor() => ImageTransparentColor != Color.Empty; 3294Color backColor = Properties.GetValueOrDefault<Color>(s_backColorProperty); 3308Color foreColor = Properties.GetValueOrDefault<Color>(s_foreColorProperty); 3376public virtual void ResetBackColor() => BackColor = Color.Empty; 3385public virtual void ResetForeColor() => ForeColor = Color.Empty; 3400private void ResetImageTransparentColor() => ImageTransparentColor = Color.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (5)
13private Color _textColor = SystemColors.ControlText; 24Color textColor, 47Color textColor, 71public Color TextColor 81internal Color DefaultTextColor { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (13)
20private Color _linkColor = Color.Empty; 21private Color _activeLinkColor = Color.Empty; 22private Color _visitedLinkColor = Color.Empty; 91public Color ActiveLinkColor 114private static Color IELinkColor 122private static Color IEActiveLinkColor 130private static Color IEVisitedLinkColor 162public Color LinkColor 206public Color VisitedLinkColor 356Color textColor = ForeColor;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
955Color textColor = SystemColors.MenuText; 1010Color arrowColor = (Selected || Pressed) ? SystemColors.HighlightText : SystemColors.MenuText;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (15)
302Color.Silver.GetCachedSolidBrushScope() : ColorTable.ButtonSelectedBorder.GetCachedSolidBrushScope(); 566Color borderColor = ColorTable.MenuItemBorder; 622Color borderColor = ColorTable.MenuItemBorder; 701Color begin = (rightToLeft == RightToLeft.No) ? ColorTable.ImageMarginGradientBegin : ColorTable.ImageMarginGradientEnd; 702Color end = (rightToLeft == RightToLeft.No) ? ColorTable.ImageMarginGradientEnd : ColorTable.ImageMarginGradientBegin; 912Color overflowBottomLeftShadow, overflowTopShadow; 953private static void FillWithDoubleGradient(Color beginColor, Color middleColor, Color endColor, Graphics g, Rectangle bounds, int firstGradientWidth, int secondGradientWidth, LinearGradientMode mode, bool flipHorizontal) 1056Color fill = (e.Item.Selected) ? ColorTable.CheckSelectedBackground : ColorTable.CheckBackground; 1118private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor) 1124private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor, Orientation orientation) 1239Color overflowButtonGradientBegin, overflowButtonGradientMiddle, overflowButtonGradientEnd, overflowBottomLeftShadow, overflowTopShadow;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (3)
835Color backgroundColor = e.Item.Selected ? SystemColors.Highlight : e.Item.BackColor; 866Color textColor = e.TextColor; 1023return (control.RawBackColor == Color.Empty && control.BackgroundImage is null);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (6)
10private Color _backColor; 16: this(g, toolStrip, new Rectangle(Point.Empty, toolStrip.OrThrowIfNull().Size), Color.Empty) 27Color backColor) 53public Color BackColor 57if (_backColor != Color.Empty) 70if (_backColor != Color.Empty)
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
152public new Color ImageTransparentColor
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (7)
74private static void FillBackground(Graphics g, Rectangle bounds, Color backColor) 303Color backColor = e.ToolStrip.BackColor; 393Color arrowColor = item.Enabled ? SystemColors.ControlText : SystemColors.ControlDark; 430else if (item.RawBackColor != Color.Empty) 461Color borderColor = ToolStripManager.VisualStylesEnabled 475else if (!ToolStripManager.VisualStylesEnabled && (item.RawBackColor != Color.Empty)) 524Color arrowColor = splitButton.Enabled ? SystemColors.ControlText : SystemColors.ControlDark;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
244Color outerBorderColor = focused ? ColorTable.TextBoxBorder : BackColor; 245Color innerBorderColor = SystemInformation.HighContrast && !focused ? ColorTable.MenuBorder : BackColor;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
238public override Color ForeColor
System\Windows\Forms\Controls\TreeView\TreeNode.cs (10)
177public Color BackColor 183return Color.Empty; 191Color oldbk = BackColor; 198_propBag.BackColor = Color.Empty; 404public Color ForeColor 410return Color.Empty; 417Color oldfc = ForeColor; 424_propBag.ForeColor = Color.Empty; 2040return BackColor != Color.Empty; 2045return ForeColor != Color.Empty;
System\Windows\Forms\Controls\TreeView\TreeView.cs (11)
139private Color _lineColor; 196public override Color BackColor 440public override Color ForeColor 853[DefaultValue(typeof(Color), "Black")] 854public Color LineColor 1883Color c = BackColor; 1899if (_lineColor != Color.Empty) 2783Color riFore = renderinfo.ForeColor; 2784Color riBack = renderinfo.BackColor; 2841Color color = (((curState & TreeNodeStates.Selected) == TreeNodeStates.Selected) && node.TreeView.Focused) ? SystemColors.HighlightText : (node.ForeColor != Color.Empty) ? node.ForeColor : node.TreeView.ForeColor;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (3)
132public override Color BackColor 264public override Color ForeColor 519Color backColor = BackColor;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
321Color color = _parent.BackColor;
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (17)
170public Color BackColor 183return Color.Empty; 195public Color ForeColor 208return Color.Empty; 220public Color LinkColor 233return Color.Empty; 245public Color ActiveLinkColor 258return Color.Empty; 270public Color VisitedLinkColor 283return Color.Empty; 644private static Color ColorFromVARIANT(VARIANT vColor) 658return Color.FromArgb(255, Color.FromArgb(int.Parse(hexColor, NumberStyles.HexNumber, CultureInfo.InvariantCulture))); 662return Color.FromName(strColor); 668return Color.FromArgb(255, Color.FromArgb(vColor.data.intVal)); 675return Color.Empty;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
1242public override Color BackColor 1261public override Color ForeColor
System\Windows\Forms\DarkProfessionalColors.cs (19)
10public override Color MenuItemPressedGradientBegin 11=> Color.FromArgb(0xFF, 0x60, 0x60, 0x60); 13public override Color MenuItemPressedGradientMiddle 14=> Color.FromArgb(0xFF, 0x60, 0x60, 0x60); 16public override Color MenuItemPressedGradientEnd 17=> Color.FromArgb(0xFF, 0x60, 0x60, 0x60); 19public override Color MenuItemSelected 22public override Color MenuItemSelectedGradientBegin 23=> Color.FromArgb(0xFF, 0x40, 0x40, 0x40); 25public override Color MenuItemSelectedGradientEnd 26=> Color.FromArgb(0xFF, 0x40, 0x40, 0x40); 28public override Color MenuStripGradientBegin 31public override Color MenuStripGradientEnd 34public override Color StatusStripGradientBegin 37public override Color StatusStripGradientEnd 40public override Color ToolStripDropDownBackground 43public override Color ImageMarginGradientBegin 46public override Color ImageMarginGradientMiddle 49public override Color ImageMarginGradientEnd
System\Windows\Forms\Dialogs\CommonDialogs\ColorDialog.cs (6)
22private Color _color; 60public Color Color 63set => _color = !value.IsEmpty ? value : Color.Black; 152_color = Color.Black; 156private void ResetColor() => Color = Color.Black; 210private bool ShouldSerializeColor() => !Color.Equals(Color.Black);
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (4)
27private Color _color; 94[DefaultValue(typeof(Color), "Black")] 95public Color Color 454private void UpdateColor(Color color)
System\Windows\Forms\Form.cs (31)
377Properties.AddValue(s_propTransparencyKey, Color.Empty); 587public override Color BackColor 593Color c = RawBackColor; // inheritedProperties.BackColor 1596_formState[s_formStateLayered] = (TransparencyKey != Color.Empty) ? 1 : 0; 2004public Color TransparencyKey 2006get => Properties.GetValueOrDefault(s_propTransparencyKey, Color.Empty); 2009Properties.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue: Color.Empty); 2013if (value != Color.Empty) 2257/// The <see cref="Color"/> which has be previously set using this property or <see cref="Color.Empty"/>. 2279public Color FormBorderColor 2281get => Properties.GetValueOrDefault(s_propFormBorderColor, Color.Empty); 2289Properties.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"/>. 2341public Color FormCaptionBackColor 2343get => Properties.GetValueOrDefault(s_propFormCaptionBackColor, Color.Empty); 2351Properties.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"/>. 2404public Color FormCaptionTextColor 2406get => Properties.GetValueOrDefault(s_propFormCaptionTextColor, Color.Empty); 2414Properties.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue: Color.Empty); 2441private unsafe Color GetFormAttributeColorInternal(DWMWINDOWATTRIBUTE dmwWindowAttribute) 2454private unsafe void SetFormAttributeColorInternal(DWMWINDOWATTRIBUTE dmwWindowAttribute, Color color) 4142if (Properties.TryGetValue(s_propFormBorderColor, out Color? formBorderColor)) 4147if (Properties.TryGetValue(s_propFormCaptionBackColor, out Color? formCaptionBackColor)) 4152if (Properties.TryGetValue(s_propFormCaptionTextColor, out Color? formCaptionTextColor)) 4956private void ResetTransparencyKey() => TransparencyKey = Color.Empty; 5894return !TransparencyKey.Equals(Color.Empty); 6044Color transparencyKey = TransparencyKey;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1346if (BackColor == Color.Transparent)
System\Windows\Forms\OwnerDrawPropertyBag.cs (4)
28ForeColor = (Color)entry.Value!; 32BackColor = (Color)entry.Value!; 43public Color ForeColor { get; set; } 45public Color BackColor { get; set; }
System\Windows\Forms\Printing\PrintPreviewControl.cs (4)
298public override void ResetForeColor() => ForeColor = Color.White; 300internal override bool ShouldSerializeForeColor() => !ForeColor.Equals(Color.White); 345Color backColor = GetBackColor(isHighContrast); 738private Color GetBackColor(bool isHighContract)
System\Windows\Forms\Printing\PrintPreviewDialog.cs (3)
122public override Color BackColor 315public new Color TransparencyKey 539public override Color ForeColor
System\Windows\Forms\Rendering\ControlPaint.cs (119)
28private static Color t_focusPenColor; // the last background color the focus pen was created with 41private static Color s_frameColorActive; // color of active frame brush 46private static Color s_frameColorSelected; // color of selected frame brush 139public static Color ContrastControlDark 148public static unsafe IntPtr CreateHBitmap16Bit(Bitmap bitmap, Color background) 371public static Color Dark(Color baseColor, float percOfDarkDark) => new HLSColor(baseColor).Darker(percOfDarkDark); 376public static Color Dark(Color baseColor) => new HLSColor(baseColor).Darker(0.5f); 381public static Color DarkDark(Color baseColor) => new HLSColor(baseColor).Darker(1.0f); 383internal static bool IsDark(Color color) => color.GetBrightness() <= .5; 388internal static bool IsDarker(Color c1, Color c2) => new HLSColor(c1).Luminosity < new HLSColor(c2).Luminosity; 401DrawBorder(graphics, bounds, Color.FromKnownColor(KnownColor.WindowFrame), ButtonBorderStyle.Solid); 417Color backColor, 521public static void DrawBorder(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 550Color leftColor, int leftWidth, ButtonBorderStyle leftStyle, 551Color topColor, int topWidth, ButtonBorderStyle topStyle, 552Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, 553Color bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle) 569Color leftColor, int leftWidth, ButtonBorderStyle leftStyle, 570Color topColor, int topWidth, ButtonBorderStyle topStyle, 571Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, 572Color bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle) 1055private static void DrawBorderComplex(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 1143Color color, 1192Color.Empty, 1193Color.Empty); 1221Color.Empty, 1222Color.Empty); 1247Color.Empty, 1248Color.Empty); 1267Color.Empty, 1268Color.Empty); 1326Color foreground = ((state & ButtonState.Inactive) == ButtonState.Inactive) 1340Color foreground, 1373g2.Clear(Color.Transparent); 1404public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) 1407internal static void DrawHighContrastFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1410internal static void DrawBlackWhiteFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1413private static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color color, bool highContrast, bool blackAndWhite = false) 1433Color foreColor, 1434Color backColor) 1443g2.Clear(Color.Transparent); 1451if (foreColor == Color.Empty || backColor == Color.Empty) 1460Span<(Color OldColor, Color NewColor)> map = 1462new(Color.Black, foreColor), 1463new(Color.White, backColor) 1510public static void DrawGrid(Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor) 1531Color foreColor = (s_gridInvert) ? Color.White : Color.Black; 1559Color replaceBlack) 1564attributes.SetColorMatrix(RemapBlackAndWhitePreserveTransparentMatrix(replaceBlack, Color.White)); 1580internal static void DrawImageReplaceColor(Graphics g, Image image, Rectangle dest, Color oldColor, Color newColor) 1584(Color OldColor, Color NewColor) map = new(oldColor, newColor); 1585attributes.SetRemapTable(ColorAdjustType.Bitmap, new ReadOnlySpan<(Color OldColor, Color NewColor)>(ref map)); 1593public static void DrawImageDisabled(Graphics graphics, Image image, int x, int y, Color background) 1712Color foreColor, 1713Color backColor) => DrawMenuGlyph( 1724=> DrawFrameControl(graphics, x, y, width, height, DFC_TYPE.DFC_MENU, (DFCS_STATE)glyph, Color.Empty, Color.Empty); 1734Color foreColor, 1735Color backColor) => DrawFrameControl( 1756Color.Empty, 1757Color.Empty); 1776Color.Empty, 1777Color.Empty); 1785public static void DrawReversibleFrame(Rectangle rectangle, Color backColor, FrameStyle style) 1788Color graphicsColor; 1793graphicsColor = Color.White; 1798graphicsColor = Color.Black; 1824public static unsafe void DrawReversibleLine(Point start, Point end, Color backColor) 1860Color.Empty, 1861Color.Empty); 1872Color backColor) 1887public static void DrawSizeGrip(Graphics graphics, Color backColor, Rectangle bounds) 1893public static void DrawSizeGrip(Graphics graphics, Color backColor, int x, int y, int width, int height) 1914Color backColor, 1948Color color, 1980Color color, 1997Color color, 2009Color paintcolor = LightLight(color); 2035public static void FillReversibleRectangle(Rectangle rectangle, Color backColor) 2074private static int GetColorRop(Color color, int darkROP, int lightROP) 2080private static Brush GetActiveBrush(Color backColor) 2082Color brushColor = backColor.GetBrightness() <= .5 ? SystemColors.ControlLight : SystemColors.ControlDark; 2104bitmap.SetPixel(x, y, Color.Transparent); 2129private static Pen GetFocusPen(Color baseColor, bool odds, bool highContrast, bool blackAndWhite) 2148Color color1 = Color.Transparent; 2149Color color2; 2157color1 = Color.White; 2158color2 = Color.Black; 2165color2 = Color.Black; 2172else if (baseColor == Color.Transparent) 2174color1 = Color.White; 2210private static Brush GetSelectedBrush(Color backColor) 2212Color brushColor = backColor.GetBrightness() <= .5 ? SystemColors.ControlLight : SystemColors.ControlDark; 2234bitmap.SetPixel(x, y, Color.Transparent); 2265public static Color Light(Color baseColor, float percOfLightLight) 2271public static Color Light(Color baseColor) => new HLSColor(baseColor).Lighter(0.5f); 2276public static Color LightLight(Color baseColor) => new HLSColor(baseColor).Lighter(1.0f); 2408internal static void InvertForeColorIfNeeded(Bitmap bitmap, Color backgroundColor) 2416var pixel = bitmap.GetPixel(x, y); 2429internal static Bitmap CreateBitmapWithInvertedForeColor(Bitmap bitmap, Color backgroundColor) 2436Color pixel = bitmap.GetPixel(x, y); 2449private static ColorMatrix RemapBlackAndWhitePreserveTransparentMatrix(Color replaceBlack, Color replaceWhite)
System\Windows\Forms\Rendering\ControlPaint.HLSColor.cs (7)
27public HLSColor(Color color) 90public Color Darker(float percDarker) 114return Color.FromArgb( 146public Color Lighter(float percentLighter) 165return Color.FromArgb( 212private static Color ColorFromHLS(int hue, int luminosity, int saturation) 246return Color.FromArgb(r, g, b);
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (8)
21private readonly Color _backColor; 26private readonly Color _foreColor; 45Color foreColor, 46Color backColor) 71Color foreColor, 72Color backColor) 114public Color ForeColor 117public 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> 54Color foreColor, 56Color backColor = default) 58if (text.IsEmpty || foreColor == Color.Transparent) 72BACKGROUND_MODE newBackGroundMode = (backColor.IsEmpty || backColor == Color.Transparent)
System\Windows\Forms\Rendering\TextRenderer.cs (61)
25public 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> 37public static void DrawText(IDeviceContext dc, ReadOnlySpan<char> text, Font font, Point pt, Color foreColor) 38=> DrawTextInternal(dc, text, font, pt, foreColor, Color.Empty); 45Color foreColor, 46Color 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> 64Color foreColor, 65Color backColor) 73Color 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> 96Color foreColor, 104Color.Empty, 112Color foreColor, 113Color 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> 137Color foreColor, 138Color backColor, 149public 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> 166Color foreColor) 167=> DrawTextInternal(dc, text, font, bounds, foreColor, Color.Empty); 174Color foreColor, 175Color 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> 194Color foreColor, 195Color backColor) 203Color 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> 226Color foreColor, 234Color.Empty, 242Color foreColor, 243Color 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> 267Color foreColor, 268Color backColor, 284Color foreColor, 285Color backColor, 294Color foreColor, 295Color backColor, 301if (text.IsEmpty || foreColor == Color.Transparent) 317Color foreColor, 319=> DrawTextInternal(e, text, font, bounds, foreColor, Color.Empty, flags); 326Color foreColor, 327Color backColor, 350Color foreColor, 353=> DrawTextInternal(hdc, text, font, bounds, foreColor, fontQuality, Color.Empty, flags); 360Color foreColor, 362Color 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 548internal static Color DisabledTextColor(Color backColor)
System\Windows\Forms\Scrolling\ScrollBar.cs (2)
76public override Color BackColor 153public override Color ForeColor
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (4)
13private readonly Color _backColor; 14private readonly Color _foreColor; 25Color backColor, 26Color foreColor,
System\Windows\Forms\ToolTip\ToolTip.cs (6)
43private Color _backColor = SystemColors.Info; 44private Color _foreColor = SystemColors.InfoText; 174[DefaultValue(typeof(Color), "Info")] 175public Color BackColor 238[DefaultValue(typeof(Color), "InfoText")] 239public Color ForeColor
System\Windows\Forms\VisualStyles\VisualStyleInformation.cs (2)
181public static Color TextControlBorder => Application.RenderWithVisualStyles 188public static Color ControlHighlightHot => Application.RenderWithVisualStyles
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
488public Color GetColor(ColorProperty prop)
System.Windows.Forms.Design (200)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (2)
579Color backColor = SystemColors.Window; 580Color textColor = SystemColors.WindowText;
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (1)
20BackColor = Color.Transparent,
System\ComponentModel\Design\DesignerActionPanel.cs (20)
66if (uiService.Styles["VsColorPanelGradientDark"] is Color vsColorPanelGradientDarkColor) 71if (uiService.Styles["VsColorPanelGradientLight"] is Color vsColorPanelGradientLight) 76if (uiService.Styles["VsColorPanelHyperLink"] is Color vsColorPanelHyperLink) 81if (uiService.Styles["VsColorPanelHyperLinkPressed"] is Color vsColorPanelHyperLinkPressed) 86if (uiService.Styles["VsColorPanelTitleBar"] is Color vsColorPanelTitleBar) 91if (uiService.Styles["VsColorPanelTitleBarUnselected"] is Color vsColorPanelTitleBarUnselected) 96if (uiService.Styles["VsColorPanelTitleBarText"] is Color vsColorPanelTitleBarText) 101if (uiService.Styles["VsColorPanelBorder"] is Color vsColorPanelBorder) 106if (uiService.Styles["VsColorPanelSeparator"] is Color vsColorPanelSeparator) 111if (uiService.Styles["VsColorPanelText"] is Color vsColorPanelText) 120public Color ActiveLinkColor { get; } = SystemColors.HotTrack; 122public Color BorderColor { get; } = SystemColors.ActiveBorder; 172public Color GradientDarkColor { get; } = SystemColors.Control; 174public Color GradientLightColor { get; } = SystemColors.Control; 178public Color LinkColor { get; } = SystemColors.HotTrack; 180public Color SeparatorColor { get; } = SystemColors.ControlDark; 182public Color TitleBarColor { get; } = SystemColors.ActiveCaption; 184public Color TitleBarTextColor { get; } = SystemColors.ActiveCaptionText; 186public Color TitleBarUnselectedColor { get; } = SystemColors.InactiveCaption; 188public Color LabelForeColor { get; } = SystemColors.ControlText;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
336private void ShowDropDown(Control hostedControl, Color borderColor) 447public 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); 132attributes.SetRemapTable(ColorAdjustType.Bitmap, new ReadOnlySpan<(Color OldColor, Color NewColor)>(ref map));
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
18public FlyoutDialog(Control hostedControl, Control parentControl, Color borderColor, Font font)
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (1)
23BackColor = Color.Transparent,
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (3)
25BackColor = Color.Transparent, 33BackColor = Color.Transparent, 100Color backColor = (_formActive || ActionPanel._dropDownActive) ? ActionPanel.TitleBarColor : ActionPanel.TitleBarUnselectedColor;
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (2)
26BackColor = Color.Transparent, 34BackColor = Color.Transparent,
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (1)
22BackColor = Color.Transparent,
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (4)
393Color cw = SystemColors.Window; 394Color ct = SystemColors.WindowText; 395Color 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)
16private readonly Color _color; 20public ColorCellAccessibleObject(ColorPaletteAccessibleObject parent, Color color, int cell)
System\Drawing\Design\ColorEditor.ColorPalette.cs (11)
49private readonly Color[] _staticColors; 50private Color _selectedColor; 55public ColorPalette(ColorUI colorUI, Color[] customColors) 76_staticColors = new Color[TotalCells - CellsCustom]; 86public Color[] CustomColors { get; } 90public Color SelectedColor 129private Point GetCellFromColor(Color c) 145private Color GetColorFromCell(int across, int down) => GetColorFromCell(Get1DFrom2D(across, down)); 147private Color GetColorFromCell(int index) 377Color color = GetColorFromCell(Get1DFrom2D(x, y)); 414private static void PaintValue(Color color, Graphics g, Rectangle rect)
System\Drawing\Design\ColorEditor.ColorUI.cs (22)
27private Color[]? _systemColorConstants; 28private Color[]? _colorConstants; 29private Color[]? _customColors; 43private Color[] ColorValues => _colorConstants ??= GetConstants(typeof(Color)); 48private Color[] CustomColors 54_customColors = new Color[ColorPalette.CellsCustom]; 57_customColors[i] = Color.White; 73private Color[] SystemColorValues => _systemColorConstants ??= GetConstants(typeof(SystemColors)); 102private Color GetBestColor(Color color) 104Color[] colors = ColorValues; 120private static Color[] GetConstants(Type enumType) 125List<Color> colorList = []; 130if (prop.PropertyType != typeof(Color)) 141if (prop.GetValue(obj: null, index: null) is not Color outColor) 209foreach (Color color in ColorValues) 215foreach (Color color in SystemColorValues) 243if (sender is ListBox lb && lb.SelectedItem is Color selectedColor) 258Color value = (Color)lb.Items[die.Index]; 365Color[] values = ColorValues;
System\Drawing\Design\ColorEditor.cs (3)
31if (_colorUI.Value is Color colorValue && colorValue != Color.Empty) 49if (e.Value is Color color)
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (2)
114Color = Color.Empty; 130Color = Color.FromArgb(red, green, blue);
System\Drawing\Design\ColorEditor.StandardColorComparer.cs (3)
11private class StandardColorComparer : IComparer<Color> 16public int Compare(Color left, Color right)
System\Drawing\Design\ColorEditor.SystemColorComparer.cs (3)
13private class SystemColorComparer : IComparer<Color> 15public int Compare(Color x, Color y)
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
127if (uis.Styles["VsColorPanelText"] is Color color) 204if (uis.Styles["VsColorPanelText"] is Color color)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (3)
29private readonly Pen _baselinePen = new(Color.Fuchsia); 167if (uiService.Styles["VsColorSnaplines"] is Color snaplinesColor) 173if (uiService.Styles["VsColorSnaplinesTextBaseline"] is Color snaplinesTextBaselineColor)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
937Color backColor = primaryParent is not null ? primaryParent.BackColor : Color.Empty; 1022g.Clear(Color.Chartreuse); 1025((Bitmap)_dragImage).MakeTransparent(Color.Chartreuse);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
632Color 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)
123Color styleColor; 124if (uiService.Styles["ArtboardBackground"] is Color backgroundColor) 130else if (uiService.Styles["VsColorDesignerTray"] is Color designerTrayColor) 134else if (uiService.Styles["HighlightColor"] is Color highlightColor) 147if (uiService.Styles["ArtboardBackgroundText"] is Color backgroundTextColor) 151else if (uiService.Styles["VsColorPanelText"] is Color panelTextColor) 1400Color styleColor; 1401if (uiService.Styles["ArtboardBackground"] is Color backgroundColor) 1407else if (uiService.Styles["VsColorDesignerTray"] is Color trayColor) 1411else if (uiService.Styles["HighlightColor"] is Color highlightColor) 1443selectionBorderBrush = new HatchBrush(HatchStyle.Percent50, SystemColors.HighlightText, Color.Transparent); 1447selectionBorderBrush = new HatchBrush(HatchStyle.Percent50, SystemColors.ControlDarkDark, Color.Transparent);
System\Windows\Forms\Design\ControlDesigner.cs (1)
2280using (Pen pen = new(Color.Red, penThickness))
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
81s_selectedColumnsItemBitmap.MakeTransparent(Color.Red);
System\Windows\Forms\Design\DesignBindingPicker.cs (9)
165addNewBitmap.MakeTransparent(Color.Magenta); 290addNewBitmap.MakeTransparent(Color.Magenta); 407if (uiService.Styles["VsColorPanelHyperLink"] is Color color1) 412if (uiService.Styles["VsColorPanelHyperLinkPressed"] is Color color2) 1908images.MakeTransparent(Color.Magenta); 1912TransparentColor = Color.Magenta, 1924TransparentColor = Color.Magenta, 1942TransparentColor = Color.Magenta, 2261images.Add(value, Color.Transparent);
System\Windows\Forms\Design\DesignerFrame.cs (2)
43if (_uiService?.Styles["ArtboardBackground"] is Color color) 268if (_uiService?.Styles["HorizontalResizeGrip"] is Color color)
System\Windows\Forms\Design\DesignerUtils.cs (15)
22private static SolidBrush s_hoverBrush = new(Color.FromArgb(alpha: 50, SystemColors.Highlight)); 167s_hoverBrush = new SolidBrush(Color.FromArgb(50, SystemColors.Highlight)); 188private static void DrawDragBorder(Graphics g, Size imageSize, int borderSize, Color backColor) 191if (backColor != Color.Empty && backColor.GetBrightness() < .5) 212public static void DrawResizeBorder(Graphics g, Region resizeBorder, Color backColor) 215if (backColor != Color.Empty && backColor.GetBrightness() < .5) 226public static void DrawFrame(Graphics g, Region resizeBorder, FrameStyle style, Color backColor) 228Color color = SystemColors.ControlDarkDark; 229if (backColor != Color.Empty && backColor.GetBrightness() < .5) 236FrameStyle.Dashed => new HatchBrush(HatchStyle.Percent50, color, Color.Transparent), 312public static void GenerateSnapShot(Control control, out Bitmap image, int borderSize, double opacity, Color backColor) 396if (control.BackColor == Color.Transparent) 428if (control.BackColor == Color.Transparent) 438Color testColor = Color.FromArgb(255, 252, 186, 238);
System\Windows\Forms\Design\DocumentDesigner.cs (4)
127private Color BackColor 678if (backProp is not null && backProp.PropertyType == typeof(Color) && !backProp.ShouldSerializeValue(Component)) 1326BackColor = Color.Empty; 1364if (!ShadowProperties.Contains(nameof(BackColor)) || ((Color)ShadowProperties[nameof(BackColor)]).IsEmpty)
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (2)
440var backColor = Control.BackColor; 441if (backColor != Color.Empty && backColor.GetBrightness() < .5)
System\Windows\Forms\Design\ImageListDesigner.cs (2)
70private Color TransparentColor 81private bool ShouldSerializeTransparentColor() => !TransparentColor.Equals(Color.LightGray);
System\Windows\Forms\Design\OleDragDropHandler.cs (5)
342Color backColor = SystemColors.Control; 410private static void DrawReversibleFrame(HWND handle, Rectangle rectangle, Color backColor) 424Color graphicsColor; 429graphicsColor = Color.White; 434graphicsColor = Color.Black;
System\Windows\Forms\Design\PanelDesigner.cs (1)
72Color penColor = Control.BackColor.GetBrightness() < .5 ?
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
34Color penColor;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (1)
138Color borderColor = SystemColors.Control;
System\Windows\Forms\Design\SplitterDesigner.cs (3)
31Color penColor = control.BackColor.GetBrightness() < .5 ? Color.White : Color.Black;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (4)
149Color penColor = control.BackColor.GetBrightness() < .5 ? ControlPaint.Light(control.BackColor) : ControlPaint.Dark(control.BackColor); 184Color waterMarkTextColor = Color.Black; 186if (uis?.Styles["SmartTagText"] is Color clr)
System\Windows\Forms\Design\StandardCommandToolStripMenuItem.cs (1)
90ImageTransparentColor = Color.Magenta;
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
182item.ImageTransparentColor = Color.Magenta; 349item.ImageTransparentColor = Color.Magenta;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
363if (uis.Styles["VsColorPanelText"] is Color color)
System\Windows\Forms\Design\TabOrder.cs (2)
215Color backColor = hoverParent.BackColor; 265Color textColor;
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
107imageTransProperty?.SetValue(component, Color.Magenta);
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
629imageTransProperty?.SetValue(item, Color.Magenta);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
394if (uis.Styles["VsColorPanelText"] is Color color)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
926using Pen p = new(new SolidBrush(Color.Black));
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (5)
76item.ImageTransparentColor = Color.Magenta; 124ImageTransparentColor = Color.Magenta 178if (panelTextObject is Color panelTextColor) 219_editItemsToolStripMenuItem.ImageTransparentColor = Color.Magenta; 541ChangeProperty(component, "ImageTransparentColor", Color.Magenta);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
837imageTransProperty?.SetValue(newItem, Color.Magenta);
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (3)
46Color penColor = Control.BackColor.GetBrightness() < .5 ? 473using Brush brush = new SolidBrush(Color.FromArgb(50, Color.White));
System\Windows\Forms\Design\ToolStripTemplateNode.cs (18)
1442_addItemButton.ImageTransparentColor = Color.Lime; 1781private readonly Color _selectedBorderColor; 1782private readonly Color _defaultBorderColor; 1783private readonly Color _dropDownMouseOverColor; 1784private readonly Color _dropDownMouseDownColor; 1785private 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; 1815DrawArrow(new ToolStripArrowRenderEventArgs(g, null, bounds, SystemInformation.HighContrast ? Color.Black : SystemColors.ControlText, ArrowDirection.Down)); 1827using (LinearGradientBrush brush = new(bounds, Color.White, _defaultBorderColor, LinearGradientMode.Vertical)) 1910borderPen.Color = Color.Black; 1930borderPen.Color = Color.Black; 1939borderPen.Color = Color.Black; 1949borderPen.Color = Color.Black; 2047e.TextColor = Color.Black;
System.Windows.Forms.Design.Tests (16)
EnsureEditorsTests.cs (1)
48[InlineData(typeof(Color), typeof(ColorEditor))]
System\Drawing\Design\ColorEditorTests.cs (2)
24yield return new object[] { Color.Empty }; 25yield return new object[] { Color.Red };
System\Drawing\Design\ImageEditorTests.cs (6)
163otherImage.SetPixel(0, 0, Color.Red); 164otherImage.SetPixel(1, 0, Color.Red); 165otherImage.SetPixel(2, 0, Color.Red); 166otherImage.SetPixel(0, 1, Color.Red); 167otherImage.SetPixel(1, 1, Color.Red); 168otherImage.SetPixel(2, 1, Color.Red);
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (1)
325bitmap.SetPixel(0, 0, Color.Red);
System\Windows\Forms\Design\DataGridViewCellStyleBuilderTests.cs (2)
21builder.CellStyle = new DataGridViewCellStyle { BackColor = Color.Red }; 25result.BackColor.Should().Be(Color.Red);
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (4)
49Color backColor = (Color)inheritedPropertyDescriptor.GetValue(control); 52inheritedPropertyDescriptor.SetValue(control, Color.Purple); 53backColor = (Color)inheritedPropertyDescriptor.GetValue(control);
System.Windows.Forms.Primitives (43)
System\Drawing\ColorExtensions.cs (1)
8public static int ToWin32(this Color color) => ColorTranslator.ToWin32(color);
System\Windows\Forms\DeviceContextExtensions.cs (6)
98internal 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 117internal static Color FindNearestColor(this HDC hdc, Color color) 119Color newColor = ColorTranslator.FromWin32((int)PInvoke.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(color)).Value);
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (7)
27private static PenCache.Scope GetPenScope(Color color) 44private static SolidBrushCache.Scope GetSolidBrushScope(Color color) 73internal static PenCache.Scope GetCachedPenScope(this Color color) => GetPenScope(color); 75/// <inheritdoc cref="GetCachedPenScope(Color)"/> 76internal static PenCache.Scope GetCachedPenScope(this Color color, int width) 79/// <inheritdoc cref="GetCachedPenScope(Color)"/> 80internal static SolidBrushCache.Scope GetCachedSolidBrushScope(this Color color) => GetSolidBrushScope(color);
System\Windows\Forms\GdiPlus\PenCache.cs (5)
8internal sealed class PenCache : RefCountedCache<Pen, Color, Color> 12protected override CacheEntry CreateEntry(Color key, bool cached) => new PenCacheEntry(key, cached); 13protected override bool IsMatch(Color key, CacheEntry entry) => key == entry.Data; 18public PenCacheEntry(Color color, bool cached) : base(color, cached) => _pen = new Pen(color);
System\Windows\Forms\GdiPlus\SolidBrushCache.cs (5)
8internal sealed class SolidBrushCache : RefCountedCache<SolidBrush, Color, Color> 12protected override CacheEntry CreateEntry(Color key, bool cached) => new SolidBrushCacheEntry(key, cached); 13protected override bool IsMatch(Color key, CacheEntry data) => key == data.Data; 18public 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 32internal static Color FindNearestColor(this Graphics graphics, Color color) 34Color newColor = graphics.GetNearestColor(color); 41internal static bool HasTransparency(this Color color) => color.A != byte.MaxValue; 46internal static bool IsFullyTransparent(this Color color) => color.A == 0; 68internal static Color MixColor(this Color color1, Color color2) 74return Color.FromArgb( 84internal static Color InvertColor(this Color color) 87return Color.FromArgb(argb.A, (byte)~argb.R, (byte)~argb.G, (byte)~argb.B); 94internal static Pen CreateStaticPen(this Color color, DashStyle dashStyle) 105? new Pen(Color.FromArgb(color.ToArgb())) { DashStyle = dashStyle } 119internal static SolidBrush CreateStaticBrush(this Color color) 121? new SolidBrush(Color.FromArgb(color.ToArgb()))
System.Windows.Forms.Primitives.Tests (13)
Interop\GdiPlus\ARGBTests.cs (6)
30public void ToFromColor(Color color) 34Color backAgain = argb; 38public static TheoryData<Color> Colors => 41Color.CornflowerBlue, 42Color.Transparent, 43Color.BurlyWood
System\Windows\Forms\DeviceContextScopeTests.cs (2)
64using CreateBrushScope blueBrush = new(Color.Blue); 65using CreateBrushScope redBrush = new(Color.Red);
System\Windows\Forms\RefCacheTests.cs (5)
79internal sealed class IntColorCache : RefCountedCache<Color, Color, int> 84=> new ColorCacheEntry(Color.FromArgb(key), cached); 90public ColorCacheEntry(Color color, bool cached) : base(color, cached) { } 91public override Color Object => Data;
System.Windows.Forms.Primitives.TestUtilities (15)
Metafiles\Validators\BrushColorValidator.cs (2)
12private readonly Color _brushColor; 13public BrushColorValidator(Color brushColor) => _brushColor = brushColor;
Metafiles\Validators\BrushValidator.cs (2)
12private readonly Color _brushColor; 15public BrushValidator(Color brushColor, BRUSH_STYLE brushStyle)
Metafiles\Validators\PenColorValidator.cs (2)
12private readonly Color _penColor; 13public PenColorValidator(Color penColor) => _penColor = penColor;
Metafiles\Validators\PenValidator.cs (2)
14private readonly Color _penColor; 16public PenValidator(int penWidth, Color penColor, PEN_STYLE penStyle)
Metafiles\Validators\State.cs (5)
14internal static IStateValidator Brush(Color brushColor, BRUSH_STYLE brushStyle) 16internal static IStateValidator BrushColor(Color brushColor) => new BrushColorValidator(brushColor); 20internal static IStateValidator Pen(int penWidth, Color penColor, PEN_STYLE penStyle) 22internal static IStateValidator PenColor(Color penColor) => new PenColorValidator(penColor); 26internal static IStateValidator TextColor(Color textColor) => new TextColorValidator(textColor);
Metafiles\Validators\TextColorValidator.cs (2)
12private readonly Color _textColor; 13public TextColorValidator(Color textColor) => _textColor = textColor;
System.Windows.Forms.Tests (4298)
CheckedListBoxTests.cs (12)
405yield return new object[] { null, Rectangle.Empty, 0, DrawItemState.Default, Color.Red, Color.Blue }; 406yield return new object[] { null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.None, Color.Red, Color.Blue }; 407yield return new object[] { null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Checked, Color.Red, Color.Blue }; 408yield return new object[] { new Font("Arial", 8.25f), new Rectangle(10, 20, 30, 40), 1, DrawItemState.Default, Color.Red, Color.Blue }; 413public void CheckedListBox_OnDrawItem_Invoke_Success(Font font, Rectangle rect, int index, DrawItemState state, Color foreColor, Color backColor) 428public void CheckedListBox_OnDrawItem_InvokeWithHandle_Success(Font font, Rectangle rect, int index, DrawItemState state, Color foreColor, Color backColor)
SerializableTypesTests.cs (13)
78TransparentColor = Color.White 165ForeColor = Color.White, 166BackColor = Color.Black, 188Assert.Equal(Color.Black, result.BackColor); 189Assert.Equal(Color.White, result.ForeColor); 213foreColor: Color.White, 214backColor: Color.Black, 237Assert.Equal(Color.White, result.ForeColor); 238Assert.Equal(Color.Black, result.BackColor); 352BackColor = Color.Yellow, // Colors and Font are serialized into the property bag. 353ForeColor = Color.Green, 378Assert.Equal(Color.Yellow, result.BackColor); 379Assert.Equal(Color.Green, result.ForeColor);
System\Windows\Forms\AbstractButtonBaseTests.cs (3)
17control.Invoking(y => y.FlatAppearance.BorderColor = Color.Transparent) 34Color expectedColor = Color.FromArgb(red, green, blue);
System\Windows\Forms\AmbientPropertiesTests.cs (4)
16Assert.Equal(Color.Empty, property.BackColor); 19Assert.Equal(Color.Empty, property.ForeColor); 24public void BackColor_Set_GetReturnsExpected(Color value) 69public void ForeColor_Set_GetReturnsExpected(Color value)
System\Windows\Forms\AxHostTests.cs (8)
290public void AxHost_BackColor_Set_GetReturnsExpected(Color value, Color expected) 535public void AxHost_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1608original.SetPixel(1, 2, Color.FromArgb(unchecked((int)0xFF010203))); 1626Assert.Equal(Color.FromArgb(unchecked((int)0xFF010203)), original.GetPixel(1, 2)); 1668original.SetPixel(1, 2, Color.FromArgb(unchecked((int)0xFF010203))); 1691Assert.Equal(Color.FromArgb(unchecked((int)0xFF010203)), original.GetPixel(1, 2));
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (1)
74Color.Red
System\Windows\Forms\ButtonBaseTests.cs (26)
503public void ButtonBase_BackColor_Set_GetReturnsExpected(Color value, Color expected) 520public void ButtonBase_BackColor_SetWithUseVisualStyleBackColor_GetReturnsExpected(Color value, Color expected) 540public void ButtonBase_BackColor_SetDesignMode_GetReturnsExpected(Color value, Color expected) 586public void ButtonBase_BackColor_SetDesignModeWithUseVisualStyleBackColor_GetReturnsExpected(Color value, Color expected) 632public void ButtonBase_BackColor_SetDesignModeWithInvalidDescriptor_GetReturnsExpected(Color value, Color expected) 694yield return new object[] { Color.Red, Color.Red, 2 }; 695yield return new object[] { Color.Empty, Control.DefaultBackColor, 1 }; 700public void ButtonBase_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 741control.BackColor = Color.Red; 742Assert.Equal(Color.Red, control.BackColor); 746control.BackColor = Color.Red; 747Assert.Equal(Color.Red, control.BackColor); 751control.BackColor = Color.Empty; 757control.BackColor = Color.Red; 758Assert.Equal(Color.Red, control.BackColor); 1032Assert.Equal(Color.Empty, appearance.BorderColor); 1034Assert.Equal(Color.Empty, appearance.CheckedBackColor); 1035Assert.Equal(Color.Empty, appearance.MouseDownBackColor); 1036Assert.Equal(Color.Empty, appearance.MouseOverBackColor);
System\Windows\Forms\ButtonRenderingTests.cs (1)
243State.PenColor(Color.Black),
System\Windows\Forms\ClipboardTests.cs (4)
425bitmap.SetPixel(1, 2, Color.FromArgb(0x01, 0x02, 0x03, 0x04)); 429result.GetPixel(1, 2).Should().Be(Color.FromArgb(0xFF, 0xD2, 0xD2, 0xD2)); 489Clipboard.SetData(format, Color.Black); 492Clipboard.GetData(format).Should().Be(Color.Black);
System\Windows\Forms\ColorDialogTests.cs (19)
18Assert.Equal(Color.Black, dialog.Color); 42Assert.Equal(Color.Empty, dialog.Color); 107yield return new object[] { Color.Empty, Color.Black }; 108yield return new object[] { Color.Red, Color.Red }; 113public void ColorDialog_Color_Set_GetReturnsExpected(Color value, Color expected) 128public void ColorDialog_Color_SetWithCustomOldValue_GetReturnsExpected(Color value, Color expected) 132Color = Color.Blue 150dialog.Color = Color.Red; 151Assert.Equal(Color.Red, dialog.Color); 155Assert.Equal(Color.Black, dialog.Color); 166dialog.Color = Color.Red; 167Assert.Equal(Color.Red, dialog.Color); 171Assert.Equal(Color.Black, dialog.Color); 327Color = Color.Red, 339Assert.Equal(Color.Black, dialog.Color);
System\Windows\Forms\ComboBoxTests.cs (54)
165yield return new object[] { Color.Empty, SystemColors.Window }; 166yield return new object[] { Color.Red, Color.Red }; 171public void ComboBox_BackColor_Set_GetReturnsExpected(Color value, Color expected) 188yield return new object[] { Color.Empty, SystemColors.Window, 0 }; 189yield return new object[] { Color.Red, Color.Red, 1 }; 194public void ComboBox_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 255control.BackColor = Color.Red; 256Assert.Equal(Color.Red, control.BackColor); 260control.BackColor = Color.Red; 261Assert.Equal(Color.Red, control.BackColor); 265control.BackColor = Color.Empty; 271control.BackColor = Color.Red; 272Assert.Equal(Color.Red, control.BackColor); 283control.BackColor = Color.Red; 284Assert.Equal(Color.Red, control.BackColor); 299control.BackColor = Color.Red; 300Assert.Equal(Color.Red, control.BackColor); 1047yield return new object[] { Color.Empty, SystemColors.WindowText }; 1048yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 1049yield return new object[] { Color.White, Color.White }; 1050yield return new object[] { Color.Black, Color.Black }; 1051yield return new object[] { Color.Red, Color.Red }; 1056public void ComboBox_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1073yield return new object[] { Color.Empty, SystemColors.WindowText, 0 }; 1074yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 1075yield return new object[] { Color.White, Color.White, 1 }; 1076yield return new object[] { Color.Black, Color.Black, 1 }; 1077yield return new object[] { Color.Red, Color.Red, 1 }; 1082public void ComboBox_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 1123control.ForeColor = Color.Red; 1124Assert.Equal(Color.Red, control.ForeColor); 1128control.ForeColor = Color.Red; 1129Assert.Equal(Color.Red, control.ForeColor); 1133control.ForeColor = Color.Empty; 1139control.ForeColor = Color.Red; 1140Assert.Equal(Color.Red, control.ForeColor); 1151control.ForeColor = Color.Red; 1152Assert.Equal(Color.Red, control.ForeColor); 1167control.ForeColor = Color.Red; 1168Assert.Equal(Color.Red, control.ForeColor);
System\Windows\Forms\Control.ActiveXImplTests.cs (3)
20control.BackColor = Color.Bisque; 27control.BackColor = Color.Honeydew; 32Assert.Equal(Color.Bisque, control.BackColor);
System\Windows\Forms\ControlPaintTests.cs (1123)
13yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed), Color.Empty }; 14yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb), Color.Empty }; 15yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb), Color.Empty }; 16yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed), Color.Red }; 17yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb), Color.Red }; 18yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb), Color.Red }; 19yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed), Color.Transparent }; 20yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb), Color.Transparent }; 21yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb), Color.Transparent }; 22yield return new object[] { new Bitmap(11, 11, PixelFormat.Format1bppIndexed), Color.Red }; 23yield return new object[] { new Bitmap(11, 11, PixelFormat.Format32bppRgb), Color.Red }; 24yield return new object[] { new Bitmap(11, 11, PixelFormat.Format32bppArgb), Color.Red }; 25yield return new object[] { new Bitmap(16, 24, PixelFormat.Format1bppIndexed), Color.Red }; 26yield return new object[] { new Bitmap(16, 24, PixelFormat.Format32bppRgb), Color.Red }; 27yield return new object[] { new Bitmap(16, 24, PixelFormat.Format32bppArgb), Color.Red }; 32public void ControlPaint_CreateHBitmap16Bit_Invoke_ReturnsExpected(Bitmap bitmap, Color background) 55bitmap.SetPixel(0, 0, Color.FromArgb(255, 50, 100, 150)); 56bitmap.SetPixel(1, 0, Color.FromArgb(1, 50, 100, 150)); 57bitmap.SetPixel(2, 0, Color.FromArgb(0, 50, 100, 150)); 59HBITMAP hBitmap = (HBITMAP)ControlPaint.CreateHBitmap16Bit(bitmap, Color.Red); 69Assert.Equal(Color.FromArgb(255, 49, 99, 148), result.GetPixel(0, 0)); 70Assert.Equal(Color.FromArgb(255, 255, 0, 0), result.GetPixel(1, 0)); 71Assert.Equal(Color.FromArgb(255, 255, 0, 0), result.GetPixel(2, 0)); 82Assert.Throws<ArgumentNullException>(() => ControlPaint.CreateHBitmap16Bit(null, Color.Red)); 126mask.SetPixel(0, 0, Color.FromArgb(255, 255, 0, 0)); 127mask.SetPixel(1, 0, Color.FromArgb(255, 0, 255, 0)); 128mask.SetPixel(2, 0, Color.FromArgb(0, 0, 0, 255)); 133bitmap.SetPixel(0, 0, Color.FromArgb(255, 50, 100, 150)); 134bitmap.SetPixel(1, 0, Color.FromArgb(1, 50, 100, 150)); 135bitmap.SetPixel(2, 0, Color.FromArgb(0, 50, 100, 150)); 147Assert.Equal(Color.FromArgb(255, 0, 100, 150), result.GetPixel(0, 0)); 148Assert.Equal(Color.FromArgb(255, 210, 0, 211), result.GetPixel(1, 0)); 149Assert.Equal(Color.FromArgb(255, 0, 0, 0), result.GetPixel(2, 0)); 166bitmap.SetPixel(0, 0, Color.FromArgb(255, 50, 100, 150)); 167bitmap.SetPixel(1, 0, Color.FromArgb(1, 50, 100, 150)); 168bitmap.SetPixel(2, 0, Color.FromArgb(0, 50, 100, 150)); 180Assert.Equal(Color.FromArgb(255, 50, 100, 150), result.GetPixel(0, 0)); 181Assert.Equal(Color.FromArgb(255, 210, 210, 211), result.GetPixel(1, 0)); 182Assert.Equal(Color.FromArgb(255, 211, 211, 211), result.GetPixel(2, 0)); 221Assert.Equal(new Color[] { Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 255, 255, 255) }, result.Palette.Entries); 234bitmap.SetPixel(0, 0, Color.FromArgb(255, 50, 100, 150)); 235bitmap.SetPixel(1, 0, Color.FromArgb(1, 50, 100, 150)); 236bitmap.SetPixel(2, 0, Color.FromArgb(0, 50, 100, 150)); 246Assert.Equal(new Color[] { Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 255, 255, 255) }, result.Palette.Entries); 248Assert.Equal(Color.FromArgb(255, 0, 0, 0), result.GetPixel(0, 0)); 249Assert.Equal(Color.FromArgb(255, 0, 0, 0), result.GetPixel(1, 0)); 250Assert.Equal(Color.FromArgb(255, 255, 255, 255), result.GetPixel(2, 0)); 266yield return new object[] { Color.White, Color.FromArgb(255, 0, 0, 0) }; 267yield return new object[] { Color.Black, Color.FromArgb(255, 255, 255, 255) }; 272public void ControlPaint_CreateBitmapWithInvertedForeColor(Color imageColor, Color expected) 277using Bitmap invertedBitmap = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, Color.LightGray); 278Color newColor = invertedBitmap.GetPixel(0, 0); 285yield return new object[] { Color.FromArgb(255, 255, 0, 0), Color.FromArgb(255, 85, 0, 0) }; 286yield return new object[] { Color.FromArgb(255, 0, 255, 0), Color.FromArgb(255, 0, 85, 0) }; 287yield return new object[] { Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 0, 0, 85) }; 288yield return new object[] { Color.FromArgb(255, 255, 255, 0), Color.FromArgb(255, 85, 85, 0) }; 289yield return new object[] { Color.FromArgb(255, 255, 0, 255), Color.FromArgb(255, 85, 0, 85) }; 290yield return new object[] { Color.FromArgb(255, 0, 255, 255), Color.FromArgb(255, 0, 85, 85) }; 291yield return new object[] { Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 85, 85, 85) }; 292yield return new object[] { Color.FromArgb(255, 0, 85, 0), Color.FromArgb(255, 0, 28, 0) }; 293yield return new object[] { Color.FromArgb(255, 0, 28, 0), Color.FromArgb(255, 0, 9, 0) }; 294yield return new object[] { Color.FromArgb(255, 0, 9, 0), Color.FromArgb(255, 0, 2, 0) }; 295yield return new object[] { Color.FromArgb(255, 0, 2, 0), Color.FromArgb(255, 0, 0, 0) }; 296yield return new object[] { Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 0, 0, 0) }; 297yield return new object[] { Color.FromArgb(255, 125, 40, 200), Color.FromArgb(255, 41, 14, 67) }; 298yield return new object[] { Color.FromArgb(0, 255, 200, 255), Color.FromArgb(255, 151, 0, 151) }; 299yield return new object[] { SystemColors.ControlDarkDark, Color.FromArgb(255, 35, 35, 35) }; 300yield return new object[] { SystemColors.ControlDark, Color.FromArgb(255, 53, 53, 53) }; 301yield return new object[] { SystemColors.Control, Color.FromArgb(255, 133, 133, 133) }; 302yield return new object[] { SystemColors.ControlLight, Color.FromArgb(255, 75, 75, 75) }; 303yield return new object[] { SystemColors.ControlLightLight, Color.FromArgb(255, 85, 85, 85) }; 308public void ControlPaint_Dark_InvokeColor_ReturnsExpected(Color baseColor, Color expected) 318yield return new object[] { Color.FromArgb(255, 255, 0, 0), -1.5f, Color.FromArgb(255, 255, 170, 170) }; 319yield return new object[] { Color.FromArgb(255, 0, 255, 0), -1.5f, Color.FromArgb(255, 170, 255, 170) }; 320yield return new object[] { Color.FromArgb(255, 0, 0, 255), -1.5f, Color.FromArgb(255, 170, 170, 255) }; 321yield return new object[] { Color.FromArgb(255, 255, 255, 0), -1.5f, Color.FromArgb(255, 255, 255, 170) }; 322yield return new object[] { Color.FromArgb(255, 255, 0, 255), -1.5f, Color.FromArgb(255, 255, 170, 255) }; 323yield return new object[] { Color.FromArgb(255, 0, 255, 255), -1.5f, Color.FromArgb(255, 170, 255, 255) }; 324yield return new object[] { Color.FromArgb(255, 255, 255, 255), -1.5f, Color.FromArgb(255, 169, 169, 169) }; 325yield return new object[] { Color.FromArgb(255, 0, 85, 0), -1.5f, Color.FromArgb(255, 0, 138, 0) }; 326yield return new object[] { Color.FromArgb(255, 0, 28, 0), -1.5f, Color.FromArgb(255, 0, 43, 0) }; 327yield return new object[] { Color.FromArgb(255, 0, 9, 0), -1.5f, Color.FromArgb(255, 0, 11, 0) }; 328yield return new object[] { Color.FromArgb(255, 0, 2, 0), -1.5f, Color.FromArgb(255, 0, 0, 0) }; 329yield return new object[] { Color.FromArgb(255, 0, 0, 0), -1.5f, Color.FromArgb(255, 0, 0, 0) }; 330yield return new object[] { Color.FromArgb(255, 125, 40, 200), -1.5f, Color.FromArgb(255, 201, 162, 236) }; 331yield return new object[] { Color.FromArgb(0, 255, 200, 255), -1.5f, Color.FromArgb(255, 255, 243, 0) }; 332yield return new object[] { SystemColors.ControlDarkDark, -1.5f, Color.FromArgb(255, 175, 175, 175) }; 333yield return new object[] { SystemColors.ControlDark, -1.5f, Color.FromArgb(255, 9, 9, 9) }; 334yield return new object[] { SystemColors.Control, -1.5f, Color.FromArgb(255, 242, 242, 242) }; 335yield return new object[] { SystemColors.ControlLight, -1.5f, Color.FromArgb(255, 121, 121, 121) }; 336yield return new object[] { SystemColors.ControlLightLight, -1.5f, Color.FromArgb(255, 169, 169, 169) }; 338yield return new object[] { Color.FromArgb(255, 255, 0, 0), -1f, Color.FromArgb(255, 255, 85, 85) }; 339yield return new object[] { Color.FromArgb(255, 0, 255, 0), -1f, Color.FromArgb(255, 85, 255, 85) }; 340yield return new object[] { Color.FromArgb(255, 0, 0, 255), -1f, Color.FromArgb(255, 85, 85, 255) }; 341yield return new object[] { Color.FromArgb(255, 255, 255, 0), -1f, Color.FromArgb(255, 255, 255, 85) }; 342yield return new object[] { Color.FromArgb(255, 255, 0, 255), -1f, Color.FromArgb(255, 255, 85, 255) }; 343yield return new object[] { Color.FromArgb(255, 0, 255, 255), -1f, Color.FromArgb(255, 85, 255, 255) }; 344yield return new object[] { Color.FromArgb(255, 255, 255, 255), -1f, Color.FromArgb(255, 84, 84, 84) }; 345yield return new object[] { Color.FromArgb(255, 0, 85, 0), -1f, Color.FromArgb(255, 0, 111, 0) }; 346yield return new object[] { Color.FromArgb(255, 0, 28, 0), -1f, Color.FromArgb(255, 0, 34, 0) }; 347yield return new object[] { Color.FromArgb(255, 0, 9, 0), -1f, Color.FromArgb(255, 0, 9, 0) }; 348yield return new object[] { Color.FromArgb(255, 0, 2, 0), -1f, Color.FromArgb(255, 0, 0, 0) }; 349yield return new object[] { Color.FromArgb(255, 0, 0, 0), -1f, Color.FromArgb(255, 0, 0, 0) }; 350yield return new object[] { Color.FromArgb(255, 125, 40, 200), -1f, Color.FromArgb(255, 163, 96, 223) }; 351yield return new object[] { Color.FromArgb(0, 255, 200, 255), -1f, Color.FromArgb(255, 255, 93, 0) }; 352yield return new object[] { SystemColors.ControlDarkDark, -1f, Color.FromArgb(255, 140, 140, 140) }; 353yield return new object[] { SystemColors.ControlDark, -1f, Color.FromArgb(255, 212, 212, 212) }; 354yield return new object[] { SystemColors.Control, -1f, Color.FromArgb(255, 215, 215, 215) }; 355yield return new object[] { SystemColors.ControlLight, -1f, Color.FromArgb(255, 45, 45, 45) }; 356yield return new object[] { SystemColors.ControlLightLight, -1f, Color.FromArgb(255, 84, 84, 84) }; 358yield return new object[] { Color.FromArgb(255, 255, 0, 0), -0.5f, Color.FromArgb(255, 255, 0, 0) }; 359yield return new object[] { Color.FromArgb(255, 0, 255, 0), -0.5f, Color.FromArgb(255, 0, 255, 0) }; 360yield return new object[] { Color.FromArgb(255, 0, 0, 255), -0.5f, Color.FromArgb(255, 0, 0, 255) }; 361yield return new object[] { Color.FromArgb(255, 255, 255, 0), -0.5f, Color.FromArgb(255, 255, 255, 0) }; 362yield return new object[] { Color.FromArgb(255, 255, 0, 255), -0.5f, Color.FromArgb(255, 255, 0, 255) }; 363yield return new object[] { Color.FromArgb(255, 0, 255, 255), -0.5f, Color.FromArgb(255, 0, 255, 255) }; 364yield return new object[] { Color.FromArgb(255, 255, 255, 255), -0.5f, Color.FromArgb(255, 255, 255, 255) }; 365yield return new object[] { Color.FromArgb(255, 0, 85, 0), -0.5f, Color.FromArgb(255, 0, 83, 0) }; 366yield return new object[] { Color.FromArgb(255, 0, 28, 0), -0.5f, Color.FromArgb(255, 0, 26, 0) }; 367yield return new object[] { Color.FromArgb(255, 0, 9, 0), -0.5f, Color.FromArgb(255, 0, 6, 0) }; 368yield return new object[] { Color.FromArgb(255, 0, 2, 0), -0.5f, Color.FromArgb(255, 0, 0, 0) }; 369yield return new object[] { Color.FromArgb(255, 0, 0, 0), -0.5f, Color.FromArgb(255, 0, 0, 0) }; 370yield return new object[] { Color.FromArgb(255, 125, 40, 200), -0.5f, Color.FromArgb(255, 123, 39, 199) }; 371yield return new object[] { Color.FromArgb(0, 255, 200, 255), -0.5f, Color.FromArgb(255, 255, 198, 255) }; 372yield return new object[] { SystemColors.ControlDarkDark, -0.5f, Color.FromArgb(255, 105, 105, 105) }; 373yield return new object[] { SystemColors.ControlDark, -0.5f, Color.FromArgb(255, 159, 159, 159) }; 374yield return new object[] { SystemColors.Control, -0.5f, Color.FromArgb(255, 187, 187, 187) }; 375yield return new object[] { SystemColors.ControlLight, -0.5f, Color.FromArgb(255, 226, 226, 226) }; 376yield return new object[] { SystemColors.ControlLightLight, -0.5f, Color.FromArgb(255, 255, 255, 255) }; 378yield return new object[] { Color.FromArgb(255, 255, 0, 0), -0.25f, Color.FromArgb(255, 213, 0, 0) }; 379yield return new object[] { Color.FromArgb(255, 0, 255, 0), -0.25f, Color.FromArgb(255, 0, 213, 0) }; 380yield return new object[] { Color.FromArgb(255, 0, 0, 255), -0.25f, Color.FromArgb(255, 0, 0, 213) }; 381yield return new object[] { Color.FromArgb(255, 255, 255, 0), -0.25f, Color.FromArgb(255, 213, 213, 0) }; 382yield return new object[] { Color.FromArgb(255, 255, 0, 255), -0.25f, Color.FromArgb(255, 213, 0, 213) }; 383yield return new object[] { Color.FromArgb(255, 0, 255, 255), -0.25f, Color.FromArgb(255, 0, 213, 213) }; 384yield return new object[] { Color.FromArgb(255, 255, 255, 255), -0.25f, Color.FromArgb(255, 212, 212, 212) }; 385yield return new object[] { Color.FromArgb(255, 0, 85, 0), -0.25f, Color.FromArgb(255, 0, 68, 0) }; 386yield return new object[] { Color.FromArgb(255, 0, 28, 0), -0.25f, Color.FromArgb(255, 0, 21, 0) }; 387yield return new object[] { Color.FromArgb(255, 0, 9, 0), -0.25f, Color.FromArgb(255, 0, 4, 0) }; 388yield return new object[] { Color.FromArgb(255, 0, 2, 0), -0.25f, Color.FromArgb(255, 0, 0, 0) }; 389yield return new object[] { Color.FromArgb(255, 0, 0, 0), -0.25f, Color.FromArgb(255, 0, 0, 0) }; 390yield return new object[] { Color.FromArgb(255, 125, 40, 200), -0.25f, Color.FromArgb(255, 102, 33, 165) }; 391yield return new object[] { Color.FromArgb(0, 255, 200, 255), -0.25f, Color.FromArgb(255, 255, 121, 255) }; 392yield return new object[] { SystemColors.ControlDarkDark, -0.25f, Color.FromArgb(255, 87, 87, 87) }; 393yield return new object[] { SystemColors.ControlDark, -0.25f, Color.FromArgb(255, 132, 132, 132) }; 394yield return new object[] { SystemColors.Control, -0.25f, Color.FromArgb(255, 173, 173, 173) }; 395yield return new object[] { SystemColors.ControlLight, -0.25f, Color.FromArgb(255, 188, 188, 188) }; 396yield return new object[] { SystemColors.ControlLightLight, -0.25f, Color.FromArgb(255, 212, 212, 212) }; 398yield return new object[] { Color.FromArgb(255, 255, 0, 0), 0f, Color.FromArgb(255, 170, 0, 0) }; 399yield return new object[] { Color.FromArgb(255, 0, 255, 0), 0f, Color.FromArgb(255, 0, 170, 0) }; 400yield return new object[] { Color.FromArgb(255, 0, 0, 255), 0f, Color.FromArgb(255, 0, 0, 170) }; 401yield return new object[] { Color.FromArgb(255, 255, 255, 0), 0f, Color.FromArgb(255, 170, 170, 0) }; 402yield return new object[] { Color.FromArgb(255, 255, 0, 255), 0f, Color.FromArgb(255, 170, 0, 170) }; 403yield return new object[] { Color.FromArgb(255, 0, 255, 255), 0f, Color.FromArgb(255, 0, 170, 170) }; 404yield return new object[] { Color.FromArgb(255, 255, 255, 255), 0f, Color.FromArgb(255, 170, 170, 170) }; 405yield return new object[] { Color.FromArgb(255, 0, 85, 0), 0f, Color.FromArgb(255, 0, 55, 0) }; 406yield return new object[] { Color.FromArgb(255, 0, 28, 0), 0f, Color.FromArgb(255, 0, 17, 0) }; 407yield return new object[] { Color.FromArgb(255, 0, 9, 0), 0f, Color.FromArgb(255, 0, 4, 0) }; 408yield return new object[] { Color.FromArgb(255, 0, 2, 0), 0f, Color.FromArgb(255, 0, 0, 0) }; 409yield return new object[] { Color.FromArgb(255, 0, 0, 0), 0f, Color.FromArgb(255, 0, 0, 0) }; 410yield return new object[] { Color.FromArgb(255, 125, 40, 200), 0f, Color.FromArgb(255, 83, 27, 133) }; 411yield return new object[] { Color.FromArgb(0, 255, 200, 255), 0f, Color.FromArgb(255, 255, 47, 255) }; 412yield return new object[] { SystemColors.ControlDarkDark, 0f, Color.FromArgb(255, 70, 70, 70) }; 413yield return new object[] { SystemColors.ControlDark, 0f, Color.FromArgb(255, 106, 106, 106) }; 415yield return new object[] { SystemColors.ControlLight, 0f, Color.FromArgb(255, 150, 150, 150) }; 416yield return new object[] { SystemColors.ControlLightLight, 0f, Color.FromArgb(255, 170, 170, 170) }; 418yield return new object[] { Color.FromArgb(255, 255, 0, 0), 0.25f, Color.FromArgb(255, 128, 0, 0) }; 419yield return new object[] { Color.FromArgb(255, 0, 255, 0), 0.25f, Color.FromArgb(255, 0, 128, 0) }; 420yield return new object[] { Color.FromArgb(255, 0, 0, 255), 0.25f, Color.FromArgb(255, 0, 0, 128) }; 421yield return new object[] { Color.FromArgb(255, 255, 255, 0), 0.25f, Color.FromArgb(255, 128, 128, 0) }; 422yield return new object[] { Color.FromArgb(255, 255, 0, 255), 0.25f, Color.FromArgb(255, 128, 0, 128) }; 423yield return new object[] { Color.FromArgb(255, 0, 255, 255), 0.25f, Color.FromArgb(255, 0, 128, 128) }; 424yield return new object[] { Color.FromArgb(255, 255, 255, 255), 0.25f, Color.FromArgb(255, 127, 127, 127) }; 425yield return new object[] { Color.FromArgb(255, 0, 85, 0), 0.25f, Color.FromArgb(255, 0, 43, 0) }; 426yield return new object[] { Color.FromArgb(255, 0, 28, 0), 0.25f, Color.FromArgb(255, 0, 13, 0) }; 427yield return new object[] { Color.FromArgb(255, 0, 9, 0), 0.25f, Color.FromArgb(255, 0, 4, 0) }; 428yield return new object[] { Color.FromArgb(255, 0, 2, 0), 0.25f, Color.FromArgb(255, 0, 0, 0) }; 429yield return new object[] { Color.FromArgb(255, 0, 0, 0), 0.25f, Color.FromArgb(255, 0, 0, 0) }; 430yield return new object[] { Color.FromArgb(255, 125, 40, 200), 0.25f, Color.FromArgb(255, 63, 20, 101) }; 431yield return new object[] { Color.FromArgb(0, 255, 200, 255), 0.25f, Color.FromArgb(255, 227, 0, 227) }; 432yield return new object[] { SystemColors.ControlDarkDark, 0.25f, Color.FromArgb(255, 53, 53, 53) }; 433yield return new object[] { SystemColors.ControlDark, 0.25f, Color.FromArgb(255, 79, 79, 79) }; 434yield return new object[] { SystemColors.Control, 0.25f, Color.FromArgb(255, 147, 147, 147) }; 435yield return new object[] { SystemColors.ControlLight, 0.25f, Color.FromArgb(255, 113, 113, 113) }; 436yield return new object[] { SystemColors.ControlLightLight, 0.25f, Color.FromArgb(255, 127, 127, 127) }; 438yield return new object[] { Color.FromArgb(255, 255, 0, 0), 0.5f, Color.FromArgb(255, 85, 0, 0) }; 439yield return new object[] { Color.FromArgb(255, 0, 255, 0), 0.5f, Color.FromArgb(255, 0, 85, 0) }; 440yield return new object[] { Color.FromArgb(255, 0, 0, 255), 0.5f, Color.FromArgb(255, 0, 0, 85) }; 441yield return new object[] { Color.FromArgb(255, 255, 255, 0), 0.5f, Color.FromArgb(255, 85, 85, 0) }; 442yield return new object[] { Color.FromArgb(255, 255, 0, 255), 0.5f, Color.FromArgb(255, 85, 0, 85) }; 443yield return new object[] { Color.FromArgb(255, 0, 255, 255), 0.5f, Color.FromArgb(255, 0, 85, 85) }; 444yield return new object[] { Color.FromArgb(255, 255, 255, 255), 0.5f, Color.FromArgb(255, 85, 85, 85) }; 445yield return new object[] { Color.FromArgb(255, 0, 85, 0), 0.5f, Color.FromArgb(255, 0, 28, 0) }; 446yield return new object[] { Color.FromArgb(255, 0, 28, 0), 0.5f, Color.FromArgb(255, 0, 9, 0) }; 447yield return new object[] { Color.FromArgb(255, 0, 9, 0), 0.5f, Color.FromArgb(255, 0, 2, 0) }; 448yield return new object[] { Color.FromArgb(255, 0, 2, 0), 0.5f, Color.FromArgb(255, 0, 0, 0) }; 449yield return new object[] { Color.FromArgb(255, 0, 0, 0), 0.5f, Color.FromArgb(255, 0, 0, 0) }; 450yield return new object[] { Color.FromArgb(255, 125, 40, 200), 0.5f, Color.FromArgb(255, 41, 14, 67) }; 451yield return new object[] { Color.FromArgb(0, 255, 200, 255), 0.5f, Color.FromArgb(255, 151, 0, 151) }; 452yield return new object[] { SystemColors.ControlDarkDark, 0.5f, Color.FromArgb(255, 35, 35, 35) }; 453yield return new object[] { SystemColors.ControlDark, 0.5f, Color.FromArgb(255, 53, 53, 53) }; 454yield return new object[] { SystemColors.Control, 0.5f, Color.FromArgb(255, 133, 133, 133) }; 455yield return new object[] { SystemColors.ControlLight, 0.5f, Color.FromArgb(255, 75, 75, 75) }; 456yield return new object[] { SystemColors.ControlLightLight, 0.5f, Color.FromArgb(255, 85, 85, 85) }; 458yield return new object[] { Color.FromArgb(255, 255, 0, 0), 1f, Color.FromArgb(255, 0, 0, 0) }; 459yield return new object[] { Color.FromArgb(255, 0, 255, 0), 1f, Color.FromArgb(255, 0, 0, 0) }; 460yield return new object[] { Color.FromArgb(255, 0, 0, 255), 1f, Color.FromArgb(255, 0, 0, 0) }; 461yield return new object[] { Color.FromArgb(255, 255, 255, 0), 1f, Color.FromArgb(255, 0, 0, 0) }; 462yield return new object[] { Color.FromArgb(255, 255, 0, 255), 1f, Color.FromArgb(255, 0, 0, 0) }; 463yield return new object[] { Color.FromArgb(255, 0, 255, 255), 1f, Color.FromArgb(255, 0, 0, 0) }; 464yield return new object[] { Color.FromArgb(255, 255, 255, 255), 1f, Color.FromArgb(255, 0, 0, 0) }; 465yield return new object[] { Color.FromArgb(255, 0, 85, 0), 1f, Color.FromArgb(255, 0, 0, 0) }; 466yield return new object[] { Color.FromArgb(255, 0, 28, 0), 1f, Color.FromArgb(255, 0, 0, 0) }; 467yield return new object[] { Color.FromArgb(255, 0, 9, 0), 1f, Color.FromArgb(255, 0, 0, 0) }; 468yield return new object[] { Color.FromArgb(255, 0, 2, 0), 1f, Color.FromArgb(255, 0, 0, 0) }; 469yield return new object[] { Color.FromArgb(255, 0, 0, 0), 1f, Color.FromArgb(255, 0, 0, 0) }; 470yield return new object[] { Color.FromArgb(255, 125, 40, 200), 1f, Color.FromArgb(255, 0, 0, 0) }; 471yield return new object[] { Color.FromArgb(0, 255, 200, 255), 1f, Color.FromArgb(255, 0, 0, 0) }; 472yield return new object[] { SystemColors.ControlDarkDark, 1f, Color.FromArgb(255, 0, 0, 0) }; 473yield return new object[] { SystemColors.ControlDark, 1f, Color.FromArgb(255, 0, 0, 0) }; 475yield return new object[] { SystemColors.ControlLight, 1f, Color.FromArgb(255, 0, 0, 0) }; 476yield return new object[] { SystemColors.ControlLightLight, 1f, Color.FromArgb(255, 0, 0, 0) }; 478yield return new object[] { Color.FromArgb(255, 255, 0, 0), 1.5f, Color.FromArgb(255, 173, 0, 0) }; 479yield return new object[] { Color.FromArgb(255, 0, 255, 0), 1.5f, Color.FromArgb(255, 0, 173, 0) }; 480yield return new object[] { Color.FromArgb(255, 0, 0, 255), 1.5f, Color.FromArgb(255, 0, 0, 173) }; 481yield return new object[] { Color.FromArgb(255, 255, 255, 0), 1.5f, Color.FromArgb(255, 174, 173, 0) }; 482yield return new object[] { Color.FromArgb(255, 255, 0, 255), 1.5f, Color.FromArgb(255, 173, 0, 174) }; 483yield return new object[] { Color.FromArgb(255, 0, 255, 255), 1.5f, Color.FromArgb(255, 0, 174, 173) }; 484yield return new object[] { Color.FromArgb(255, 255, 255, 255), 1.5f, Color.FromArgb(255, 171, 171, 171) }; 485yield return new object[] { Color.FromArgb(255, 0, 85, 0), 1.5f, Color.FromArgb(255, 0, 230, 0) }; 486yield return new object[] { Color.FromArgb(255, 0, 28, 0), 1.5f, Color.FromArgb(255, 0, 250, 0) }; 487yield return new object[] { Color.FromArgb(255, 0, 9, 0), 1.5f, Color.FromArgb(255, 0, 0, 0) }; 488yield return new object[] { Color.FromArgb(255, 0, 2, 0), 1.5f, Color.FromArgb(255, 0, 0, 0) }; 489yield return new object[] { Color.FromArgb(255, 0, 0, 0), 1.5f, Color.FromArgb(255, 0, 0, 0) }; 490yield return new object[] { Color.FromArgb(255, 125, 40, 200), 1.5f, Color.FromArgb(255, 218, 243, 192) }; 491yield return new object[] { Color.FromArgb(0, 255, 200, 255), 1.5f, Color.FromArgb(255, 107, 0, 108) }; 492yield return new object[] { SystemColors.ControlDarkDark, 1.5f, Color.FromArgb(255, 221, 221, 221) }; 493yield return new object[] { SystemColors.ControlDark, 1.5f, Color.FromArgb(255, 203, 203, 203) }; 494yield return new object[] { SystemColors.Control, 1.5f, Color.FromArgb(255, 78, 78, 78) }; 495yield return new object[] { SystemColors.ControlLight, 1.5f, Color.FromArgb(255, 181, 181, 181) }; 500private void ControlPaint_Dark_InvokeColorFloat_ReturnsExpected(Color baseColor, float percOfDarkDark, Color expected) 510yield return new object[] { Color.FromArgb(255, 255, 0, 0), Color.FromArgb(255, 0, 0, 0) }; 511yield return new object[] { Color.FromArgb(255, 0, 255, 0), Color.FromArgb(255, 0, 0, 0) }; 512yield return new object[] { Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 0, 0, 0) }; 513yield return new object[] { Color.FromArgb(255, 255, 255, 0), Color.FromArgb(255, 0, 0, 0) }; 514yield return new object[] { Color.FromArgb(255, 255, 0, 255), Color.FromArgb(255, 0, 0, 0) }; 515yield return new object[] { Color.FromArgb(255, 0, 255, 255), Color.FromArgb(255, 0, 0, 0) }; 516yield return new object[] { Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 0, 0, 0) }; 517yield return new object[] { Color.FromArgb(255, 0, 85, 0), Color.FromArgb(255, 0, 0, 0) }; 518yield return new object[] { Color.FromArgb(255, 0, 28, 0), Color.FromArgb(255, 0, 0, 0) }; 519yield return new object[] { Color.FromArgb(255, 0, 9, 0), Color.FromArgb(255, 0, 0, 0) }; 520yield return new object[] { Color.FromArgb(255, 0, 2, 0), Color.FromArgb(255, 0, 0, 0) }; 521yield return new object[] { Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 0, 0, 0) }; 522yield return new object[] { Color.FromArgb(255, 125, 40, 200), Color.FromArgb(255, 0, 0, 0) }; 523yield return new object[] { Color.FromArgb(0, 255, 200, 255), Color.FromArgb(255, 0, 0, 0) }; 524yield return new object[] { SystemColors.ControlDarkDark, Color.FromArgb(255, 0, 0, 0) }; 525yield return new object[] { SystemColors.ControlDark, Color.FromArgb(255, 0, 0, 0) }; 527yield return new object[] { SystemColors.ControlLight, Color.FromArgb(255, 0, 0, 0) }; 528yield return new object[] { SystemColors.ControlLightLight, Color.FromArgb(255, 0, 0, 0) }; 533private void ControlPaint_DarkDark_InvokeColorFloat_ReturnsExpected(Color baseColor, Color expected) 542yield return new object[] { Rectangle.Empty, Color.Empty, style }; 543yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Empty, style }; 544yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, style }; 548yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Black, style }; 549yield return new object[] { new Rectangle(1, 2, 3, 4), Color.White, style }; 550yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Transparent, style }; 551yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Empty, style }; 552yield return new object[] { new Rectangle(1, 2, 4, 3), Color.Red, style }; 553yield return new object[] { new Rectangle(1, 2, 3, 3), Color.Red, style }; 559public void ControlPaint_DrawBorder_GraphicsRectangleColorButtonBorderStyle_Success(Rectangle bounds, Color color, ButtonBorderStyle style) 576ControlPaint.DrawBorder(graphics, new Rectangle(1, 2, 3, 4), Color.Red, style); 579ControlPaint.DrawBorder(graphics, new Rectangle(1, 2, 3, 4), Color.Red, style); 586yield 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 }; 587yield return new object[] { Rectangle.Empty, Color.Red, 1, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 588yield 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 }; 590yield 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 }; 591yield 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 }; 592yield 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 }; 593yield 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 }; 594yield 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 }; 595yield 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 }; 596yield 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 }; 597yield 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 }; 599yield 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 }; 600yield 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 }; 601yield 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 }; 602yield 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 }; 604yield 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 }; 605yield 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 }; 607yield 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 }; 615Color leftColor, int leftWidth, ButtonBorderStyle leftStyle, 616Color topColor, int topWidth, ButtonBorderStyle topStyle, 617Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, 618Color bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle) 632yield 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 }; 633yield 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 }; 634yield 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 }; 635yield 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 }; 636yield 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 }; 637yield 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 }; 638yield 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 }; 639yield 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 }; 641yield 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 }; 642yield 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 }; 643yield 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 }; 644yield 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 }; 646yield 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 }; 647yield 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 }; 649yield 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 }; 657Color leftColor, int leftWidth, ButtonBorderStyle leftStyle, 658Color topColor, int topWidth, ButtonBorderStyle topStyle, 659Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, 660Color bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle) 675Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder(null, new Rectangle(1, 2, 3, 4), Color.Red, style)); 683Assert.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)); 1187yield return new object[] { Rectangle.Empty, Color.Red, Color.Blue }; 1188yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Red, Color.Blue }; 1189yield return new object[] { new Rectangle(0, 0, 3, 4), Color.Red, Color.Blue }; 1190yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Blue }; 1191yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Black, Color.Blue }; 1192yield return new object[] { new Rectangle(1, 2, 3, 4), Color.White, Color.Blue }; 1193yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Empty, Color.Blue }; 1194yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Transparent, Color.Blue }; 1195yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Black }; 1196yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.White }; 1197yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Empty }; 1198yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Transparent }; 1199yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Red }; 1200yield return new object[] { new Rectangle(1, 2, 4, 3), Color.Red, Color.Blue }; 1201yield return new object[] { new Rectangle(1, 2, 3, 3), Color.Red, Color.Blue }; 1206public void ControlPaint_DrawFocusRectangle_Invoke_Success(Rectangle rectangle, Color foreColor, Color backColor) 1220Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawFocusRectangle(null, new Rectangle(1, 2, 3, 4), Color.Red, Color.Blue)); 1263yield return new object[] { Rectangle.Empty, new Size(1, 1), Color.Red }; 1264yield return new object[] { new Rectangle(1, 2, -3, -4), new Size(1, 1), Color.Red }; 1265yield return new object[] { new Rectangle(0, 0, 3, 4), new Size(1, 1), Color.Red }; 1266yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Red }; 1267yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Black }; 1268yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.White }; 1269yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Empty }; 1270yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Transparent }; 1271yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(10, 20), Color.Red }; 1272yield return new object[] { new Rectangle(1, 2, 4, 3), new Size(10, 20), Color.Red }; 1273yield return new object[] { new Rectangle(1, 2, 3, 3), new Size(10, 20), Color.Red }; 1278public void ControlPaint_DrawGrid_Invoke_Success(Rectangle area, Size pixelsBetweenDots, Color backColor) 1291Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawGrid(null, new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Red)); 1303Assert.Throws<ArgumentOutOfRangeException>("pixelsBetweenDots", () => ControlPaint.DrawGrid(graphics, new Rectangle(0, 0, width, height), new Size(width, height), Color.Red)); 1308yield return new object[] { new Bitmap(10, 10), -10, -20, Color.Red }; 1309yield return new object[] { new Bitmap(10, 10), 0, 0, Color.Red }; 1310yield return new object[] { new Bitmap(10, 10), 1, 2, Color.Red }; 1311yield return new object[] { new Bitmap(10, 10), 0, 0, Color.Black }; 1312yield return new object[] { new Bitmap(10, 10), 0, 0, Color.White }; 1313yield return new object[] { new Bitmap(10, 10), 0, 0, Color.Transparent }; 1314yield return new object[] { new Bitmap(10, 10), 0, 0, Color.Empty }; 1316yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), -10, -20, Color.Red }; 1317yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0, Color.Red }; 1318yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 1, 2, Color.Red }; 1319yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0, Color.Black }; 1320yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0, Color.White }; 1321yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0, Color.Transparent }; 1322yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0, Color.Empty }; 1327public void ControlPaint_DrawImageDisabled_Invoke_Success(Image image, int x, int y, Color background) 1341Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawImageDisabled(null, image, 0, 0, Color.Red)); 1349Assert.Throws<NullReferenceException>(() => ControlPaint.DrawImageDisabled(graphics, null, 0, 0, Color.Red)); 1412yield return new object[] { new Rectangle(0, 0, 3, 4), glyph, Color.Red, Color.Blue }; 1413yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Blue }; 1414yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Black, Color.Blue }; 1415yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.White, Color.Blue }; 1416yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Empty, Color.Blue }; 1417yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Transparent, Color.Blue }; 1418yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Black }; 1419yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.White }; 1420yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Empty }; 1421yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Transparent }; 1422yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Red }; 1423yield return new object[] { new Rectangle(1, 2, 4, 3), glyph, Color.Red, Color.Red }; 1424yield return new object[] { new Rectangle(1, 2, 3, 3), glyph, Color.Red, Color.Red }; 1430public void ControlPaint_DrawMenuGlyph_InvokeGraphicsRectangleMenuGlyphColorColor_Success(Rectangle rectangle, MenuGlyph glyph, Color foreColor, Color backColor) 1454public void ControlPaint_DrawMenuGlyph_InvokeGraphicsIntIntIntIntMenuGlyphColorColor_Success(Rectangle rectangle, MenuGlyph glyph, Color foreColor, Color backColor) 1680yield return new object[] { Rectangle.Empty, Color.Empty, style }; 1681yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Empty, style }; 1682yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, style }; 1686yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Black, style }; 1687yield return new object[] { new Rectangle(1, 2, 3, 4), Color.White, style }; 1688yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Transparent, style }; 1689yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Empty, style }; 1690yield return new object[] { new Rectangle(1, 2, 4, 3), Color.Red, style }; 1691yield return new object[] { new Rectangle(1, 2, 3, 3), Color.Red, style }; 1697public void ControlPaint_DrawReversibleFrame_Invoke_Success(Rectangle rectangle, Color backColor, FrameStyle style) 1707yield return new object[] { Point.Empty, Point.Empty, Color.Red }; 1708yield return new object[] { new Point(1, 2), new Point(1, 2), Color.Red }; 1709yield return new object[] { new Point(2, 3), new Point(1, 2), Color.Red }; 1710yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Empty }; 1711yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Red }; 1715yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Black }; 1716yield return new object[] { new Point(1, 2), new Point(2, 3), Color.White }; 1717yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Transparent }; 1718yield return new object[] { new Point(1, 2), new Point(2, 3), Color.Empty }; 1723public void ControlPaint_DrawReversibleLine_Invoke_Success(Point start, Point end, Color backColor) 1818yield return new object[] { active, Rectangle.Empty, Rectangle.Empty, Color.Red }; 1819yield return new object[] { active, new Rectangle(1, 2, -3, -4), new Rectangle(1, 2, -3, -4), Color.Red }; 1820yield return new object[] { active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), Color.Red }; 1821yield return new object[] { active, new Rectangle(1, 2, 3, 4), new Rectangle(0, 1, 4, 5), Color.Red }; 1822yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.Red }; 1823yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.Black }; 1824yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.White }; 1825yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.Transparent }; 1826yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.Empty }; 1832public void ControlPaint_DrawSelectionFrame_Invoke_Success(bool active, Rectangle outsideRect, Rectangle insideRect, Color backColor) 1847Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSelectionFrame(null, active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), Color.Red)); 1852yield return new object[] { Color.Red, Rectangle.Empty }; 1853yield return new object[] { Color.Red, new Rectangle(1, 2, -3, -4) }; 1854yield return new object[] { Color.Red, new Rectangle(0, 0, 3, 4) }; 1855yield return new object[] { Color.Red, new Rectangle(1, 2, 3, 4) }; 1856yield return new object[] { Color.Black, new Rectangle(1, 2, 3, 4) }; 1857yield return new object[] { Color.White, new Rectangle(1, 2, 3, 4) }; 1858yield return new object[] { Color.Empty, new Rectangle(1, 2, 3, 4) }; 1859yield return new object[] { Color.Transparent, new Rectangle(1, 2, 3, 4) }; 1860yield return new object[] { Color.Red, new Rectangle(1, 2, 3, 4) }; 1861yield return new object[] { Color.Red, new Rectangle(1, 2, 3, 4) }; 1862yield return new object[] { Color.Red, new Rectangle(1, 2, 4, 3) }; 1867public void ControlPaint_DrawSizeGrip_InvokeGraphicsColorRectangle_Success(Color backColor, Rectangle rectangle) 1879public void ControlPaint_DrawSizeGrip_InvokeGraphicsColorIntIntIntInt_Success(Color backColor, Rectangle rectangle) 1892Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null, Color.Red, new Rectangle(1, 2, 3, 4))); 1893Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null, Color.Red, 1, 2, 3, 4)); 1900yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), null }; 1901yield return new object[] { s, SystemFonts.MenuFont, Color.Red, RectangleF.Empty, new StringFormat() }; 1902yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, -3, -4), new StringFormat() }; 1903yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1904yield return new object[] { s, SystemFonts.MenuFont, Color.Black, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1905yield return new object[] { s, SystemFonts.MenuFont, Color.White, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1906yield return new object[] { s, SystemFonts.MenuFont, Color.Transparent, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1907yield return new object[] { s, SystemFonts.MenuFont, Color.Empty, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1914string s, Font font, Color color, 1931ControlPaint.DrawStringDisabled(graphics, s, null, Color.Red, new RectangleF(1, 2, 3, 4), null); 1934ControlPaint.DrawStringDisabled(graphics, s, null, Color.Red, new RectangleF(1, 2, 3, 4), null); 1941Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat())); 1948yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default }; 1949yield return new object[] { s, SystemFonts.MenuFont, Color.Red, Rectangle.Empty, TextFormatFlags.VerticalCenter }; 1950yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, -3, -4), TextFormatFlags.VerticalCenter }; 1951yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1952yield return new object[] { s, SystemFonts.MenuFont, Color.Black, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1953yield return new object[] { s, SystemFonts.MenuFont, Color.White, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1954yield return new object[] { s, SystemFonts.MenuFont, Color.Transparent, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1955yield return new object[] { s, SystemFonts.MenuFont, Color.Empty, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1962string s, Font font, Color color, 1977Assert.Throws<ArgumentNullException>("dc", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default)); 2010yield return new object[] { Rectangle.Empty, Color.Red }; 2011yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Red }; 2012yield return new object[] { new Rectangle(0, 0, 3, 4), Color.Red }; 2013yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red }; 2014yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Black }; 2015yield return new object[] { new Rectangle(1, 2, 3, 4), Color.White }; 2016yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Empty }; 2017yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Transparent }; 2018yield return new object[] { new Rectangle(1, 2, 4, 3), Color.Red }; 2019yield return new object[] { new Rectangle(1, 2, 3, 3), Color.Red }; 2024public void ControlPaint_FillReversibleRectangle_Invoke_Success(Rectangle rectangle, Color backColor) 2034yield return new object[] { Color.White, false }; 2035yield return new object[] { Color.Black, true }; 2040public void ControlPaint_IsDark(Color color, bool expected) 2049yield return new object[] { Color.FromArgb(255, 255, 0, 0), Color.FromArgb(255, 255, 64, 64) }; 2050yield return new object[] { Color.FromArgb(255, 0, 255, 0), Color.FromArgb(255, 64, 255, 64) }; 2051yield return new object[] { Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 64, 64, 255) }; 2052yield return new object[] { Color.FromArgb(255, 255, 255, 0), Color.FromArgb(255, 255, 255, 64) }; 2053yield return new object[] { Color.FromArgb(255, 255, 0, 255), Color.FromArgb(255, 255, 64, 255) }; 2054yield return new object[] { Color.FromArgb(255, 0, 255, 255), Color.FromArgb(255, 64, 255, 255) }; 2055yield return new object[] { Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255) }; 2056yield return new object[] { Color.FromArgb(255, 0, 85, 0), Color.FromArgb(255, 0, 191, 0) }; 2057yield return new object[] { Color.FromArgb(255, 0, 28, 0), Color.FromArgb(255, 0, 149, 0) }; 2058yield return new object[] { Color.FromArgb(255, 0, 9, 0), Color.FromArgb(255, 0, 134, 0) }; 2059yield return new object[] { Color.FromArgb(255, 0, 2, 0), Color.FromArgb(255, 0, 130, 0) }; 2060yield return new object[] { Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 63, 63, 63) }; 2061yield return new object[] { Color.FromArgb(255, 125, 40, 200), Color.FromArgb(255, 157, 87, 221) }; 2062yield return new object[] { Color.FromArgb(0, 255, 200, 255), Color.FromArgb(255, 255, 213, 255) }; 2063yield return new object[] { SystemColors.ControlDarkDark, Color.FromArgb(255, 142, 142, 142) }; 2064yield return new object[] { SystemColors.ControlDark, Color.FromArgb(255, 183, 183, 183) }; 2065yield return new object[] { SystemColors.Control, Color.FromArgb(255, 241, 241, 241) }; 2066yield return new object[] { SystemColors.ControlLight, Color.FromArgb(255, 233, 233, 233) }; 2067yield return new object[] { SystemColors.ControlLightLight, Color.FromArgb(255, 255, 255, 255) }; 2072public void ControlPaint_Light_InvokeColor_ReturnsExpected(Color baseColor, Color expected) 2082yield return new object[] { Color.FromArgb(255, 255, 0, 0), -1.5f, Color.FromArgb(255, 64, 0, 0) }; 2083yield return new object[] { Color.FromArgb(255, 0, 255, 0), -1.5f, Color.FromArgb(255, 0, 64, 0) }; 2084yield return new object[] { Color.FromArgb(255, 0, 0, 255), -1.5f, Color.FromArgb(255, 0, 0, 64) }; 2085yield return new object[] { Color.FromArgb(255, 255, 255, 0), -1.5f, Color.FromArgb(255, 64, 64, 0) }; 2086yield return new object[] { Color.FromArgb(255, 255, 0, 255), -1.5f, Color.FromArgb(255, 64, 0, 64) }; 2087yield return new object[] { Color.FromArgb(255, 0, 255, 255), -1.5f, Color.FromArgb(255, 0, 64, 64) }; 2088yield return new object[] { Color.FromArgb(255, 255, 255, 255), -1.5f, Color.FromArgb(255, 255, 255, 255) }; 2089yield return new object[] { Color.FromArgb(255, 0, 85, 0), -1.5f, Color.FromArgb(255, 0, 24, 0) }; 2090yield return new object[] { Color.FromArgb(255, 0, 28, 0), -1.5f, Color.FromArgb(255, 0, 178, 0) }; 2091yield return new object[] { Color.FromArgb(255, 0, 9, 0), -1.5f, Color.FromArgb(255, 0, 146, 0) }; 2092yield return new object[] { Color.FromArgb(255, 0, 2, 0), -1.5f, Color.FromArgb(255, 0, 134, 0) }; 2093yield return new object[] { Color.FromArgb(255, 0, 0, 0), -1.5f, Color.FromArgb(255, 65, 65, 65) }; 2094yield return new object[] { Color.FromArgb(255, 125, 40, 200), -1.5f, Color.FromArgb(255, 19, 6, 30) }; 2095yield return new object[] { Color.FromArgb(0, 255, 200, 255), -1.5f, Color.FromArgb(255, 255, 159, 255) }; 2096yield return new object[] { SystemColors.ControlDarkDark, -1.5f, Color.FromArgb(255, 249, 249, 249) }; 2097yield return new object[] { SystemColors.ControlDark, -1.5f, Color.FromArgb(255, 89, 89, 89) }; 2098yield return new object[] { SystemColors.Control, -1.5f, Color.FromArgb(255, 185, 185, 185) }; 2099yield return new object[] { SystemColors.ControlLight, -1.5f, Color.FromArgb(255, 207, 207, 207) }; 2100yield return new object[] { SystemColors.ControlLightLight, -1.5f, Color.FromArgb(255, 255, 255, 255) }; 2102yield return new object[] { Color.FromArgb(255, 255, 0, 0), -1f, Color.FromArgb(255, 128, 0, 0) }; 2103yield return new object[] { Color.FromArgb(255, 0, 255, 0), -1f, Color.FromArgb(255, 0, 128, 0) }; 2104yield return new object[] { Color.FromArgb(255, 0, 0, 255), -1f, Color.FromArgb(255, 0, 0, 128) }; 2105yield return new object[] { Color.FromArgb(255, 255, 255, 0), -1f, Color.FromArgb(255, 128, 128, 0) }; 2106yield return new object[] { Color.FromArgb(255, 255, 0, 255), -1f, Color.FromArgb(255, 128, 0, 128) }; 2107yield return new object[] { Color.FromArgb(255, 0, 255, 255), -1f, Color.FromArgb(255, 0, 128, 128) }; 2108yield return new object[] { Color.FromArgb(255, 255, 255, 255), -1f, Color.FromArgb(255, 255, 255, 255) }; 2109yield return new object[] { Color.FromArgb(255, 0, 85, 0), -1f, Color.FromArgb(255, 0, 131, 0) }; 2110yield return new object[] { Color.FromArgb(255, 0, 28, 0), -1f, Color.FromArgb(255, 0, 43, 0) }; 2111yield return new object[] { Color.FromArgb(255, 0, 9, 0), -1f, Color.FromArgb(255, 0, 16, 0) }; 2112yield return new object[] { Color.FromArgb(255, 0, 2, 0), -1f, Color.FromArgb(255, 0, 5, 0) }; 2113yield return new object[] { Color.FromArgb(255, 0, 0, 0), -1f, Color.FromArgb(255, 129, 129, 129) }; 2114yield return new object[] { Color.FromArgb(255, 125, 40, 200), -1f, Color.FromArgb(255, 54, 17, 87) }; 2115yield return new object[] { Color.FromArgb(0, 255, 200, 255), -1f, Color.FromArgb(255, 255, 172, 255) }; 2116yield return new object[] { SystemColors.ControlDarkDark, -1f, Color.FromArgb(255, 29, 29, 29) }; 2117yield return new object[] { SystemColors.ControlDark, -1f, Color.FromArgb(255, 112, 112, 112) }; 2118yield return new object[] { SystemColors.Control, -1f, Color.FromArgb(255, 199, 199, 199) }; 2119yield return new object[] { SystemColors.ControlLight, -1f, Color.FromArgb(255, 213, 213, 213) }; 2120yield return new object[] { SystemColors.ControlLightLight, -1f, Color.FromArgb(255, 255, 255, 255) }; 2122yield return new object[] { Color.FromArgb(255, 255, 0, 0), -0.5f, Color.FromArgb(255, 191, 0, 0) }; 2123yield return new object[] { Color.FromArgb(255, 0, 255, 0), -0.5f, Color.FromArgb(255, 0, 191, 0) }; 2124yield return new object[] { Color.FromArgb(255, 0, 0, 255), -0.5f, Color.FromArgb(255, 0, 0, 191) }; 2125yield return new object[] { Color.FromArgb(255, 255, 255, 0), -0.5f, Color.FromArgb(255, 191, 191, 0) }; 2126yield return new object[] { Color.FromArgb(255, 255, 0, 255), -0.5f, Color.FromArgb(255, 191, 0, 191) }; 2127yield return new object[] { Color.FromArgb(255, 0, 255, 255), -0.5f, Color.FromArgb(255, 0, 191, 191) }; 2128yield return new object[] { Color.FromArgb(255, 255, 255, 255), -0.5f, Color.FromArgb(255, 255, 255, 255) }; 2129yield return new object[] { Color.FromArgb(255, 0, 85, 0), -0.5f, Color.FromArgb(255, 0, 237, 0) }; 2130yield return new object[] { Color.FromArgb(255, 0, 28, 0), -0.5f, Color.FromArgb(255, 0, 165, 0) }; 2131yield return new object[] { Color.FromArgb(255, 0, 9, 0), -0.5f, Color.FromArgb(255, 0, 141, 0) }; 2132yield return new object[] { Color.FromArgb(255, 0, 2, 0), -0.5f, Color.FromArgb(255, 0, 133, 0) }; 2133yield return new object[] { Color.FromArgb(255, 0, 0, 0), -0.5f, Color.FromArgb(255, 193, 193, 193) }; 2134yield return new object[] { Color.FromArgb(255, 125, 40, 200), -0.5f, Color.FromArgb(255, 89, 29, 143) }; 2135yield return new object[] { Color.FromArgb(0, 255, 200, 255), -0.5f, Color.FromArgb(255, 255, 187, 255) }; 2136yield return new object[] { SystemColors.ControlDarkDark, -0.5f, Color.FromArgb(255, 68, 68, 68) }; 2137yield return new object[] { SystemColors.ControlDark, -0.5f, Color.FromArgb(255, 137, 137, 137) }; 2138yield return new object[] { SystemColors.Control, -0.5f, Color.FromArgb(255, 213, 213, 213) }; 2139yield return new object[] { SystemColors.ControlLight, -0.5f, Color.FromArgb(255, 221, 221, 221) }; 2140yield return new object[] { SystemColors.ControlLightLight, -0.5f, Color.FromArgb(255, 255, 255, 255) }; 2142yield return new object[] { Color.FromArgb(255, 255, 0, 0), -0.25f, Color.FromArgb(255, 223, 0, 0) }; 2143yield return new object[] { Color.FromArgb(255, 0, 255, 0), -0.25f, Color.FromArgb(255, 0, 223, 0) }; 2144yield return new object[] { Color.FromArgb(255, 0, 0, 255), -0.25f, Color.FromArgb(255, 0, 0, 223) }; 2145yield return new object[] { Color.FromArgb(255, 255, 255, 0), -0.25f, Color.FromArgb(255, 223, 223, 0) }; 2146yield return new object[] { Color.FromArgb(255, 255, 0, 255), -0.25f, Color.FromArgb(255, 223, 0, 223) }; 2147yield return new object[] { Color.FromArgb(255, 0, 255, 255), -0.25f, Color.FromArgb(255, 0, 223, 223) }; 2148yield return new object[] { Color.FromArgb(255, 255, 255, 255), -0.25f, Color.FromArgb(255, 255, 255, 255) }; 2149yield return new object[] { Color.FromArgb(255, 0, 85, 0), -0.25f, Color.FromArgb(255, 0, 32, 0) }; 2150yield return new object[] { Color.FromArgb(255, 0, 28, 0), -0.25f, Color.FromArgb(255, 0, 226, 0) }; 2151yield return new object[] { Color.FromArgb(255, 0, 9, 0), -0.25f, Color.FromArgb(255, 0, 205, 0) }; 2152yield return new object[] { Color.FromArgb(255, 0, 2, 0), -0.25f, Color.FromArgb(255, 0, 196, 0) }; 2153yield return new object[] { Color.FromArgb(255, 0, 0, 0), -0.25f, Color.FromArgb(255, 225, 225, 225) }; 2154yield return new object[] { Color.FromArgb(255, 125, 40, 200), -0.25f, Color.FromArgb(255, 106, 34, 172) }; 2155yield return new object[] { Color.FromArgb(0, 255, 200, 255), -0.25f, Color.FromArgb(255, 255, 193, 255) }; 2156yield return new object[] { SystemColors.ControlDarkDark, -0.25f, Color.FromArgb(255, 87, 87, 87) }; 2157yield return new object[] { SystemColors.ControlDark, -0.25f, Color.FromArgb(255, 148, 148, 148) }; 2158yield return new object[] { SystemColors.Control, -0.25f, Color.FromArgb(255, 220, 220, 220) }; 2159yield return new object[] { SystemColors.ControlLight, -0.25f, Color.FromArgb(255, 224, 224, 224) }; 2160yield return new object[] { SystemColors.ControlLightLight, -0.25f, Color.FromArgb(255, 255, 255, 255) }; 2162yield return new object[] { Color.FromArgb(255, 255, 0, 0), 0f, Color.FromArgb(255, 255, 0, 0) }; 2163yield return new object[] { Color.FromArgb(255, 0, 255, 0), 0f, Color.FromArgb(255, 0, 255, 0) }; 2164yield return new object[] { Color.FromArgb(255, 0, 0, 255), 0f, Color.FromArgb(255, 0, 0, 255) }; 2165yield return new object[] { Color.FromArgb(255, 255, 255, 0), 0f, Color.FromArgb(255, 255, 255, 0) }; 2166yield return new object[] { Color.FromArgb(255, 255, 0, 255), 0f, Color.FromArgb(255, 255, 0, 255) }; 2167yield return new object[] { Color.FromArgb(255, 0, 255, 255), 0f, Color.FromArgb(255, 0, 255, 255) }; 2168yield return new object[] { Color.FromArgb(255, 255, 255, 255), 0f, Color.FromArgb(255, 255, 255, 255) }; 2169yield return new object[] { Color.FromArgb(255, 0, 85, 0), 0f, Color.FromArgb(255, 0, 85, 0) }; 2170yield return new object[] { Color.FromArgb(255, 0, 28, 0), 0f, Color.FromArgb(255, 0, 28, 0) }; 2171yield return new object[] { Color.FromArgb(255, 0, 9, 0), 0f, Color.FromArgb(255, 0, 9, 0) }; 2172yield return new object[] { Color.FromArgb(255, 0, 2, 0), 0f, Color.FromArgb(255, 0, 2, 0) }; 2173yield return new object[] { Color.FromArgb(255, 0, 0, 0), 0f, Color.FromArgb(255, 0, 0, 0) }; 2174yield return new object[] { Color.FromArgb(255, 125, 40, 200), 0f, Color.FromArgb(255, 124, 40, 200) }; 2175yield return new object[] { Color.FromArgb(0, 255, 200, 255), 0f, Color.FromArgb(255, 255, 200, 255) }; 2176yield return new object[] { SystemColors.ControlDarkDark, 0f, Color.FromArgb(255, 105, 105, 105) }; 2177yield return new object[] { SystemColors.ControlDark, 0f, Color.FromArgb(255, 160, 160, 160) }; 2179yield return new object[] { SystemColors.ControlLight, 0f, Color.FromArgb(255, 227, 227, 227) }; 2180yield return new object[] { SystemColors.ControlLightLight, 0f, Color.FromArgb(255, 255, 255, 255) }; 2182yield return new object[] { Color.FromArgb(255, 255, 0, 0), 0.25f, Color.FromArgb(255, 255, 32, 32) }; 2183yield return new object[] { Color.FromArgb(255, 0, 255, 0), 0.25f, Color.FromArgb(255, 32, 255, 32) }; 2184yield return new object[] { Color.FromArgb(255, 0, 0, 255), 0.25f, Color.FromArgb(255, 32, 32, 255) }; 2185yield return new object[] { Color.FromArgb(255, 255, 255, 0), 0.25f, Color.FromArgb(255, 255, 255, 32) }; 2186yield return new object[] { Color.FromArgb(255, 255, 0, 255), 0.25f, Color.FromArgb(255, 255, 32, 255) }; 2187yield return new object[] { Color.FromArgb(255, 0, 255, 255), 0.25f, Color.FromArgb(255, 32, 255, 255) }; 2188yield return new object[] { Color.FromArgb(255, 255, 255, 255), 0.25f, Color.FromArgb(255, 255, 255, 255) }; 2189yield return new object[] { Color.FromArgb(255, 0, 85, 0), 0.25f, Color.FromArgb(255, 0, 138, 0) }; 2190yield return new object[] { Color.FromArgb(255, 0, 28, 0), 0.25f, Color.FromArgb(255, 0, 87, 0) }; 2191yield return new object[] { Color.FromArgb(255, 0, 9, 0), 0.25f, Color.FromArgb(255, 0, 70, 0) }; 2192yield return new object[] { Color.FromArgb(255, 0, 2, 0), 0.25f, Color.FromArgb(255, 0, 66, 0) }; 2193yield return new object[] { Color.FromArgb(255, 0, 0, 0), 0.25f, Color.FromArgb(255, 31, 31, 31) }; 2194yield return new object[] { Color.FromArgb(255, 125, 40, 200), 0.25f, Color.FromArgb(255, 141, 58, 216) }; 2195yield return new object[] { Color.FromArgb(0, 255, 200, 255), 0.25f, Color.FromArgb(255, 255, 206, 255) }; 2196yield return new object[] { SystemColors.ControlDarkDark, 0.25f, Color.FromArgb(255, 123, 123, 123) }; 2197yield return new object[] { SystemColors.ControlDark, 0.25f, Color.FromArgb(255, 172, 172, 172) }; 2198yield return new object[] { SystemColors.Control, 0.25f, Color.FromArgb(255, 234, 234, 234) }; 2199yield return new object[] { SystemColors.ControlLight, 0.25f, Color.FromArgb(255, 230, 230, 230) }; 2200yield return new object[] { SystemColors.ControlLightLight, 0.25f, Color.FromArgb(255, 255, 255, 255) }; 2202yield return new object[] { Color.FromArgb(255, 255, 0, 0), 0.5f, Color.FromArgb(255, 255, 64, 64) }; 2203yield return new object[] { Color.FromArgb(255, 0, 255, 0), 0.5f, Color.FromArgb(255, 64, 255, 64) }; 2204yield return new object[] { Color.FromArgb(255, 0, 0, 255), 0.5f, Color.FromArgb(255, 64, 64, 255) }; 2205yield return new object[] { Color.FromArgb(255, 255, 255, 0), 0.5f, Color.FromArgb(255, 255, 255, 64) }; 2206yield return new object[] { Color.FromArgb(255, 255, 0, 255), 0.5f, Color.FromArgb(255, 255, 64, 255) }; 2207yield return new object[] { Color.FromArgb(255, 0, 255, 255), 0.5f, Color.FromArgb(255, 64, 255, 255) }; 2208yield return new object[] { Color.FromArgb(255, 255, 255, 255), 0.5f, Color.FromArgb(255, 255, 255, 255) }; 2209yield return new object[] { Color.FromArgb(255, 0, 85, 0), 0.5f, Color.FromArgb(255, 0, 191, 0) }; 2210yield return new object[] { Color.FromArgb(255, 0, 28, 0), 0.5f, Color.FromArgb(255, 0, 149, 0) }; 2211yield return new object[] { Color.FromArgb(255, 0, 9, 0), 0.5f, Color.FromArgb(255, 0, 134, 0) }; 2212yield return new object[] { Color.FromArgb(255, 0, 2, 0), 0.5f, Color.FromArgb(255, 0, 130, 0) }; 2213yield return new object[] { Color.FromArgb(255, 0, 0, 0), 0.5f, Color.FromArgb(255, 63, 63, 63) }; 2214yield return new object[] { Color.FromArgb(255, 125, 40, 200), 0.5f, Color.FromArgb(255, 157, 87, 221) }; 2215yield return new object[] { Color.FromArgb(0, 255, 200, 255), 0.5f, Color.FromArgb(255, 255, 213, 255) }; 2216yield return new object[] { SystemColors.ControlDarkDark, 0.5f, Color.FromArgb(255, 142, 142, 142) }; 2217yield return new object[] { SystemColors.ControlDark, 0.5f, Color.FromArgb(255, 183, 183, 183) }; 2218yield return new object[] { SystemColors.Control, 0.5f, Color.FromArgb(255, 241, 241, 241) }; 2219yield return new object[] { SystemColors.ControlLight, 0.5f, Color.FromArgb(255, 233, 233, 233) }; 2220yield return new object[] { SystemColors.ControlLightLight, 0.5f, Color.FromArgb(255, 255, 255, 255) }; 2222yield return new object[] { Color.FromArgb(255, 255, 0, 0), 1f, Color.FromArgb(255, 255, 128, 128) }; 2223yield return new object[] { Color.FromArgb(255, 0, 255, 0), 1f, Color.FromArgb(255, 128, 255, 128) }; 2224yield return new object[] { Color.FromArgb(255, 0, 0, 255), 1f, Color.FromArgb(255, 128, 128, 255) }; 2225yield return new object[] { Color.FromArgb(255, 255, 255, 0), 1f, Color.FromArgb(255, 255, 255, 128) }; 2226yield return new object[] { Color.FromArgb(255, 255, 0, 255), 1f, Color.FromArgb(255, 255, 128, 255) }; 2227yield return new object[] { Color.FromArgb(255, 0, 255, 255), 1f, Color.FromArgb(255, 128, 255, 255) }; 2228yield return new object[] { Color.FromArgb(255, 255, 255, 255), 1f, Color.FromArgb(255, 255, 255, 255) }; 2229yield return new object[] { Color.FromArgb(255, 0, 85, 0), 1f, Color.FromArgb(255, 43, 255, 43) }; 2230yield return new object[] { Color.FromArgb(255, 0, 28, 0), 1f, Color.FromArgb(255, 15, 255, 15) }; 2231yield return new object[] { Color.FromArgb(255, 0, 9, 0), 1f, Color.FromArgb(255, 4, 255, 4) }; 2232yield return new object[] { Color.FromArgb(255, 0, 2, 0), 1f, Color.FromArgb(255, 2, 255, 2) }; 2233yield return new object[] { Color.FromArgb(255, 0, 0, 0), 1f, Color.FromArgb(255, 127, 127, 127) }; 2234yield return new object[] { Color.FromArgb(255, 125, 40, 200), 1f, Color.FromArgb(255, 190, 143, 233) }; 2235yield return new object[] { Color.FromArgb(0, 255, 200, 255), 1f, Color.FromArgb(255, 255, 227, 255) }; 2236yield return new object[] { SystemColors.ControlDarkDark, 1f, Color.FromArgb(255, 180, 180, 180) }; 2237yield return new object[] { SystemColors.ControlDark, 1f, Color.FromArgb(255, 208, 208, 208) }; 2239yield return new object[] { SystemColors.ControlLight, 1f, Color.FromArgb(255, 241, 241, 241) }; 2240yield return new object[] { SystemColors.ControlLightLight, 1f, Color.FromArgb(255, 255, 255, 255) }; 2242yield return new object[] { Color.FromArgb(255, 255, 0, 0), 1.5f, Color.FromArgb(255, 255, 191, 191) }; 2243yield return new object[] { Color.FromArgb(255, 0, 255, 0), 1.5f, Color.FromArgb(255, 191, 255, 191) }; 2244yield return new object[] { Color.FromArgb(255, 0, 0, 255), 1.5f, Color.FromArgb(255, 191, 191, 255) }; 2245yield return new object[] { Color.FromArgb(255, 255, 255, 0), 1.5f, Color.FromArgb(255, 255, 255, 191) }; 2246yield return new object[] { Color.FromArgb(255, 255, 0, 255), 1.5f, Color.FromArgb(255, 255, 191, 255) }; 2247yield return new object[] { Color.FromArgb(255, 0, 255, 255), 1.5f, Color.FromArgb(255, 191, 255, 255) }; 2248yield return new object[] { Color.FromArgb(255, 255, 255, 255), 1.5f, Color.FromArgb(255, 255, 255, 255) }; 2249yield return new object[] { Color.FromArgb(255, 0, 85, 0), 1.5f, Color.FromArgb(255, 149, 255, 149) }; 2250yield return new object[] { Color.FromArgb(255, 0, 28, 0), 1.5f, Color.FromArgb(255, 136, 255, 136) }; 2251yield return new object[] { Color.FromArgb(255, 0, 9, 0), 1.5f, Color.FromArgb(255, 130, 255, 130) }; 2252yield return new object[] { Color.FromArgb(255, 0, 2, 0), 1.5f, Color.FromArgb(255, 130, 255, 130) }; 2253yield return new object[] { Color.FromArgb(255, 0, 0, 0), 1.5f, Color.FromArgb(255, 191, 191, 191) }; 2254yield return new object[] { Color.FromArgb(255, 125, 40, 200), 1.5f, Color.FromArgb(255, 223, 200, 244) }; 2255yield return new object[] { Color.FromArgb(0, 255, 200, 255), 1.5f, Color.FromArgb(255, 255, 240, 255) }; 2256yield return new object[] { SystemColors.ControlDarkDark, 1.5f, Color.FromArgb(255, 217, 217, 217) }; 2257yield return new object[] { SystemColors.ControlDark, 1.5f, Color.FromArgb(255, 231, 231, 231) }; 2258yield return new object[] { SystemColors.Control, 1.5f, Color.FromArgb(255, 13, 13, 13) }; 2259yield return new object[] { SystemColors.ControlLight, 1.5f, Color.FromArgb(255, 247, 247, 247) }; 2264private void ControlPaint_Light_InvokeColorFloat_ReturnsExpected(Color baseColor, float percOfLightLight, Color expected) 2274yield return new object[] { Color.FromArgb(255, 255, 0, 0), Color.FromArgb(255, 255, 128, 128) }; 2275yield return new object[] { Color.FromArgb(255, 0, 255, 0), Color.FromArgb(255, 128, 255, 128) }; 2276yield return new object[] { Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 128, 128, 255) }; 2277yield return new object[] { Color.FromArgb(255, 255, 255, 0), Color.FromArgb(255, 255, 255, 128) }; 2278yield return new object[] { Color.FromArgb(255, 255, 0, 255), Color.FromArgb(255, 255, 128, 255) }; 2279yield return new object[] { Color.FromArgb(255, 0, 255, 255), Color.FromArgb(255, 128, 255, 255) }; 2280yield return new object[] { Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255) }; 2281yield return new object[] { Color.FromArgb(255, 0, 85, 0), Color.FromArgb(255, 43, 255, 43) }; 2282yield return new object[] { Color.FromArgb(255, 0, 28, 0), Color.FromArgb(255, 15, 255, 15) }; 2283yield return new object[] { Color.FromArgb(255, 0, 9, 0), Color.FromArgb(255, 4, 255, 4) }; 2284yield return new object[] { Color.FromArgb(255, 0, 2, 0), Color.FromArgb(255, 2, 255, 2) }; 2285yield return new object[] { Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 127, 127, 127) }; 2286yield return new object[] { Color.FromArgb(255, 125, 40, 200), Color.FromArgb(255, 190, 143, 233) }; 2287yield return new object[] { Color.FromArgb(0, 255, 200, 255), Color.FromArgb(255, 255, 227, 255) }; 2288yield return new object[] { SystemColors.ControlDarkDark, Color.FromArgb(255, 180, 180, 180) }; 2289yield return new object[] { SystemColors.ControlDark, Color.FromArgb(255, 208, 208, 208) }; 2291yield return new object[] { SystemColors.ControlLight, Color.FromArgb(255, 241, 241, 241) }; 2292yield return new object[] { SystemColors.ControlLightLight, Color.FromArgb(255, 255, 255, 255) }; 2297public void ControlPaint_LightLight_InvokeColor_ReturnsExpected(Color baseColor, Color expected)
System\Windows\Forms\ControlPaintTests.Rendering.cs (24)
22ControlPaint.DrawBorder(graphics, bounds, Color.Blue, ButtonBorderStyle.Solid); 29State.Pen(1, Color.Blue, PEN_STYLE.PS_SOLID))); 41ControlPaint.DrawBorder(graphics, bounds, Color.Gray, ButtonBorderStyle.Inset); 58State.Pen(16, ControlPaint.DarkDark(Color.Gray), penStyle), 64State.Pen(16, ControlPaint.DarkDark(Color.Gray), penStyle), 70State.Pen(16, ControlPaint.LightLight(Color.Gray), penStyle), 76State.Pen(16, ControlPaint.LightLight(Color.Gray), penStyle), 82State.Pen(16, ControlPaint.Light(Color.Gray), penStyle), 88State.Pen(16, ControlPaint.Light(Color.Gray), penStyle), 176ControlPaint.DrawBorder(graphics, bounds, Color.PeachPuff, ButtonBorderStyle.Outset); 195State.Pen(16, ControlPaint.LightLight(Color.PeachPuff), penStyle), 201State.Pen(16, ControlPaint.LightLight(Color.PeachPuff), penStyle), 207State.Pen(16, ControlPaint.DarkDark(Color.PeachPuff), penStyle), 213State.Pen(16, ControlPaint.DarkDark(Color.PeachPuff), penStyle), 219State.Pen(16, Color.PeachPuff, penStyle), 225State.Pen(16, Color.PeachPuff, penStyle), 231State.Pen(16, ControlPaint.Dark(Color.PeachPuff), penStyle), 237State.Pen(16, ControlPaint.Dark(Color.PeachPuff), penStyle), 324ControlPaint.DrawBorder(graphics, bounds, Color.Green, ButtonBorderStyle.Dotted); 339State.Pen(16, Color.Green, penStyle), 340State.Brush(Color.Green, BRUSH_STYLE.BS_SOLID))); 352ControlPaint.DrawBorder(graphics, bounds, Color.Pink, ButtonBorderStyle.Dashed); 367State.Pen(16, Color.Pink, penStyle), 368State.Brush(Color.Pink, BRUSH_STYLE.BS_SOLID)));
System\Windows\Forms\ControlTests.ControlCollection.cs (32)
652owner.ForeColor = Color.Red; 654owner.BackColor = Color.Blue; 762Assert.Equal(Color.Red, control.ForeColor); 764Assert.Equal(Color.Blue, control.BackColor); 802owner.ForeColor = Color.Red; 804owner.BackColor = Color.Blue; 921Assert.Equal(Color.Red, control.ForeColor); 923Assert.Equal(Color.Blue, control.BackColor); 955owner.ForeColor = Color.Red; 957owner.BackColor = Color.Blue; 998Assert.Equal(Color.Red, control.ForeColor); 1000Assert.Equal(Color.Blue, control.BackColor); 1028owner.ForeColor = Color.Red; 1030owner.BackColor = Color.Blue; 1078Assert.Equal(Color.Red, control.ForeColor); 1080Assert.Equal(Color.Blue, control.BackColor); 2355owner.ForeColor = Color.Red; 2356Assert.Equal(Color.Red, control.ForeColor); 2357owner.BackColor = Color.Blue; 2358Assert.Equal(Color.Blue, control.BackColor); 2499owner.ForeColor = Color.Red; 2500Assert.Equal(Color.Red, control.ForeColor); 2501owner.BackColor = Color.Blue; 2502Assert.Equal(Color.Blue, control.BackColor); 2631owner.ForeColor = Color.Red; 2632Assert.Equal(Color.Red, control.ForeColor); 2633owner.BackColor = Color.Blue; 2634Assert.Equal(Color.Blue, control.BackColor); 2695owner.ForeColor = Color.Red; 2696Assert.Equal(Color.Red, control.ForeColor); 2697owner.BackColor = Color.Blue; 2698Assert.Equal(Color.Blue, control.BackColor);
System\Windows\Forms\ControlTests.Handlers.cs (110)
180BackColor = Color.Yellow 184BackColor = Color.YellowGreen 2007ForeColor = Color.Yellow 2011ForeColor = Color.YellowGreen 2768yield return new object[] { true, Color.Empty, null }; 2769yield return new object[] { true, Color.Empty, new InvalidateEventArgs(Rectangle.Empty) }; 2770yield return new object[] { true, Color.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2771yield return new object[] { true, Color.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2772yield return new object[] { true, Color.Red, null }; 2773yield return new object[] { true, Color.Red, new InvalidateEventArgs(Rectangle.Empty) }; 2774yield return new object[] { true, Color.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2775yield return new object[] { true, Color.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2776yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), null }; 2777yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(Rectangle.Empty) }; 2778yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2779yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2781yield return new object[] { false, Color.Empty, null }; 2782yield return new object[] { false, Color.Empty, new InvalidateEventArgs(Rectangle.Empty) }; 2783yield return new object[] { false, Color.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2784yield return new object[] { false, Color.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2785yield return new object[] { false, Color.Red, null }; 2786yield return new object[] { false, Color.Red, new InvalidateEventArgs(Rectangle.Empty) }; 2787yield return new object[] { false, Color.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2788yield return new object[] { false, Color.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2793public void Control_OnInvalidated_InvokeWithChildren_CallsInvalidated(bool supportsTransparentBackgroundColor, Color backColor, InvalidateEventArgs eventArgs) 2873yield return new object[] { true, Color.Empty, new InvalidateEventArgs(Rectangle.Empty), 0 }; 2874yield return new object[] { true, Color.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2875yield return new object[] { true, Color.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 }; 2876yield return new object[] { true, Color.Red, new InvalidateEventArgs(Rectangle.Empty), 0 }; 2877yield return new object[] { true, Color.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2878yield return new object[] { true, Color.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 }; 2879yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(Rectangle.Empty), 0 }; 2880yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2881yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 1 }; 2883yield return new object[] { false, Color.Empty, new InvalidateEventArgs(Rectangle.Empty), 0 }; 2884yield return new object[] { false, Color.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2885yield return new object[] { false, Color.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 }; 2886yield return new object[] { false, Color.Red, new InvalidateEventArgs(Rectangle.Empty), 0 }; 2887yield return new object[] { false, Color.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2888yield return new object[] { false, Color.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 }; 2893public void Control_OnInvalidated_InvokeWithChildrenWithHandle_CallsInvalidated(bool supportsTransparentBackgroundColor, Color backColor, InvalidateEventArgs eventArgs, int expectedChildInvalidatedCallCount) 2984child1.BackColor = Color.FromArgb(200, 50, 100, 150); 3276control.BackColor = Color.FromArgb(254, 255, 255, 255); 3707control.BackColor = Color.FromArgb(254, 255, 255, 255); 3840yield return new object[] { true, Color.Empty, backgroundImage, backgroundImageLayout }; 3841yield return new object[] { true, Color.Red, backgroundImage, backgroundImageLayout }; 3842yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout }; 3843yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout }; 3844yield return new object[] { false, Color.Empty, backgroundImage, backgroundImageLayout }; 3845yield return new object[] { false, Color.Red, backgroundImage, backgroundImageLayout }; 3852public void Control_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 3903yield return new object[] { parent, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 3904yield return new object[] { parent, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 3905yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 3906yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 3907yield return new object[] { parent, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 3908yield return new object[] { parent, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 3912yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 3913yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 3914yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 3915yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 3916yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 3917yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 3919yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 3920yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 3921yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 }; 3922yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 }; 3923yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 3924yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 3947yield return new object[] { parent, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 3948yield return new object[] { parent, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 3949yield return new object[] { parent, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 3950yield return new object[] { parent, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 3951yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected1 }; 3952yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected1 }; 3956yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 3957yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 3958yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 3959yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 3960yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 }; 3961yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 }; 3963yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 3964yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 3965yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 3966yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 3967yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 3968yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 3974public void Control_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 4024public void Control_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 4075yield return new object[] { true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 4076yield return new object[] { true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 4077yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 4078yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 4079yield return new object[] { false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 4080yield return new object[] { false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 4084yield return new object[] { true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4085yield return new object[] { true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4086yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 4087yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 4088yield return new object[] { false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4089yield return new object[] { false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4091yield return new object[] { true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4092yield return new object[] { true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4093yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4094yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4095yield return new object[] { false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4096yield return new object[] { false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4101public void Control_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 4227BackColor = Color.Red 4543ForeColor = Color.Red
System\Windows\Forms\ControlTests.Methods.cs (40)
4314otherControl.BackColor = Color.FromArgb(100, 50, 100, 150); 4559yield return new object[] { true, Color.Empty, null }; 4560yield return new object[] { true, Color.Empty, Rectangle.Empty }; 4561yield return new object[] { true, Color.Empty, new Rectangle(100, 200, 300, 400) }; 4562yield return new object[] { true, Color.Empty, new Rectangle(1, 2, 300, 400) }; 4563yield return new object[] { true, Color.Red, null }; 4564yield return new object[] { true, Color.Red, Rectangle.Empty }; 4565yield return new object[] { true, Color.Red, new Rectangle(100, 200, 300, 400) }; 4566yield return new object[] { true, Color.Red, new Rectangle(1, 2, 300, 400) }; 4567yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), null }; 4568yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), Rectangle.Empty }; 4569yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new Rectangle(100, 200, 300, 400) }; 4570yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new Rectangle(1, 2, 300, 400) }; 4572yield return new object[] { false, Color.Empty, null }; 4573yield return new object[] { false, Color.Empty, Rectangle.Empty }; 4574yield return new object[] { false, Color.Empty, new Rectangle(100, 200, 300, 400) }; 4575yield return new object[] { false, Color.Empty, new Rectangle(1, 2, 300, 400) }; 4576yield return new object[] { false, Color.Red, null }; 4577yield return new object[] { false, Color.Red, Rectangle.Empty }; 4578yield return new object[] { false, Color.Red, new Rectangle(100, 200, 300, 400) }; 4579yield return new object[] { false, Color.Red, new Rectangle(1, 2, 300, 400) }; 4584public void Control_NotifyInvalidate_InvokeWithChildren_CallsInvalidated(bool supportsTransparentBackgroundColor, Color backColor, Rectangle invalidatedArea) 4664yield return new object[] { true, Color.Empty, Rectangle.Empty, 0 }; 4665yield return new object[] { true, Color.Empty, new Rectangle(100, 200, 300, 400), 0 }; 4666yield return new object[] { true, Color.Empty, new Rectangle(1, 2, 300, 400), 0 }; 4667yield return new object[] { true, Color.Red, Rectangle.Empty, 0 }; 4668yield return new object[] { true, Color.Red, new Rectangle(100, 200, 300, 400), 0 }; 4669yield return new object[] { true, Color.Red, new Rectangle(1, 2, 300, 400), 0 }; 4670yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), Rectangle.Empty, 0 }; 4671yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new Rectangle(100, 200, 300, 400), 0 }; 4672yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new Rectangle(1, 2, 300, 400), 1 }; 4674yield return new object[] { false, Color.Empty, Rectangle.Empty, 0 }; 4675yield return new object[] { false, Color.Empty, new Rectangle(100, 200, 300, 400), 0 }; 4676yield return new object[] { false, Color.Empty, new Rectangle(1, 2, 300, 400), 0 }; 4677yield return new object[] { false, Color.Red, Rectangle.Empty, 0 }; 4678yield return new object[] { false, Color.Red, new Rectangle(100, 200, 300, 400), 0 }; 4679yield return new object[] { false, Color.Red, new Rectangle(1, 2, 300, 400), 0 }; 4684public void Control_NotifyInvalidate_InvokeWithChildrenWithHandle_CallsInvalidated(bool supportsTransparentBackgroundColor, Color backColor, Rectangle invalidatedArea, int expectedChildInvalidatedCallCount) 6386control.BackColor = Color.Black; 6464control.ForeColor = Color.Black;
System\Windows\Forms\ControlTests.Properties.cs (169)
1227public void Control_BackColor_Set_GetReturnsExpected(Color value, Color expected) 1244public void Control_BackColor_SetWithCustomOldValue_GetReturnsExpected(Color value, Color expected) 1248BackColor = Color.YellowGreen 1263yield return new object[] { Color.Red, Color.Red }; 1264yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 1265yield return new object[] { Color.Empty, Control.DefaultBackColor }; 1270public void Control_BackColor_SetTransparent_GetReturnsExpected(Color value, Color expected) 1287public void Control_BackColor_SetWithChildren_GetReturnsExpected(Color value, Color expected) 1311public void Control_BackColor_SetWithChildrenWithColor_GetReturnsExpected(Color value, Color expected) 1315BackColor = Color.Yellow 1319BackColor = Color.YellowGreen 1327Assert.Equal(Color.Yellow, child1.BackColor); 1328Assert.Equal(Color.YellowGreen, child2.BackColor); 1334Assert.Equal(Color.Yellow, child1.BackColor); 1335Assert.Equal(Color.YellowGreen, child2.BackColor); 1341yield return new object[] { Color.Red, Color.Red, 1 }; 1342yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 1347public void Control_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 1388control.BackColor = Color.Red; 1389Assert.Equal(Color.Red, control.BackColor); 1393control.BackColor = Color.Red; 1394Assert.Equal(Color.Red, control.BackColor); 1398control.BackColor = Color.Empty; 1404control.BackColor = Color.Red; 1405Assert.Equal(Color.Red, control.BackColor); 1423control.BackColor = Color.Red; 1424Assert.Equal(Color.Red, control.BackColor); 1475control.BackColor = Color.Red; 1476Assert.Equal(Color.Red, control.BackColor); 1477Assert.Equal(Color.Red, child1.BackColor); 1478Assert.Equal(Color.Red, child2.BackColor); 1484control.BackColor = Color.Red; 1485Assert.Equal(Color.Red, control.BackColor); 1486Assert.Equal(Color.Red, child1.BackColor); 1487Assert.Equal(Color.Red, child2.BackColor); 1493control.BackColor = Color.Empty; 1505control.BackColor = Color.Red; 1506Assert.Equal(Color.Red, control.BackColor); 1507Assert.Equal(Color.Red, child1.BackColor); 1508Assert.Equal(Color.Red, child2.BackColor); 1519BackColor = Color.Yellow 1523BackColor = Color.YellowGreen 1555control.BackColor = Color.Red; 1556Assert.Equal(Color.Red, control.BackColor); 1557Assert.Equal(Color.Yellow, child1.BackColor); 1558Assert.Equal(Color.YellowGreen, child2.BackColor); 1564control.BackColor = Color.Red; 1565Assert.Equal(Color.Red, control.BackColor); 1566Assert.Equal(Color.Yellow, child1.BackColor); 1567Assert.Equal(Color.YellowGreen, child2.BackColor); 1573control.BackColor = Color.Empty; 1575Assert.Equal(Color.Yellow, child1.BackColor); 1576Assert.Equal(Color.YellowGreen, child2.BackColor); 1585control.BackColor = Color.Red; 1586Assert.Equal(Color.Red, control.BackColor); 1587Assert.Equal(Color.Yellow, child1.BackColor); 1588Assert.Equal(Color.YellowGreen, child2.BackColor); 1598Assert.Throws<ArgumentException>(() => control.BackColor = Color.FromArgb(254, 1, 2, 3)); 1608control.BackColor = Color.Red; 1609Assert.Equal(Color.Red, control.BackColor); 1624control.BackColor = Color.Red; 1625Assert.Equal(Color.Red, control.BackColor); 5291public void Control_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 5308public void Control_ForeColor_SetWithCustomOldValue_GetReturnsExpected(Color value, Color expected) 5312ForeColor = Color.YellowGreen 5327public void Control_ForeColor_SetWithChildren_GetReturnsExpected(Color value, Color expected) 5351public void Control_ForeColor_SetWithChildrenWithColor_GetReturnsExpected(Color value, Color expected) 5355ForeColor = Color.Yellow 5359ForeColor = Color.YellowGreen 5367Assert.Equal(Color.Yellow, child1.ForeColor); 5368Assert.Equal(Color.YellowGreen, child2.ForeColor); 5374Assert.Equal(Color.Yellow, child1.ForeColor); 5375Assert.Equal(Color.YellowGreen, child2.ForeColor); 5381yield return new object[] { Color.Red, Color.Red, 1 }; 5382yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 5383yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 5388public void Control_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 5429control.ForeColor = Color.Red; 5430Assert.Equal(Color.Red, control.ForeColor); 5434control.ForeColor = Color.Red; 5435Assert.Equal(Color.Red, control.ForeColor); 5439control.ForeColor = Color.Empty; 5445control.ForeColor = Color.Red; 5446Assert.Equal(Color.Red, control.ForeColor); 5464control.ForeColor = Color.Red; 5465Assert.Equal(Color.Red, control.ForeColor); 5516control.ForeColor = Color.Red; 5517Assert.Equal(Color.Red, control.ForeColor); 5518Assert.Equal(Color.Red, child1.ForeColor); 5519Assert.Equal(Color.Red, child2.ForeColor); 5525control.ForeColor = Color.Red; 5526Assert.Equal(Color.Red, control.ForeColor); 5527Assert.Equal(Color.Red, child1.ForeColor); 5528Assert.Equal(Color.Red, child2.ForeColor); 5534control.ForeColor = Color.Empty; 5546control.ForeColor = Color.Red; 5547Assert.Equal(Color.Red, control.ForeColor); 5548Assert.Equal(Color.Red, child1.ForeColor); 5549Assert.Equal(Color.Red, child2.ForeColor); 5560ForeColor = Color.Yellow 5564ForeColor = Color.YellowGreen 5596control.ForeColor = Color.Red; 5597Assert.Equal(Color.Red, control.ForeColor); 5598Assert.Equal(Color.Yellow, child1.ForeColor); 5599Assert.Equal(Color.YellowGreen, child2.ForeColor); 5605control.ForeColor = Color.Red; 5606Assert.Equal(Color.Red, control.ForeColor); 5607Assert.Equal(Color.Yellow, child1.ForeColor); 5608Assert.Equal(Color.YellowGreen, child2.ForeColor); 5614control.ForeColor = Color.Empty; 5616Assert.Equal(Color.Yellow, child1.ForeColor); 5617Assert.Equal(Color.YellowGreen, child2.ForeColor); 5626control.ForeColor = Color.Red; 5627Assert.Equal(Color.Red, control.ForeColor); 5628Assert.Equal(Color.Yellow, child1.ForeColor); 5629Assert.Equal(Color.YellowGreen, child2.ForeColor); 5642control.ForeColor = Color.Red; 5643Assert.Equal(Color.Red, control.ForeColor); 5658control.ForeColor = Color.Red; 5659Assert.Equal(Color.Red, control.ForeColor); 7061control.BackColor = Color.FromArgb(254, 255, 255, 255); 7546control.BackColor = Color.FromArgb(254, 255, 255, 255); 10724BackColor = Color.Blue, 10727ForeColor = Color.Red 10740BackColor = Color.Blue, 10743ForeColor = Color.Red 10756BackColor = Color.Red, 10759ForeColor = Color.Blue 10811Assert.Equal(Color.Blue, control.BackColor); 10813Assert.Equal(Color.Red, control.ForeColor); 10827Assert.Equal(Color.Blue, control.BackColor); 10829Assert.Equal(Color.Red, control.ForeColor); 10843Assert.Equal(Color.Blue, control.BackColor); 10845Assert.Equal(Color.Red, control.ForeColor); 10859Assert.Equal(Color.Red, control.BackColor); 10861Assert.Equal(Color.Blue, control.ForeColor); 10898BackColor = Color.Blue, 10901ForeColor = Color.Red 10914BackColor = Color.Blue, 10917ForeColor = Color.Red 10930BackColor = Color.Red, 10933ForeColor = Color.Blue 10957BackColor = Color.Green, 10959ForeColor = Color.Yellow, 10993Assert.Equal(Color.Green, control.BackColor); 10995Assert.Equal(Color.Yellow, control.ForeColor); 11009Assert.Equal(Color.Green, control.BackColor); 11011Assert.Equal(Color.Yellow, control.ForeColor); 11025Assert.Equal(Color.Green, control.BackColor); 11027Assert.Equal(Color.Yellow, control.ForeColor); 11041Assert.Equal(Color.Green, control.BackColor); 11043Assert.Equal(Color.Yellow, control.ForeColor); 12493control.BackColor = Color.FromArgb(254, 255, 255, 255);
System\Windows\Forms\DataGridViewCellStyleTests.cs (96)
19Assert.Equal(Color.Empty, style.BackColor); 22Assert.Equal(Color.Empty, style.ForeColor); 30Assert.Equal(Color.Empty, style.SelectionBackColor); 31Assert.Equal(Color.Empty, style.SelectionForeColor); 43BackColor = Color.Red, 46ForeColor = Color.Blue, 51SelectionBackColor = Color.Green, 52SelectionForeColor = Color.Yellow, 60Assert.Equal(Color.Red, style.BackColor); 63Assert.Equal(Color.Blue, style.ForeColor); 71Assert.Equal(Color.Green, style.SelectionBackColor); 72Assert.Equal(Color.Yellow, style.SelectionForeColor); 86Assert.Equal(Color.Empty, style.BackColor); 89Assert.Equal(Color.Empty, style.ForeColor); 97Assert.Equal(Color.Empty, style.SelectionBackColor); 98Assert.Equal(Color.Empty, style.SelectionForeColor); 134public void DataGridViewCellStyle_BackColor_Set_GetReturnsExpected(Color value) 152BackColor = Color.Red 154style.BackColor = Color.Empty; 155Assert.Equal(Color.Empty, style.BackColor); 292public void DataGridViewCellStyle_ForeColor_Set_GetReturnsExpected(Color value) 310ForeColor = Color.Red 312style.ForeColor = Color.Empty; 313Assert.Equal(Color.Empty, style.ForeColor); 510public void DataGridViewCellStyle_SelectionBackColor_Set_GetReturnsExpected(Color value) 528SelectionBackColor = Color.Red 530style.SelectionBackColor = Color.Empty; 531Assert.Equal(Color.Empty, style.SelectionBackColor); 536public void DataGridViewCellStyle_SelectionForeColor_Set_GetReturnsExpected(Color value) 554SelectionForeColor = Color.Red 556style.SelectionForeColor = Color.Empty; 557Assert.Equal(Color.Empty, style.SelectionForeColor); 621BackColor = Color.Red, 624ForeColor = Color.Blue, 629SelectionBackColor = Color.Green, 630SelectionForeColor = Color.Yellow, 639Assert.Equal(Color.Red, style.BackColor); 642Assert.Equal(Color.Blue, style.ForeColor); 650Assert.Equal(Color.Green, style.SelectionBackColor); 651Assert.Equal(Color.Yellow, style.SelectionForeColor); 664BackColor = Color.Red, 667ForeColor = Color.Blue, 672SelectionBackColor = Color.Green, 673SelectionForeColor = Color.Yellow, 681Assert.Equal(Color.Red, style.BackColor); 684Assert.Equal(Color.Blue, style.ForeColor); 692Assert.Equal(Color.Green, style.SelectionBackColor); 693Assert.Equal(Color.Yellow, style.SelectionForeColor); 712BackColor = Color.Red, 715ForeColor = Color.Blue, 720SelectionBackColor = Color.Green, 721SelectionForeColor = Color.Yellow, 729Assert.Equal(Color.Red, style.BackColor); 732Assert.Equal(Color.Blue, style.ForeColor); 740Assert.Equal(Color.Green, style.SelectionBackColor); 741Assert.Equal(Color.Yellow, style.SelectionForeColor); 755Assert.Equal(Color.Empty, style.BackColor); 758Assert.Equal(Color.Empty, style.ForeColor); 766Assert.Equal(Color.Empty, style.SelectionBackColor); 767Assert.Equal(Color.Empty, style.SelectionForeColor); 779BackColor = Color.Red, 782ForeColor = Color.Blue, 787SelectionBackColor = Color.Green, 788SelectionForeColor = Color.Yellow, 796Assert.Equal(Color.Red, style.BackColor); 799Assert.Equal(Color.Blue, style.ForeColor); 807Assert.Equal(Color.Green, style.SelectionBackColor); 808Assert.Equal(Color.Yellow, style.SelectionForeColor); 822Assert.Equal(Color.Empty, style.BackColor); 825Assert.Equal(Color.Empty, style.ForeColor); 833Assert.Equal(Color.Empty, style.SelectionBackColor); 834Assert.Equal(Color.Empty, style.SelectionForeColor); 860new DataGridViewCellStyle { BackColor = Color.Red }, 861new DataGridViewCellStyle { BackColor = Color.Red }, 866new DataGridViewCellStyle { BackColor = Color.Red }, 867new DataGridViewCellStyle { BackColor = Color.Blue }, 896new DataGridViewCellStyle { ForeColor = Color.Red }, 897new DataGridViewCellStyle { ForeColor = Color.Red }, 902new DataGridViewCellStyle { ForeColor = Color.Red }, 903new DataGridViewCellStyle { ForeColor = Color.Blue }, 980new DataGridViewCellStyle { SelectionBackColor = Color.Red }, 981new DataGridViewCellStyle { SelectionBackColor = Color.Red }, 986new DataGridViewCellStyle { SelectionBackColor = Color.Red }, 987new DataGridViewCellStyle { SelectionBackColor = Color.Blue }, 992new DataGridViewCellStyle { SelectionForeColor = Color.Red }, 993new DataGridViewCellStyle { SelectionForeColor = Color.Red }, 998new DataGridViewCellStyle { SelectionForeColor = Color.Red }, 999new DataGridViewCellStyle { SelectionForeColor = Color.Blue }, 1053new DataGridViewCellStyle { BackColor = Color.Red }, 1068new DataGridViewCellStyle { ForeColor = Color.Red }, 1103new DataGridViewCellStyle { SelectionBackColor = Color.Red }, 1108new DataGridViewCellStyle { SelectionForeColor = Color.Red }, 1128BackColor = Color.Red, 1131ForeColor = Color.Blue, 1136SelectionBackColor = Color.Green, 1137SelectionForeColor = Color.Yellow,
System\Windows\Forms\DataGridViewRowTests.cs (16)
2064BackColor = Color.Green, 2067ForeColor = Color.Blue, 2072SelectionForeColor = Color.Red, 2073SelectionBackColor = Color.Yellow, 2080BackColor = Color.Blue, 2083ForeColor = Color.Green, 2088SelectionForeColor = Color.Yellow, 2089SelectionBackColor = Color.Red, 4186yield 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 }; 4187yield 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 }; 4188yield 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 }; 4189yield 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)
793yield return new object[] { new DataGridViewCellStyle { BackColor = Color.Empty } }; 794yield return new object[] { new DataGridViewCellStyle { ForeColor = Color.Empty } }; 795yield return new object[] { new DataGridViewCellStyle { SelectionBackColor = Color.Empty } }; 796yield return new object[] { new DataGridViewCellStyle { SelectionForeColor = Color.Empty } }; 2339ForeColor = Color.Maroon, 2929dataGrid.GridColor = Color.Red; 2932Assert.Equal(Color.Red, dataGrid.GridColor); 3047_dataGridView.AlternatingRowsDefaultCellStyle = new() { BackColor = Color.AliceBlue }; 3087_dataGridView.BackgroundColor = Color.AliceBlue; 3091_dataGridView.BackgroundColor = Color.Azure; 3167_dataGridView.ColumnHeadersDefaultCellStyle = new() { BackColor = Color.Red }; 3227_dataGridView.DefaultCellStyle = new() { BackColor = Color.Red }; 3267_dataGridView.GridColor = Color.Red; 3271_dataGridView.GridColor = Color.Blue; 3367_dataGridView.RowsDefaultCellStyle = new() { BackColor = Color.Red }; 3480TestEvent(nameof(DataGridView.BackColorChanged), nameof(DataGridView.BackColor), Color.Red, Color.Blue); 3501TestEvent(nameof(DataGridView.ForeColorChanged), nameof(DataGridView.ForeColor), Color.Red, Color.Blue);
System\Windows\Forms\DataGridViewTests.Rendering.cs (9)
21GridColor = Color.Blue, 56State.Pen(1, Color.Empty, PEN_STYLE.PS_NULL), 63State.Pen(16, Color.Blue, penStyle), 69State.Pen(16, Color.Blue, penStyle), 75State.Pen(16, Color.Blue, penStyle), 81State.Pen(16, Color.Blue, penStyle), 87State.Pen(1, Color.Empty, PEN_STYLE.PS_NULL), 95State.Brush(Color.Empty, BRUSH_STYLE.BS_NULL), 124ForeColor = Color.Maroon,
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (83)
546yield return new object[] { new DataGridViewCellStyle(), null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false }; 552BackColor = Color.Gray, 553ForeColor = Color.Green 555yield return new object[] { customStyle, font, Color.Gray, Color.Green, false, HorizontalAlignment.Left, false }; 560BackColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78), 561ForeColor = Color.FromArgb(0x23, 0x45, 0x67, 0x80) 563yield return new object[] { transparentStyle, font, Color.FromArgb(0xFF, 0x34, 0x56, 0x78), Color.FromArgb(0x23, 0x45, 0x67, 0x80), false, HorizontalAlignment.Left, false }; 572null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false 581null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true 590null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false 599null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true 608null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false 617null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true 627null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false 636null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true 645null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false 654null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true 663null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false 672null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true 682null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false 691null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, false 700null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false 709null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, false 718null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false 727null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, false 733public void DataGridViewTextBoxEditingDataGridViewTextBoxEditingControl_ApplyCellStyleToEditingDataGridViewTextBoxEditingControl_Invoke_Success(DataGridViewCellStyle dataGridViewCellStyle, Font expectedFont, Color expectedBackColor, Color expectedForeColor, bool expectedWordWrap, HorizontalAlignment expectedTextAlign, bool expectedRepositionOnValueChange) 739BackColor = Color.Red, 740ForeColor = Color.Blue, 755yield return new object[] { new DataGridViewCellStyle(), null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false }; 761BackColor = Color.Gray, 762ForeColor = Color.Green 764yield return new object[] { customStyle, font, Color.Gray, SystemColors.Control, Color.Green, false, HorizontalAlignment.Left, false }; 769BackColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78), 770ForeColor = Color.FromArgb(0x23, 0x45, 0x67, 0x80) 772yield 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 }; 781null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false 790null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true 799null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false 808null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true 817null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false 826null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true 836null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false 845null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, true 854null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false 863null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, true 872null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false 881null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, true 891null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Center, false 900null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Center, false 909null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false 918null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Left, false 927null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Right, false 936null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, true, HorizontalAlignment.Right, false 942public void DataGridViewTextBoxEditingDataGridViewTextBoxEditingControl_ApplyCellStyleToEditingDataGridViewTextBoxEditingControl_InvokeWithDataGridView_Success(DataGridViewCellStyle dataGridViewCellStyle, Font expectedFont, Color expectedBackColor, Color expectedEditingPanelBackColor, Color expectedForeColor, bool expectedWordWrap, HorizontalAlignment expectedTextAlign, bool expectedRepositionOnValueChange) 950BackColor = Color.Red, 951ForeColor = Color.Blue,
System\Windows\Forms\DateTimePickerTests.cs (14)
175var expectedColor = Color.Red; 197var expectedColor = Color.Red; 219var expectedColor = Color.Red; 241var expectedColor = Color.Red; 263var expectedColor = Color.Red; 697control.BackColor = Color.Red; 701control.BackColor = Color.Green; 810control.ForeColor = Color.Red; 814control.ForeColor = Color.Blue;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
156Assert.Equal(Color.Empty, control.TransparencyKey);
System\Windows\Forms\DrawItemEventArgsTests.cs (16)
22public void DrawItemEventArgs_Ctor_Graphics_Font_Rectangle_Int_DrawItemState(Font font, Rectangle rect, int index, DrawItemState state, Color expectedForeColor, Color expectedBackColor) 38yield return new object[] { null, Rectangle.Empty, -2, DrawItemState.None - 1, Color.Empty, Color.Empty }; 39yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, Color.Red, Color.Blue }; 40yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, Color.Red, Color.Blue }; 41yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, Color.Red, Color.Blue }; 42yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, Color.Red, Color.Blue }; 47public void DrawItemEventArgs_Ctor_Graphics_Font_Rectangle_Int_DrawItemState_Color_Color(Font font, Rectangle rect, int index, DrawItemState state, Color foreColor, Color backColor) 66Assert.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)
13yield return new object[] { Rectangle.Empty, -2, null, (DrawItemState)(ListViewItemStates.Checked - 1), Color.Empty, Color.Empty, null }; 14yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 15yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 16yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 21public 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) 40Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont)); 49DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont) 66yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 67yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 68yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 73public void DrawListViewColumnHeaderEventArgs_DrawBackground_Invoke_Success(Rectangle bounds, ColumnHeader header, ListViewItemStates state, Color foreColor, Color backColor, Font font) 90DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont); 99DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont); 105yield return new object[] { new Rectangle(-1, -2, -3, -4), 0, ListViewItemStates.Default, Color.Empty, Color.Empty, null }; 106yield return new object[] { new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 111public void DrawListViewColumnHeaderEventArgs_DrawText_NullHeader_Success(Rectangle bounds, int columnIndex, ListViewItemStates state, Color foreColor, Color backColor, Font font)
System\Windows\Forms\DrawToolTipEventArgsTests.cs (28)
13yield return new object[] { null, null, Rectangle.Empty, null, Color.Empty, Color.Empty, null }; 14yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "", Color.Red, Color.Blue, SystemFonts.DefaultFont }; 15yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(-1, -2, -3, -4), "toolTipText", Color.Red, Color.Blue, SystemFonts.DefaultFont }; 20public void Ctor_Graphics_IWin32Window_Control_Rectangle_String_Color_Color_Font(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 35yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), null, Color.Empty, Color.Empty, null }; 36yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), string.Empty, Color.Empty, Color.Empty, null }; 37yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), "tooltipText", Color.Empty, Color.Empty, null }; 38yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 39yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 40yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), "tooltipText", Color.Red, Color.Blue, SystemFonts.DefaultFont }; 45public void DrawBackground_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 55public void DrawText_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 65public void DrawText_InvokeTextFormatFlags_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 75public void DrawBorder_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font)
System\Windows\Forms\FontDialogTests.cs (16)
20Assert.Equal(Color.Black, dialog.Color); 50Assert.Equal(Color.Empty, dialog.Color); 164yield return new object[] { Color.Empty, Color.Black }; 165yield return new object[] { Color.Black, Color.Black }; 166yield return new object[] { Color.Red, Color.Red }; 167yield return new object[] { Color.FromArgb(1, 2, 3, 4), Color.FromArgb(1, 2, 3, 4) }; 173public void FontDialog_Color_Set_GetReturnsExpected(Color value, Color expected) 188public void FontDialog_Color_SetWithCustomOldValue_GetReturnsExpected(Color value, Color expected) 192Color = Color.Yellow 609Assert.Equal(Color.Black, dialog.Color);
System\Windows\Forms\FormTests.cs (95)
158Assert.Equal(Color.Empty, control.TransparencyKey); 315Assert.Equal(Color.Empty, control.TransparencyKey); 322Assert.Equal(Color.Empty, control.TransparencyKey); 329Assert.Equal(Color.Empty, control.TransparencyKey); 336yield return new object[] { true, Color.Red, 0.5 }; 337yield return new object[] { false, Color.Empty, 1 }; 342public void Form_AllowTransparency_SetWithOpacityAndTransparencyKey_GetReturnsExpected(bool value, Color expectedTransparencyKey, float expectedOpacity) 347TransparencyKey = Color.Red, 365Assert.Equal(Color.Empty, control.TransparencyKey); 380Assert.Equal(Color.Empty, control.TransparencyKey); 387Assert.Equal(Color.Empty, control.TransparencyKey); 394Assert.Equal(Color.Empty, control.TransparencyKey); 415Assert.Equal(Color.Empty, control.TransparencyKey); 425Assert.Equal(Color.Empty, control.TransparencyKey); 435Assert.Equal(Color.Empty, control.TransparencyKey); 445yield return new object[] { true, Color.Red, 0.5, 0 }; 446yield return new object[] { false, Color.Empty, 1, 1 }; 451public void Form_AllowTransparency_SetWithOpacityAndTransparencyKeyWithHandle_GetReturnsExpected(bool value, Color expectedTransparencyKey, float expectedOpacity, int expectedStyleChangedCallCount) 456TransparencyKey = Color.Red 488Assert.Equal(Color.Empty, control.TransparencyKey); 515Assert.Equal(Color.Empty, control.TransparencyKey); 525Assert.Equal(Color.Empty, control.TransparencyKey); 535Assert.Equal(Color.Empty, control.TransparencyKey); 630Assert.Equal(Color.Empty, control.TransparencyKey); 637Assert.Equal(Color.Empty, control.TransparencyKey); 660TransparencyKey = Color.Red, 665Assert.Equal(Color.Red, control.TransparencyKey); 672Assert.Equal(Color.Red, control.TransparencyKey); 688Assert.Equal(Color.Empty, control.TransparencyKey); 695Assert.Equal(Color.Empty, control.TransparencyKey); 725Assert.Equal(Color.Empty, control.TransparencyKey); 735Assert.Equal(Color.Empty, control.TransparencyKey); 763Assert.Equal(Color.Empty, control.TransparencyKey); 772Assert.Equal(Color.Empty, control.TransparencyKey); 807Assert.Equal(Color.Empty, control.TransparencyKey); 816Assert.Equal(Color.Empty, control.TransparencyKey); 842control.TransparencyKey = Color.Red; 853Assert.Equal(Color.Red, control.TransparencyKey); 863Assert.Equal(Color.Red, control.TransparencyKey); 905Assert.Equal(Color.Empty, control.TransparencyKey); 915Assert.Equal(Color.Empty, control.TransparencyKey); 1268yield return new object[] { allowTransparency, Color.Empty, allowTransparency }; 1269yield return new object[] { allowTransparency, Color.Red, true }; 1270yield return new object[] { allowTransparency, Color.Transparent, true }; 1276public void Form_TransparencyKey_Set_GetReturnsExpected(bool allowTransparency, Color value, bool expectedAllowTransparency) 1300yield return new object[] { allowTransparency, Color.Empty }; 1301yield return new object[] { allowTransparency, Color.Red }; 1302yield return new object[] { allowTransparency, Color.Transparent }; 1308public void Form_TransparencyKey_SetWithCustomOldValue_GetReturnsExpected(bool allowTransparency, Color value) 1313TransparencyKey = Color.Yellow 1334yield return new object[] { allowTransparency, Color.Empty }; 1335yield return new object[] { allowTransparency, Color.Red }; 1336yield return new object[] { allowTransparency, Color.Transparent }; 1342public void Form_TransparencyKey_SetWithOpacity_GetReturnsExpected(bool allowTransparency, Color value) 1367yield return new object[] { allowTransparency, Color.Empty }; 1368yield return new object[] { allowTransparency, Color.Red }; 1369yield return new object[] { allowTransparency, Color.Transparent }; 1375public void Form_TransparencyKey_SetMdiContainer_Nop(bool allowTransparency, Color value) 1397public void Form_TransparencyKey_SetNotTopLevel_GetReturnsExpected(bool allowTransparency, Color value, bool expectedAllowTransparency) 1430control.TransparencyKey = Color.Empty; 1433Assert.Equal(Color.Empty, control.TransparencyKey); 1440control.TransparencyKey = Color.Empty; 1443Assert.Equal(Color.Empty, control.TransparencyKey); 1452yield return new object[] { Color.Red, true, 2 }; 1453yield return new object[] { Color.Transparent, true, 2 }; 1458public void Form_TransparencyKey_SetTransparentWithHandleSetNotAllowTransparency_GetReturnsExpected(Color value, bool expectedAllowTransparency, int expectedStyleChangedCallCount) 1504control.TransparencyKey = Color.Empty; 1507Assert.Equal(Color.Empty, control.TransparencyKey); 1514control.TransparencyKey = Color.Empty; 1517Assert.Equal(Color.Empty, control.TransparencyKey); 1526yield return new object[] { Color.Red }; 1527yield return new object[] { Color.Transparent }; 1532public void Form_TransparencyKey_SetTransparentWithHandleSetAllowTransparencyBefore_GetReturnsExpected(Color value) 1579control.TransparencyKey = Color.Empty; 1582Assert.Equal(Color.Empty, control.TransparencyKey); 1589control.TransparencyKey = Color.Empty; 1592Assert.Equal(Color.Empty, control.TransparencyKey); 1601public void Form_TransparencyKey_SetTransparentWithHandleSetAllowTransparencyAfter_GetReturnsExpected(Color value) 1648control.TransparencyKey = Color.Empty; 1651Assert.Equal(Color.Empty, control.TransparencyKey); 1658control.TransparencyKey = Color.Empty; 1661Assert.Equal(Color.Empty, control.TransparencyKey); 1670public void Form_TransparencyKey_SetTransparentWithHandleSetOpacityBefore_GetReturnsExpected(Color value) 1717control.TransparencyKey = Color.Empty; 1720Assert.Equal(Color.Empty, control.TransparencyKey); 1727control.TransparencyKey = Color.Empty; 1730Assert.Equal(Color.Empty, control.TransparencyKey); 1739public void Form_TransparencyKey_SetTransparentWithHandleSetOpacityAfter_GetReturnsExpected(Color value) 1773yield return new object[] { true, Color.Empty, true, 1 }; 1774yield return new object[] { true, Color.Red, true, 0 }; 1775yield return new object[] { true, Color.Transparent, true, 0 }; 1777yield return new object[] { false, Color.Empty, false, 0 }; 1778yield return new object[] { false, Color.Red, true, 2 }; 1779yield return new object[] { false, Color.Transparent, true, 2 }; 1784public void Form_TransparencyKey_SetNotTopLevelWithHandle_GetReturnsExpected(bool allowTransparency, Color value, bool expectedAllowTransparency, int expectedStyleChangedCallCount)
System\Windows\Forms\GroupBoxTests.cs (6)
1829foreach (Color foreColor in new Color[] { Color.Red, Color.Empty }) 1847public void GroupBox_OnPaint_Invoke_CallsPaint(Size size, bool enabled, bool useCompatibleTextRendering, RightToLeft rightToLeft, Color foreColor, string text) 1885public void GroupBox_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabled, bool useCompatibleTextRendering, RightToLeft rightToLeft, Color foreColor, string text)
System\Windows\Forms\HtmlDocumentTests.cs (163)
26Assert.Equal(Color.FromArgb(0xFF, 0x00, 0x00, 0xFF), document.ActiveLinkColor); 31yield return new object[] { null, Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 32yield return new object[] { "", Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 33yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 34yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 35yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 36yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x11, 0x30, 0x60) }; 37yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x30, 0x41, 0x89) }; 38yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 39yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 40yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 41yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 42yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 43yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 48public async Task HtmlDocument_ActiveLinkColor_GetCustomValueOnBody_ReturnsExpected(object value, Color expected) 63yield return new object[] { null, Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 64yield return new object[] { "", Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 65yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 66yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 67yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 68yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 69yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 70yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 71yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 72yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 73yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 74yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 75yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 80public async Task HtmlDocument_ActiveLinkColor_GetCustomValueSet_ReturnsExpected(object value, Color expected) 104public async Task HtmlDocument_ActiveLinkColor_Set_GetReturnsExpected(Color value, Color expected, string expectedNative) 243Assert.Equal(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), document.BackColor); 248yield return new object[] { null, Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) }; 249yield return new object[] { "", Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) }; 250yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 251yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 252yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 253yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x11, 0x30, 0x60) }; 254yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x30, 0x41, 0x89) }; 255yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 256yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 257yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 258yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 259yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 260yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 265public async Task HtmlDocument_BackColor_GetCustomValueOnBody_ReturnsExpected(object value, Color expected) 280yield return new object[] { null, Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) }; 281yield return new object[] { "", Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) }; 282yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 283yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 284yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 285yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 286yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF) }; 287yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 288yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 289yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 290yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 291yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 292yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 297public async Task HtmlDocument_BackColor_GetCustomValueSet_ReturnsExpected(object value, Color expected) 319yield return new object[] { Color.Empty, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), "#000000" }; 320yield return new object[] { Color.Red, Color.FromArgb(0xFF, 0xFF, 0x00, 0x00), "#ff0000" }; 321yield return new object[] { Color.White, Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF), "#ffffff" }; 322yield return new object[] { Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.FromArgb(0xFF, 0x34, 0x56, 0x78), "#345678" }; 327public async Task HtmlDocument_BackColor_Set_GetReturnsExpected(Color value, Color expected, string expectedNative) 723Assert.Equal(Color.FromArgb(0xFF, 0x00, 0x00, 0x00), document.ForeColor); 728yield return new object[] { null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 729yield return new object[] { "", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 730yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 731yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 732yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 733yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x11, 0x30, 0x60) }; 734yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x30, 0x41, 0x89) }; 735yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 736yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 737yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 738yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 739yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 740yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 745public async Task HtmlDocument_ForeColor_GetCustomValueOnBody_ReturnsExpected(object value, Color expected) 760yield return new object[] { null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 761yield return new object[] { "", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 762yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 763yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 764yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 765yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 766yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 767yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 768yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 769yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 770yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 771yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 772yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 777public async Task HtmlDocument_ForeColor_GetCustomValueSet_ReturnsExpected(object value, Color expected) 799public async Task HtmlDocument_ForeColor_Set_GetReturnsExpected(Color value, Color expected, string expectedNative) 912Assert.Equal(Color.FromArgb(0xFF, 0x00, 0x00, 0xFF), document.LinkColor); 917yield return new object[] { null, Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 918yield return new object[] { "", Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 919yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 920yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 921yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 922yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x11, 0x30, 0x60) }; 923yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x30, 0x41, 0x89) }; 924yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 925yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 926yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 927yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 928yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 929yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 934public async Task HtmlDocument_LinkColor_GetCustomValueOnBody_ReturnsExpected(object value, Color expected) 949yield return new object[] { null, Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 950yield return new object[] { "", Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 951yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 952yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 953yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 954yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 955yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x00, 0x00, 0xFF) }; 956yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 957yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 958yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 959yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 960yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 961yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 966public async Task HtmlDocument_LinkColor_GetCustomValueSet_ReturnsExpected(object value, Color expected) 988public async Task HtmlDocument_LinkColor_Set_GetReturnsExpected(Color value, Color expected, string expectedNative) 1275Assert.Equal(Color.FromArgb(0xFF, 0x80, 0x00, 0x80), document.VisitedLinkColor); 1280yield return new object[] { null, Color.FromArgb(0xFF, 0x80, 0x00, 0x80) }; 1281yield return new object[] { "", Color.FromArgb(0xFF, 0x80, 0x00, 0x80) }; 1282yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 1283yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 1284yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 1285yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x11, 0x30, 0x60) }; 1286yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x30, 0x41, 0x89) }; 1287yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 1288yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 1289yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 1290yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 1291yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 1292yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 1297public async Task HtmlDocument_VisitedLinkColor_GetCustomValueOnBody_ReturnsExpected(object value, Color expected) 1312yield return new object[] { null, Color.FromArgb(0xFF, 0x80, 0x00, 0x80) }; 1313yield return new object[] { "", Color.FromArgb(0xFF, 0x80, 0x00, 0x80) }; 1314yield return new object[] { "NoSuchName", Color.FromArgb(0xFF, 0x00, 0xC0, 0x0E) }; 1315yield return new object[] { "Invalid", Color.FromArgb(0xFF, 0x00, 0xA0, 0xD0) }; 1316yield return new object[] { "Red", Color.FromArgb(0xFF, 0xFF, 0x00, 0x00) }; 1317yield return new object[] { 0x123456, Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 1318yield return new object[] { 0x12345678, Color.FromArgb(0xFF, 0x80, 0x00, 0x80) }; 1319yield return new object[] { "#", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 1320yield return new object[] { "#1", Color.FromArgb(0xFF, 0x1, 0x00, 0x00) }; 1321yield return new object[] { "#123456", Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 1322yield return new object[] { "#12345678", Color.FromArgb(0xFF, 0x12, 0x45, 0x78) }; 1323yield return new object[] { "abc#123456", Color.FromArgb(0xFF, 0xAB, 0x12, 0x56) }; 1324yield return new object[] { "#G", Color.FromArgb(0xFF, 0x00, 0x00, 0x00) }; 1329public async Task HtmlDocument_VisitedLinkColor_GetCustomValueSet_ReturnsExpected(object value, Color expected) 1351public async Task HtmlDocument_VisitedLinkColor_Set_GetReturnsExpected(Color value, Color expected, string expectedNative)
System\Windows\Forms\ImageList.ImageCollectionTests.cs (112)
55image32bppArgbTransparent.SetPixel(0, 0, Color.FromArgb(0x12, 0x34, 0x56, 0x78)); 103image32bppArgbTransparent.SetPixel(0, 0, Color.FromArgb(0x12, 0x34, 0x56, 0x78)); 153yield return new object[] { pixelFormat, Color.Empty, Color.Empty }; 154yield return new object[] { PixelFormat.Format24bppRgb, Color.Red, Color.FromArgb(200, 50, 75, 100) }; 161yield return new object[] { PixelFormat.Format1bppIndexed, Color.Empty, Color.Empty, Color.FromArgb(255, 0, 0, 0) }; 167yield return new object[] { PixelFormat.Format24bppRgb, Color.Red, Color.FromArgb(200, 50, 75, 100), Color.FromArgb(255, 50, 75, 100) }; 168yield return new object[] { PixelFormat.Format32bppRgb, Color.Red, Color.FromArgb(200, 50, 75, 100), Color.FromArgb(255, 50, 75, 100) }; 184public void ImageCollection_Item_Get32bppColorDepth_Success(PixelFormat pixelFormat, Color pixel00Color, Color givenPixel10Color, Color expectedPixel10Color) 190if (pixel00Color != Color.Empty) 192if (givenPixel10Color != Color.Empty) 240foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.Empty, Color.Black }) 248bitmap.SetPixel(0, 0, Color.FromArgb(0x12, 0x34, 0x56, 0x78)); 257public void ImageCollection_Item_Set_GetReturnsExpected(Color transparentColor, Image value) 278public void ImageCollection_Item_SetWithHandle_GetReturnsExpected(Color transparentColor, Image value) 351image1.SetPixel(0, 0, Color.Red); 353image2.SetPixel(0, 0, Color.Blue); 420foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.Empty, Color.Black }) 428bitmap.SetPixel(0, 0, Color.FromArgb(0x12, 0x34, 0x56, 0x78)); 437public void ImageCollection_Add_InvokeStringImage_Success(Color transparentColor, Image value) 481public void ImageCollection_Add_InvokeStringImageWithHandle_Success(Color transparentColor, Image value) 526public void ImageCollection_Add_InvokeImage_Success(Color transparentColor, Image value) 550public void ImageCollection_Add_InvokeImageWithHandle_Success(Color transparentColor, Image value) 575foreach (Color listTransparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.Empty, Color.Black }) 577foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.Empty, Color.Black }) 585bitmap.SetPixel(0, 0, Color.FromArgb(0x12, 0x34, 0x56, 0x78)); 595public void ImageCollection_Add_InvokeImageColor_Success(Color listTransparentColor, Image value, Color transparentColor) 619public void ImageCollection_Add_InvokeImageColorWithHandle_Success(Color listTransparentColor, Image value, Color transparentColor) 644foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.Empty, Color.Black }) 652public void ImageCollection_Add_InvokeStringIcon_Success(Color transparentColor, Icon value) 696public void ImageCollection_Add_InvokeStringIconWithHandle_Success(Color transparentColor, Icon value) 741public void ImageCollection_Add_InvokeIcon_Success(Color transparentColor, Icon value) 765public void ImageCollection_Add_InvokeIconWithHandle_Success(Color transparentColor, Icon value) 794Assert.Throws<ArgumentNullException>("value", () => collection.Add(null, Color.Transparent)); 808Assert.Throws<ArgumentException>(() => collection.Add(value, Color.Transparent)); 814public void ImageCollection_AddRange_Invoke_Success(Color transparentColor, Image value) 838public void ImageCollection_AddRange_InvokeWithHandle_Success(Color transparentColor, Image value) 889foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.Empty, Color.Black }) 896bitmap.SetPixel(0, 0, Color.FromArgb(0x12, 0x34, 0x56, 0x78)); 903public void ImageCollection_AddStrip_Invoke_Success(Color transparentColor, Image value, int expectedCount) 920public void ImageCollection_AddStrip_InvokeWithHandle_Success(Color transparentColor, Image value, int expectedCount) 1156image1.SetPixel(0, 0, Color.Red); 1158image2.SetPixel(0, 0, Color.Blue); 1193image1.SetPixel(0, 0, Color.Red); 1195image2.SetPixel(0, 0, Color.Blue); 1305image1.SetPixel(0, 0, Color.Red); 1307image2.SetPixel(0, 0, Color.Blue); 1309image3.SetPixel(0, 0, Color.Yellow); 1339image1.SetPixel(0, 0, Color.Red); 1341image2.SetPixel(0, 0, Color.Blue); 1343image3.SetPixel(0, 0, Color.Yellow); 1348Color color1 = ((Bitmap)collection[0]).GetPixel(0, 0); 1349Color color2 = ((Bitmap)collection[1]).GetPixel(0, 0); 1350Color color3 = ((Bitmap)collection[2]).GetPixel(0, 0); 1403image1.SetPixel(0, 0, Color.Red); 1405image2.SetPixel(0, 0, Color.Blue); 1407image3.SetPixel(0, 0, Color.Yellow); 1443image1.SetPixel(0, 0, Color.Red); 1445image2.SetPixel(0, 0, Color.Blue); 1447image3.SetPixel(0, 0, Color.Yellow); 1452Color color1 = ((Bitmap)collection[0]).GetPixel(0, 0); 1453Color color2 = ((Bitmap)collection[1]).GetPixel(0, 0); 1454Color color3 = ((Bitmap)collection[2]).GetPixel(0, 0); 1495image1.SetPixel(0, 0, Color.Red); 1497image2.SetPixel(0, 0, Color.Blue); 1499image3.SetPixel(0, 0, Color.Yellow); 1504Color color1 = ((Bitmap)collection[0]).GetPixel(0, 0); 1505Color color2 = ((Bitmap)collection[1]).GetPixel(0, 0); 1506Color color3 = ((Bitmap)collection[2]).GetPixel(0, 0); 1630public void ImageCollection_IListItem_Set_GetReturnsExpected(Color transparentColor, Image value) 1651public void ImageCollection_IListItem_SetWithHandle_GetReturnsExpected(Color transparentColor, Image value)
System\Windows\Forms\ImageListTests.cs (30)
25Assert.Equal(Color.Transparent, list.TransparentColor); 43Assert.Equal(Color.Transparent, list.TransparentColor); 667foreach (Color testData in CommonTestHelper.GetColorWithEmptyTheoryData()) 672yield return new object[] { Color.LightGray }; 677public void ImageList_TransparentColor_SetWithoutHandle_GetReturnsExpected(Color value) 700list.TransparentColor = Color.Red; 701Assert.Equal(Color.Red, list.TransparentColor); 706list.TransparentColor = Color.Red; 707Assert.Equal(Color.Red, list.TransparentColor); 712list.TransparentColor = Color.Blue; 713Assert.Equal(Color.Blue, list.TransparentColor); 719list.TransparentColor = Color.Red; 720Assert.Equal(Color.Red, list.TransparentColor); 727public void ImageList_TransparentColor_SetWithHandle_GetReturnsExpected(Color value) 751list.TransparentColor = Color.Red; 752Assert.Equal(Color.Red, list.TransparentColor); 757list.TransparentColor = Color.Red; 758Assert.Equal(Color.Red, list.TransparentColor); 763list.TransparentColor = Color.Blue; 764Assert.Equal(Color.Blue, list.TransparentColor); 770list.TransparentColor = Color.Red; 771Assert.Equal(Color.Red, list.TransparentColor); 781Assert.Equal(Color.Transparent, list.TransparentColor); 784list.TransparentColor = Color.Red; 785Assert.Equal(Color.Red, list.TransparentColor); 789Assert.Equal(Color.LightGray, list.TransparentColor); 798Assert.Equal(Color.Transparent, list.TransparentColor); 801list.TransparentColor = Color.Red; 802Assert.Equal(Color.Red, list.TransparentColor); 806Assert.Equal(Color.LightGray, list.TransparentColor);
System\Windows\Forms\ListBoxTests.cs (56)
349yield return new object[] { Color.Empty, SystemColors.Window }; 350yield return new object[] { Color.Red, Color.Red }; 355public void ListBox_BackColor_Set_GetReturnsExpected(Color value, Color expected) 372yield return new object[] { Color.Empty, SystemColors.Window, 0 }; 373yield return new object[] { Color.Red, Color.Red, 1 }; 378public void ListBox_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 419control.BackColor = Color.Red; 420Assert.Equal(Color.Red, control.BackColor); 424control.BackColor = Color.Red; 425Assert.Equal(Color.Red, control.BackColor); 429control.BackColor = Color.Empty; 435control.BackColor = Color.Red; 436Assert.Equal(Color.Red, control.BackColor); 447control.BackColor = Color.Red; 448Assert.Equal(Color.Red, control.BackColor); 463control.BackColor = Color.Red; 464Assert.Equal(Color.Red, control.BackColor); 1240yield return new object[] { Color.Empty, SystemColors.WindowText }; 1241yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 1242yield return new object[] { Color.White, Color.White }; 1243yield return new object[] { Color.Black, Color.Black }; 1244yield return new object[] { Color.Red, Color.Red }; 1249public void ListBox_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1266yield return new object[] { Color.Empty, SystemColors.WindowText, 0 }; 1267yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 1268yield return new object[] { Color.White, Color.White, 1 }; 1269yield return new object[] { Color.Black, Color.Black, 1 }; 1270yield return new object[] { Color.Red, Color.Red, 1 }; 1275public void ListBox_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 1316control.ForeColor = Color.Red; 1317Assert.Equal(Color.Red, control.ForeColor); 1321control.ForeColor = Color.Red; 1322Assert.Equal(Color.Red, control.ForeColor); 1326control.ForeColor = Color.Empty; 1332control.ForeColor = Color.Red; 1333Assert.Equal(Color.Red, control.ForeColor); 1344control.ForeColor = Color.Red; 1345Assert.Equal(Color.Red, control.ForeColor); 1360control.ForeColor = Color.Red; 1361Assert.Equal(Color.Red, control.ForeColor); 5981control.BackColor = Color.Black; 6000control.ForeColor = Color.Black;
System\Windows\Forms\ListViewInsertionMarkTests.cs (8)
141control.InsertionMark.Color = Color.FromArgb(0x12, 0x34, 0x56, 0x78); 284Assert.NotEqual(Color.Empty, insertionMark.Color); 302Assert.NotEqual(Color.Empty, insertionMark.Color); 312public void ListViewInsertionMark_Color_SetWithoutHandle_ReturnsExpected(Color value) 329public void ListViewInsertionMark_Color_SetWithHandle_ReturnsExpected(Color value) 370control.InsertionMark.Color = Color.Empty; 382control.InsertionMark.Color = Color.FromArgb(0x12, 0x34, 0x56, 0x78); 518insertionMark.Color = Color.FromArgb(0x12, 0x34, 0x56, 0x78);
System\Windows\Forms\ListViewItemConverterTests.cs (50)
55ForeColor = Color.Blue 59BackColor = Color.Blue 192new Type[] { typeof(string[]), typeof(int), typeof(Color), typeof(Color), typeof(Font) }, 193new object[] { new string[] { "text3" }, 1, Color.Blue, Color.Empty, null } 198new Type[] { typeof(string[]), typeof(int), typeof(Color), typeof(Color), typeof(Font) }, 199new object[] { new string[] { "text4" }, 1, Color.Empty, Color.Blue, null } 204new Type[] { typeof(string[]), typeof(int), typeof(Color), typeof(Color), typeof(Font) }, 205new object[] { new string[] { "text5" }, 1, Color.Empty, Color.Empty, SystemFonts.MenuFont } 210new Type[] { typeof(string[]), typeof(string), typeof(Color), typeof(Color), typeof(Font) }, 211new object[] { new string[] { "text3" }, "imageKey", Color.Blue, Color.Empty, null } 216new Type[] { typeof(string[]), typeof(string), typeof(Color), typeof(Color), typeof(Font) }, 217new object[] { new string[] { "text4" }, "imageKey", Color.Empty, Color.Blue, null } 222new Type[] { typeof(string[]), typeof(string), typeof(Color), typeof(Color), typeof(Font) }, 223new object[] { new string[] { "text5" }, "imageKey", Color.Empty, Color.Empty, SystemFonts.MenuFont } 229new ListViewItem(["text"], "imageKey", Color.Red, Color.Blue, SystemFonts.MenuFont), 230new Type[] { typeof(string[]), typeof(string), typeof(Color), typeof(Color), typeof(Font) }, 231new object[] { new string[] { "text" }, "imageKey", Color.Red, Color.Blue, SystemFonts.MenuFont } 235new ListViewItem(["text"], 1, Color.Red, Color.Blue, SystemFonts.MenuFont), 236new Type[] { typeof(string[]), typeof(int), typeof(Color), typeof(Color), typeof(Font) }, 237new object[] { new string[] { "text" }, 1, Color.Red, Color.Blue, SystemFonts.MenuFont } 241new ListViewItem(["text"], "imageKey", Color.Red, Color.Blue, SystemFonts.MenuFont, group), 242new Type[] { typeof(string[]), typeof(string), typeof(Color), typeof(Color), typeof(Font) }, 243new object[] { new string[] { "text" }, "imageKey", Color.Red, Color.Blue, SystemFonts.MenuFont } 247new ListViewItem(["text"], 1, Color.Red, Color.Blue, SystemFonts.MenuFont, group), 248new Type[] { typeof(string[]), typeof(int), typeof(Color), typeof(Color), typeof(Font) }, 249new object[] { new string[] { "text" }, 1, Color.Red, Color.Blue, SystemFonts.MenuFont }
System\Windows\Forms\ListViewItemTests.cs (78)
44yield return new object[] { null, null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 45yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 46yield return new object[] { new string[] { null }, string.Empty, Color.Empty, Color.Empty, null, new ListViewGroup(), string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 47yield return new object[] { new string[] { "text" }, "imageKey", Color.Blue, Color.Red, SystemFonts.MenuFont, new ListViewGroup(), "imageKey", Color.Blue, Color.Red, "text" }; 52public 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) 82yield return new object[] { null, -1, Color.Empty, Color.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 83yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 84yield return new object[] { new string[] { null }, 1, Color.Empty, Color.Empty, null, new ListViewGroup(), SystemColors.WindowText, SystemColors.Window, string.Empty }; 85yield return new object[] { new string[] { "text" }, 2, Color.Blue, Color.Red, SystemFonts.MenuFont, new ListViewGroup(), Color.Blue, Color.Red, "text" }; 90public 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) 120yield return new object[] { null, null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 121yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 122yield return new object[] { new string[] { null }, string.Empty, Color.Empty, Color.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 123yield return new object[] { new string[] { "text" }, "imageKey", Color.Blue, Color.Red, SystemFonts.MenuFont, "imageKey", Color.Blue, Color.Red, "text" }; 128public 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) 158yield return new object[] { null, -1, Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 159yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 160yield return new object[] { new string[] { null }, 1, Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 161yield return new object[] { new string[] { "text" }, 2, Color.Blue, Color.Red, SystemFonts.MenuFont, Color.Blue, Color.Red, "text" }; 166public void ListViewItem_Ctor_StringArray_Int_Color_Color_Font(string[] subItems, int imageIndex, Color foreColor, Color backColor, Font font, Color expectedForeColor, Color expectedBackColor, string expectedText) 849yield return new object[] { Color.Empty, SystemColors.Window }; 850yield return new object[] { Color.Red, Color.Red }; 855public void ListViewItem_BackColor_GetWithOwner_ReturnsExpected(Color value, Color expected) 873public void ListViewItem_BackColor_Set_GetReturnsExpected(Color value, Color expected) 888public void ListViewItem_BackColor_SetWithOwner_GetReturnsExpected(Color value, Color expected) 904yield return new object[] { Color.Empty, SystemColors.WindowText }; 905yield return new object[] { Color.White, Color.White }; 906yield return new object[] { Color.Black, Color.Black }; 907yield return new object[] { Color.Red, Color.Red }; 912public void ListViewItem_ForeColor_GetWithOwner_ReturnsExpected(Color value, Color expected) 930public void ListViewItem_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 946public void ListViewItem_ForeColor_SetWithOwner_GetReturnsExpected(Color value, Color expected)
System\Windows\Forms\ListViewSubItemCollectionTests.cs (34)
258yield return new object[] { null, Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 259yield return new object[] { string.Empty, Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue, string.Empty }; 260yield return new object[] { "reasonable", Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue, "reasonable" }; 265public void ListViewSubItemCollection_Add_String_Color_Color_Font_Success(string text, Color foreColor, Color backColor, Font font, Color expectedForeColor, Color expectedBackColor, string expectedText) 388yield return new object[] { Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window }; 389yield return new object[] { Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue }; 390yield return new object[] { Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue }; 395public void ListViewSubItemCollection_AddRange_StringArrayWithStyles_Success(Color foreColor, Color backColor, Font font, Color expectedForeColor, Color expectedBackColor) 420Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((string[])null, Color.Red, Color.Blue, SystemFonts.MenuFont)); 904listViewItem.SubItems.Add("Test", Color.White, Color.Black, SystemFonts.MenuFont); 941listViewItem.SubItems.AddRange(["Test 1", "Test 2"], Color.White, Color.Black, SystemFonts.MenuFont);
System\Windows\Forms\ListViewSubItemConverterTests.cs (6)
60new ListViewItem.ListViewSubItem(null, "text", Color.Red, Color.Blue, SystemFonts.MenuFont), 61new Type[] { typeof(ListViewItem), typeof(string), typeof(Color), typeof(Color), typeof(Font) }, 62new object[] { null, "text", Color.Red, Color.Blue, SystemFonts.MenuFont }
System\Windows\Forms\ListViewSubItemTests.cs (78)
31yield return new object[] { new ListViewItem() { BackColor = Color.Yellow, ForeColor = Color.Yellow, Font = SystemFonts.StatusFont }, "reasonable", "reasonable" }; 55yield return new object[] { null, null, Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 56yield return new object[] { new ListViewItem(), string.Empty, Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue, string.Empty }; 57yield return new object[] { new ListViewItem(), "reasonable", Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue, "reasonable" }; 58yield 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 }; 62yield return new object[] { item, "reasonable", Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue, "reasonable" }; 67public void ListViewSubItem_Ctor_ListViewItem_String_Color_Color_Font(ListViewItem owner, string text, Color foreColor, Color backColor, Font font, Color expectedForeColor, Color expectedBackColor, string expectedText) 84BackColor = Color.Red 90Assert.Equal(Color.Red, subItem.BackColor); 102BackColor = Color.Red 117BackColor = Color.Red 121BackColor = Color.Blue 126Assert.Equal(Color.Red, subItem.BackColor); 135yield return new object[] { Color.Red, Color.Red }; 136yield return new object[] { Color.Empty, SystemColors.Window }; 141public void ListViewSubItem_BackColor_Set_GetReturnsExpected(Color value, Color expected) 156yield return new object[] { Color.Green, Color.Green }; 157yield return new object[] { Color.Empty, Color.Red }; 162public void ListViewSubItem_BackColor_SetWithListViewItemWithListView_GetReturnsExpected(Color value, Color expected) 166BackColor = Color.Red 170BackColor = Color.Blue 186public void ListViewSubItem_BackColor_SetWithListViewItem_GetReturnsExpected(Color value, Color expected) 190BackColor = Color.Blue 333ForeColor = Color.Red 339Assert.Equal(Color.Red, subItem.ForeColor); 351ForeColor = Color.Red 366ForeColor = Color.Red 370ForeColor = Color.Blue 375Assert.Equal(Color.Red, subItem.ForeColor); 384yield return new object[] { Color.Empty, SystemColors.WindowText }; 385yield return new object[] { Color.White, Color.White }; 386yield return new object[] { Color.Black, Color.Black }; 387yield return new object[] { Color.Red, Color.Red }; 392public void ListViewSubItem_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 407yield return new object[] { Color.Green, Color.Green }; 408yield return new object[] { Color.Empty, Color.Red }; 413public void ListViewSubItem_ForeColor_SetWithListViewItemWithListView_GetReturnsExpected(Color value, Color expected) 417ForeColor = Color.Red 421ForeColor = Color.Blue 437public void ListViewSubItem_ForeColor_SetWithListViewItem_GetReturnsExpected(Color value, Color expected) 441ForeColor = Color.Blue 557var subItem = new ListViewItem.ListViewSubItem(owner, "text", Color.Red, Color.Blue, SystemFonts.MenuFont); 573yield return new object[] { new ListViewItem.ListViewSubItem(null, "header", Color.Red, Color.Blue, SystemFonts.MenuFont) { Name = "name", Tag = "tag" } };
System\Windows\Forms\ListViewTests.cs (51)
452yield return new object[] { Color.Empty, SystemColors.Window }; 453yield return new object[] { Color.Red, Color.Red }; 458public void ListView_BackColor_Set_GetReturnsExpected(Color value, Color expected) 475yield return new object[] { Color.Empty, SystemColors.Window, 0 }; 476yield return new object[] { Color.Red, Color.Red, 1 }; 481public void ListView_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 514control.BackColor = Color.FromArgb(0xFF, 0x12, 0x34, 0x56); 532control.BackColor = Color.Red; 533Assert.Equal(Color.Red, control.BackColor); 537control.BackColor = Color.Red; 538Assert.Equal(Color.Red, control.BackColor); 542control.BackColor = Color.Empty; 548control.BackColor = Color.Red; 549Assert.Equal(Color.Red, control.BackColor); 1308yield return new object[] { Color.Empty, SystemColors.WindowText }; 1309yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 1310yield return new object[] { Color.White, Color.White }; 1311yield return new object[] { Color.Black, Color.Black }; 1312yield return new object[] { Color.Red, Color.Red }; 1317public void ListView_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1334yield return new object[] { Color.Empty, SystemColors.WindowText, 0 }; 1335yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 1336yield return new object[] { Color.White, Color.White, 1 }; 1337yield return new object[] { Color.Black, Color.Black, 1 }; 1338yield return new object[] { Color.Red, Color.Red, 1 }; 1343public void ListView_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 1376control.ForeColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78); 1394control.ForeColor = Color.Red; 1395Assert.Equal(Color.Red, control.ForeColor); 1399control.ForeColor = Color.Red; 1400Assert.Equal(Color.Red, control.ForeColor); 1404control.ForeColor = Color.Empty; 1410control.ForeColor = Color.Red; 1411Assert.Equal(Color.Red, control.ForeColor); 1844BackColor = Color.FromArgb(0xFF, 0x12, 0x34, 0x56) 1855ForeColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78) 5053imagecollection.TransparentColor = Color.Transparent;
System\Windows\Forms\MdiClientTests.cs (13)
92public void MdiClient_BackColor_Set_GetReturnsExpected(Color value, Color expected) 121control.BackColor = Color.Red; 122Assert.Equal(Color.Red, control.BackColor); 126control.BackColor = Color.Red; 127Assert.Equal(Color.Red, control.BackColor); 131control.BackColor = Color.Empty; 137control.BackColor = Color.Red; 138Assert.Equal(Color.Red, control.BackColor); 149control.BackColor = Color.Red; 150Assert.Equal(Color.Red, control.BackColor); 165control.BackColor = Color.Red; 166Assert.Equal(Color.Red, control.BackColor);
System\Windows\Forms\MonthCalendarTests.cs (75)
281yield return new object[] { Color.Empty, SystemColors.Window }; 282yield return new object[] { Color.Red, Color.Red }; 287public void MonthCalendar_BackColor_Set_GetReturnsExpected(Color value, Color expected) 304yield return new object[] { Color.Empty, SystemColors.Window, 0 }; 305yield return new object[] { Color.Red, Color.Red, 1 }; 310public void MonthCalendar_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 351control.BackColor = Color.Red; 352Assert.Equal(Color.Red, control.BackColor); 356control.BackColor = Color.Red; 357Assert.Equal(Color.Red, control.BackColor); 361control.BackColor = Color.Empty; 367control.BackColor = Color.Red; 368Assert.Equal(Color.Red, control.BackColor); 921yield return new object[] { Color.Empty, SystemColors.WindowText }; 922yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 923yield return new object[] { Color.White, Color.White }; 924yield return new object[] { Color.Black, Color.Black }; 925yield return new object[] { Color.Red, Color.Red }; 930public void MonthCalendar_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 947yield return new object[] { Color.Empty, SystemColors.WindowText, 0 }; 948yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 949yield return new object[] { Color.White, Color.White, 1 }; 950yield return new object[] { Color.Black, Color.Black, 1 }; 951yield return new object[] { Color.Red, Color.Red, 1 }; 956public void MonthCalendar_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 997control.ForeColor = Color.Red; 998Assert.Equal(Color.Red, control.ForeColor); 1002control.ForeColor = Color.Red; 1003Assert.Equal(Color.Red, control.ForeColor); 1007control.ForeColor = Color.Empty; 1013control.ForeColor = Color.Red; 1014Assert.Equal(Color.Red, control.ForeColor); 1084ForeColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78) 1095BackColor = Color.FromArgb(0xFF, 0x12, 0x34, 0x56) 1106TitleBackColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78) 1117TitleForeColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78) 1128TrailingForeColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78) 2714yield return new object[] { Color.Red }; 2715yield return new object[] { Color.FromArgb(254, 1, 2, 3) }; 2720public void MonthCalendar_TitleBackColor_Set_GetReturnsExpected(Color value) 2737public void MonthCalendar_TitleBackColor_SetWithHandle_GetReturnsExpected(Color value) 2768Assert.Throws<ArgumentException>("value", () => calendar.TitleBackColor = Color.Empty); 2773yield return new object[] { Color.Red }; 2774yield return new object[] { Color.FromArgb(254, 1, 2, 3) }; 2779public void MonthCalendar_TitleForeColor_Set_GetReturnsExpected(Color value) 2796public void MonthCalendar_TitleForeColor_SetWithHandle_GetReturnsExpected(Color value) 2827Assert.Throws<ArgumentException>("value", () => calendar.TitleForeColor = Color.Empty); 2927yield return new object[] { Color.Red }; 2928yield return new object[] { Color.FromArgb(254, 1, 2, 3) }; 2933public void MonthCalendar_TrailingForeColor_Set_GetReturnsExpected(Color value) 2950public void MonthCalendar_TrailingForeColor_SetWithHandle_GetReturnsExpected(Color value) 2981Assert.Throws<ArgumentException>("value", () => calendar.TrailingForeColor = Color.Empty); 4520ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTrailingForeColor(), () => calendar.TrailingForeColor = Color.Red); 4521ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTitleForeColor(), () => calendar.TitleForeColor = Color.Red); 4522ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTitleBackColor(), () => calendar.TitleBackColor = Color.Red); 4574private void TestResetColorProperty(Func<MonthCalendar, Color> getColor, Action<MonthCalendar, Color> setColor, Action<dynamic> resetColor) 4579Color originalColor = getColor(calendar); 4581setColor(calendar, Color.Red); 4582getColor(calendar).Should().Be(Color.Red); 4587setColor(calendar, Color.Red);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (14)
17Assert.Equal(Color.Empty, bag.BackColor); 19Assert.Equal(Color.Empty, bag.ForeColor); 25public void OwnerDrawPropertyBag_BackColor_Set_GetReturnsExpected(Color value) 59public void OwnerDrawPropertyBag_ForeColor_Set_GetReturnsExpected(Color value) 79value.BackColor = Color.Blue; 81value.ForeColor = Color.Red; 85Assert.Equal(Color.Blue, bag.BackColor); 87Assert.Equal(Color.Red, bag.ForeColor); 98Assert.Equal(Color.Empty, bag.BackColor); 100Assert.Equal(Color.Empty, bag.ForeColor); 110original.BackColor = Color.Blue; 112original.ForeColor = Color.Red; 124Assert.Equal(Color.Blue, bag.BackColor); 126Assert.Equal(Color.Red, bag.ForeColor);
System\Windows\Forms\PictureBoxTests.cs (9)
419public void PictureBox_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 446control.ForeColor = Color.Red; 447Assert.Equal(Color.Red, control.ForeColor); 451control.ForeColor = Color.Red; 452Assert.Equal(Color.Red, control.ForeColor); 456control.ForeColor = Color.Empty; 462control.ForeColor = Color.Red; 463Assert.Equal(Color.Red, control.ForeColor);
System\Windows\Forms\Printing\PrintPreviewControlTests.cs (1)
29control.BackColor = Color.FromArgb(customBackColorArgb);
System\Windows\Forms\ProfessionalColorsTests.cs (4)
73public void ProfessionalColors_Properties_Get_ReturnsExpected(Func<Color> factory) 75Color result = factory(); 81public void ProfessionalColors_Properties_GetToolStripManagerVisualStylesEnabled_ReturnsExpected(Func<Color> factory) 88Color result = factory();
System\Windows\Forms\ProfessionalColorTableTests.cs (8)
83public void ProfessionalColorTable_Properties_Get_ReturnsExpected(Func<ProfessionalColorTable, Color> factory) 86Color result = factory(table); 92public void ProfessionalColorTable_Properties_GetUseSystemColors_ReturnsExpected(Func<ProfessionalColorTable, Color> factory) 98Color result = factory(table); 104public void ProfessionalColorTable_Properties_GetToolStripManagerVisualStylesEnabled_ReturnsExpected(Func<ProfessionalColorTable, Color> factory) 112Color result = factory(table); 159Color result = table.ButtonCheckedGradientBegin; 193Color color = table.ButtonSelectedHighlight;
System\Windows\Forms\ProgressBarTests.cs (21)
535public void ProgressBar_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 552yield return new object[] { Color.Red, Color.Red, 1 }; 553yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 554yield return new object[] { Color.Empty, ProgressBar.DefaultForeColor, 1 }; 559public void ProgressBar_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 600control.ForeColor = Color.Red; 601Assert.Equal(Color.Red, control.ForeColor); 605control.ForeColor = Color.Red; 606Assert.Equal(Color.Red, control.ForeColor); 610control.ForeColor = Color.Empty; 616control.ForeColor = Color.Red; 617Assert.Equal(Color.Red, control.ForeColor); 628control.ForeColor = Color.Red; 629Assert.Equal(Color.Red, control.ForeColor); 644control.ForeColor = Color.Red; 645Assert.Equal(Color.Red, control.ForeColor); 2566control.ForeColor = Color.Black;
System\Windows\Forms\PropertyGridInternal\PropertyGridView.DropDownHolderTests.cs (2)
15propertyGridView.BackColor = Color.Green; 18Assert.Equal(Color.Green, dropDownHolder.BackColor);
System\Windows\Forms\PropertyGridTests.cs (217)
61Assert.Equal(Color.Red, control.CommandsActiveLinkColor); 64Assert.Equal(Color.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor); 66Assert.Equal(Color.FromArgb(255, 0, 0, 255), control.CommandsLinkColor); 284public void PropertyGrid_BackColor_Set_GetReturnsExpected(Color value, Color expected) 303yield return new object[] { Color.Red, Color.Red, 1 }; 304yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 309public void PropertyGrid_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 354control.BackColor = Color.Red; 355Assert.Equal(Color.Red, control.BackColor); 359control.BackColor = Color.Red; 360Assert.Equal(Color.Red, control.BackColor); 364control.BackColor = Color.Empty; 370control.BackColor = Color.Red; 371Assert.Equal(Color.Red, control.BackColor); 382control.BackColor = Color.Red; 383Assert.Equal(Color.Red, control.BackColor); 398control.BackColor = Color.Red; 399Assert.Equal(Color.Red, control.BackColor); 698yield return new object[] { Color.Empty }; 699yield return new object[] { Color.Red }; 700yield return new object[] { Color.FromArgb(254, 1, 2, 3) }; 705public void PropertyGrid_CategoryForeColor_Set_GetReturnsExpected(Color value) 722public void PropertyGrid_CategoryForeColor_SetWithHandle_GetReturnsExpected(Color value) 756control.CategoryForeColor = Color.Red; 757Assert.Equal(Color.Red, control.CategoryForeColor); 772control.CategoryForeColor = Color.Red; 773Assert.Equal(Color.Red, control.CategoryForeColor); 783public void PropertyGrid_CategorySplitterColor_Set_GetReturnsExpected(Color value) 800public void PropertyGrid_CategorySplitterColor_SetWithHandle_GetReturnsExpected(Color value) 834control.CategorySplitterColor = Color.Red; 835Assert.Equal(Color.Red, control.CategorySplitterColor); 850control.CategorySplitterColor = Color.Red; 851Assert.Equal(Color.Red, control.CategorySplitterColor); 861yield return new object[] { Color.Empty, Color.Red }; 862yield return new object[] { Color.Red, Color.Red }; 863yield return new object[] { Color.Blue, Color.Blue }; 868public void PropertyGrid_CommandsActiveLinkColor_Set_GetReturnsExpected(Color value, Color expected) 885public void PropertyGrid_CommandsActiveLinkColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 919control.CommandsActiveLinkColor = Color.Black; 920Assert.Equal(Color.Black, control.CommandsActiveLinkColor); 924Assert.Equal(Color.Red, control.CommandsActiveLinkColor); 935control.CommandsActiveLinkColor = Color.Black; 936Assert.Equal(Color.Black, control.CommandsActiveLinkColor); 940Assert.Equal(Color.Red, control.CommandsActiveLinkColor); 946public void PropertyGrid_CommandsBackColor_Set_GetReturnsExpected(Color value, Color expected) 963public void PropertyGrid_CommandsBackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 997control.CommandsBackColor = Color.Red; 998Assert.Equal(Color.Red, control.CommandsBackColor); 1013control.CommandsBackColor = Color.Red; 1014Assert.Equal(Color.Red, control.CommandsBackColor); 1026Assert.Throws<ArgumentException>(() => control.CommandsBackColor = Color.FromArgb(254, 1, 2, 3)); 1031public void PropertyGrid_CommandsBorderColor_Set_GetReturnsExpected(Color value) 1048public void PropertyGrid_CommandsBorderColor_SetWithHandle_GetReturnsExpected(Color value) 1082control.CommandsBorderColor = Color.Red; 1083Assert.Equal(Color.Red, control.CommandsBorderColor); 1098control.CommandsBorderColor = Color.Red; 1099Assert.Equal(Color.Red, control.CommandsBorderColor); 1109yield return new object[] { Color.Empty, Color.FromArgb(255, 133, 133, 133) }; 1110yield return new object[] { Color.Red, Color.Red }; 1111yield return new object[] { Color.Blue, Color.Blue }; 1116public void PropertyGrid_CommandsDisabledLinkColor_Set_GetReturnsExpected(Color value, Color expected) 1133public void PropertyGrid_CommandsDisabledLinkColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 1167control.CommandsDisabledLinkColor = Color.Red; 1168Assert.Equal(Color.Red, control.CommandsDisabledLinkColor); 1172Assert.Equal(Color.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor); 1183control.CommandsDisabledLinkColor = Color.Red; 1184Assert.Equal(Color.Red, control.CommandsDisabledLinkColor); 1188Assert.Equal(Color.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor); 1194public void PropertyGrid_CommandsForeColor_Set_GetReturnsExpected(Color value, Color expected) 1211public void PropertyGrid_CommandsForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 1245control.CommandsForeColor = Color.Red; 1246Assert.Equal(Color.Red, control.CommandsForeColor); 1261control.CommandsForeColor = Color.Red; 1262Assert.Equal(Color.Red, control.CommandsForeColor); 1272yield return new object[] { Color.Empty, Color.FromArgb(255, 0, 0, 255) }; 1273yield return new object[] { Color.Red, Color.Red }; 1274yield return new object[] { Color.Blue, Color.Blue }; 1279public void PropertyGrid_CommandsLinkColor_Set_GetReturnsExpected(Color value, Color expected) 1296public void PropertyGrid_CommandsLinkColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 1330control.CommandsLinkColor = Color.Red; 1331Assert.Equal(Color.Red, control.CommandsLinkColor); 1335Assert.Equal(Color.FromArgb(255, 0, 0, 255), control.CommandsLinkColor); 1346control.CommandsLinkColor = Color.Red; 1347Assert.Equal(Color.Red, control.CommandsLinkColor); 1351Assert.Equal(Color.FromArgb(255, 0, 0, 255), control.CommandsLinkColor); 1443public void PropertyGrid_DisabledItemForeColor_Set_GetReturnsExpected(Color value) 1460public void PropertyGrid_DisabledItemForeColor_SetWithHandle_GetReturnsExpected(Color value) 1494control.DisabledItemForeColor = Color.Red; 1495Assert.Equal(Color.Red, control.DisabledItemForeColor); 1510control.DisabledItemForeColor = Color.Red; 1511Assert.Equal(Color.Red, control.DisabledItemForeColor); 1546CommandsBackColor = Color.FromArgb(255, 0, 0, 1), 1547CommandsForeColor = Color.FromArgb(255, 0, 0, 2), 1548CommandsLinkColor = Color.FromArgb(255, 0, 0, 3), 1549CommandsActiveLinkColor = Color.FromArgb(255, 0, 0, 4), 1550CommandsDisabledLinkColor = Color.FromArgb(255, 0, 0, 5) 1556Assert.Equal(Color.FromArgb(255, 0, 0, 1), control.CommandsBackColor); 1557Assert.Equal(Color.FromArgb(255, 0, 0, 2), control.CommandsForeColor); 1558Assert.Equal(Color.FromArgb(255, 0, 0, 255), control.CommandsLinkColor); 1559Assert.Equal(Color.Red, control.CommandsActiveLinkColor); 1560Assert.Equal(Color.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor); 1566Assert.Equal(Color.FromArgb(255, 0, 0, 1), control.CommandsBackColor); 1567Assert.Equal(Color.FromArgb(255, 0, 0, 2), control.CommandsForeColor); 1568Assert.Equal(Color.FromArgb(255, 0, 0, 255), control.CommandsLinkColor); 1569Assert.Equal(Color.Red, control.CommandsActiveLinkColor); 1570Assert.Equal(Color.FromArgb(255, 133, 133, 133), control.CommandsDisabledLinkColor); 1613public void PropertyGrid_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1630yield return new object[] { Color.Red, Color.Red, 1 }; 1631yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 1632yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 1637public void PropertyGrid_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 1679control.ForeColor = Color.Red; 1680Assert.Equal(Color.Red, control.ForeColor); 1684control.ForeColor = Color.Red; 1685Assert.Equal(Color.Red, control.ForeColor); 1689control.ForeColor = Color.Empty; 1695control.ForeColor = Color.Red; 1696Assert.Equal(Color.Red, control.ForeColor); 1707control.ForeColor = Color.Red; 1708Assert.Equal(Color.Red, control.ForeColor); 1723control.ForeColor = Color.Red; 1724Assert.Equal(Color.Red, control.ForeColor); 1734public void PropertyGrid_HelpBackColor_Set_GetReturnsExpected(Color value, Color expected) 1751public void PropertyGrid_HelpBackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 1785control.HelpBackColor = Color.Red; 1786Assert.Equal(Color.Red, control.HelpBackColor); 1801control.HelpBackColor = Color.Red; 1802Assert.Equal(Color.Red, control.HelpBackColor); 1814Assert.Throws<ArgumentException>(() => control.HelpBackColor = Color.FromArgb(254, 1, 2, 3)); 1819public void PropertyGrid_HelpBorderColor_Set_GetReturnsExpected(Color value) 1836public void PropertyGrid_HelpBorderColor_SetWithHandle_GetReturnsExpected(Color value) 1870control.HelpBorderColor = Color.Red; 1871Assert.Equal(Color.Red, control.HelpBorderColor); 1886control.HelpBorderColor = Color.Red; 1887Assert.Equal(Color.Red, control.HelpBorderColor); 1897public void PropertyGrid_HelpForeColor_Set_GetReturnsExpected(Color value, Color expected) 1914public void PropertyGrid_HelpForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 1948control.HelpForeColor = Color.Red; 1949Assert.Equal(Color.Red, control.HelpForeColor); 1964control.HelpForeColor = Color.Red; 1965Assert.Equal(Color.Red, control.HelpForeColor); 2153public void PropertyGrid_LineColor_Set_GetReturnsExpected(Color value) 2170public void PropertyGrid_LineColor_SetWithHandle_GetReturnsExpected(Color value) 2204control.LineColor = Color.Red; 2205Assert.Equal(Color.Red, control.LineColor); 2220control.LineColor = Color.Red; 2221Assert.Equal(Color.Red, control.LineColor); 2400public void PropertyGrid_SelectedItemWithFocusBackColor_Set_GetReturnsExpected(Color value) 2417public void PropertyGrid_SelectedItemWithFocusBackColor_SetWithHandle_GetReturnsExpected(Color value) 2451control.SelectedItemWithFocusBackColor = Color.Red; 2452Assert.Equal(Color.Red, control.SelectedItemWithFocusBackColor); 2467control.SelectedItemWithFocusBackColor = Color.Red; 2468Assert.Equal(Color.Red, control.SelectedItemWithFocusBackColor); 2478public void PropertyGrid_SelectedItemWithFocusForeColor_Set_GetReturnsExpected(Color value) 2495public void PropertyGrid_SelectedItemWithFocusForeColor_SetWithHandle_GetReturnsExpected(Color value) 2529control.SelectedItemWithFocusForeColor = Color.Red; 2530Assert.Equal(Color.Red, control.SelectedItemWithFocusForeColor); 2545control.SelectedItemWithFocusForeColor = Color.Red; 2546Assert.Equal(Color.Red, control.SelectedItemWithFocusForeColor); 3203public void PropertyGrid_ViewBackColor_Set_GetReturnsExpected(Color value, Color expected) 3221public void PropertyGrid_ViewBackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 3255control.ViewBackColor = Color.Red; 3256Assert.Equal(Color.Red, control.ViewBackColor); 3271control.ViewBackColor = Color.Red; 3272Assert.Equal(Color.Red, control.ViewBackColor); 3284Assert.Throws<ArgumentException>(() => control.ViewBackColor = Color.FromArgb(254, 1, 2, 3)); 3289public void PropertyGrid_ViewBorderColor_Set_GetReturnsExpected(Color value) 3306public void PropertyGrid_ViewBorderColor_SetWithHandle_GetReturnsExpected(Color value) 3340control.ViewBorderColor = Color.Red; 3341Assert.Equal(Color.Red, control.ViewBorderColor); 3356control.ViewBorderColor = Color.Red; 3357Assert.Equal(Color.Red, control.ViewBorderColor); 3367yield return new object[] { Color.Empty, SystemColors.ControlText }; 3368yield return new object[] { Color.Red, Color.Red }; 3369yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 3374public void PropertyGrid_ViewForeColor_Set_GetReturnsExpected(Color value, Color expected) 3391public void PropertyGrid_ViewForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 3425control.ViewForeColor = Color.Red; 3426Assert.Equal(Color.Red, control.ViewForeColor); 3441control.ViewForeColor = Color.Red; 3442Assert.Equal(Color.Red, control.ViewForeColor);
System\Windows\Forms\PropertyStoreTests.cs (7)
30{ 15, Color.Red }, 84store.TryGetValue(1, out Color outValue).Should().BeFalse(); 85Color color = default; 115Action action = () => store.TryGetValue(1, out Color outValue); 143store.TryGetValue(1, out Color? outValue).Should().BeFalse(); 376Color value = default; 380value.Should().Be(store.GetValueOrDefault<Color>(1));
System\Windows\Forms\RichTextBoxTests.cs (112)
119Assert.Equal(Color.Empty, control.SelectionBackColor); 646yield return new object[] { Color.Empty, SystemColors.Window }; 647yield return new object[] { Color.Red, Color.Red }; 652public void RichTextBox_BackColor_Set_GetReturnsExpected(Color value, Color expected) 669yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 670yield return new object[] { Color.Red, Color.Red, 1 }; 675public void Control_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 716control.BackColor = Color.Red; 717Assert.Equal(Color.Red, control.BackColor); 721control.BackColor = Color.Red; 722Assert.Equal(Color.Red, control.BackColor); 726control.BackColor = Color.Empty; 732control.BackColor = Color.Red; 733Assert.Equal(Color.Red, control.BackColor); 1677yield return new object[] { Color.Empty, SystemColors.WindowText }; 1678yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 1679yield return new object[] { Color.White, Color.White }; 1680yield return new object[] { Color.Black, Color.Black }; 1681yield return new object[] { Color.Red, Color.Red }; 1686public void RichTextBox_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1703yield return new object[] { Color.Empty, SystemColors.WindowText, 0 }; 1704yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 1705yield return new object[] { Color.White, Color.White, 1 }; 1706yield return new object[] { Color.Black, Color.Black, 1 }; 1707yield return new object[] { Color.Red, Color.Red, 1 }; 1712public void RichTextBox_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 1745control.ForeColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78); 1760control.ForeColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78); 1769control.ForeColor = Color.FromArgb(0x34, 0x56, 0x78, 0x90); 1792control.ForeColor = Color.Red; 1793Assert.Equal(Color.Red, control.ForeColor); 1797control.ForeColor = Color.Red; 1798Assert.Equal(Color.Red, control.ForeColor); 1802control.ForeColor = Color.Empty; 1808control.ForeColor = Color.Red; 1809Assert.Equal(Color.Red, control.ForeColor); 3838yield return new object[] { 0, 0, 0x78563412, Color.Empty }; 3839yield return new object[] { 0, CFE_EFFECTS.CFE_AUTOBACKCOLOR, 0x78563412, Color.Red }; 3840yield return new object[] { 0, CFE_EFFECTS.CFE_AUTOBACKCOLOR | CFE_EFFECTS.CFE_ALLCAPS, 0x78563412, Color.Red }; 3841yield return new object[] { CFM_MASK.CFM_BACKCOLOR, 0, 0x78563412, Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 3842yield return new object[] { CFM_MASK.CFM_BACKCOLOR, 0, 0x785634, Color.FromArgb(0xFF, 0x34, 0x56, 0x78) }; 3843yield return new object[] { CFM_MASK.CFM_BACKCOLOR | CFM_MASK.CFM_ANIMATION, 0, 0x78563412, Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 3844yield return new object[] { CFM_MASK.CFM_BACKCOLOR, CFE_EFFECTS.CFE_AUTOBACKCOLOR, 0x78563412, Color.Red }; 3845yield return new object[] { CFM_MASK.CFM_ALLCAPS, 0, 0x78563412, Color.Empty }; 3850public void RichTextBox_SelectionBackColor_CustomGetCharFormat_ReturnsExpected(uint mask, uint effects, int backColor, Color expected) 3861BackColor = Color.Red 3870public void RichTextBox_SelectionBackColor_CustomGetCharFormatWithBackColor_ReturnsExpected(uint mask, uint effects, int backColor, Color expected) 3881BackColor = Color.Red 3884control.SelectionBackColor = Color.Yellow; 3893Assert.Equal(Color.Empty, control.SelectionBackColor); 3902Assert.Equal(Color.Empty, control.SelectionBackColor); 3907yield return new object[] { Color.Empty }; 3908yield return new object[] { Color.Red }; 3909yield return new object[] { Color.FromArgb(0x12, 0x34, 0x56, 0x78) }; 3914public void RichTextBox_SelectionBackColor_Set_GetReturnsExpected(Color value) 3931yield return new object[] { Color.Empty, SystemColors.Window }; 3932yield return new object[] { Color.Red, Color.Red }; 3933yield return new object[] { Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.FromArgb(0xFF, 0x34, 0x56, 0x78) }; 3938public void RichTextBox_SelectionBackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 3971control.SelectionBackColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78); 3982yield return new object[] { Color.Empty }; 3983yield return new object[] { Color.Red }; 3984yield return new object[] { Color.FromArgb(0x12, 0x34, 0x56, 0x78) }; 3989public void RichTextBox_SelectionBackColor_SetCantCreateHandle_GetReturnsExpected(Color value) 4004public void RichTextBox_SelectionBackColor_SetDisposed_ThrowsObjectDisposedException(Color value) 4477Assert.Equal(Color.Black, control.SelectionColor); 4481Assert.Equal(Color.Black, control.SelectionColor); 4497Assert.Equal(Color.Black, control.SelectionColor); 4504Assert.Equal(Color.Black, control.SelectionColor); 4513yield return new object[] { CFM_MASK.CFM_COLOR, 0x785634, Color.FromArgb(0xFF, 0x34, 0x56, 0x78) }; 4514yield return new object[] { CFM_MASK.CFM_COLOR, 0x78563412, Color.FromArgb(0xFF, 0x12, 0x34, 0x56) }; 4515yield return new object[] { CFM_MASK.CFM_COLOR, 0, Color.Black }; 4517yield return new object[] { 0, 0x785634, Color.Empty }; 4518yield return new object[] { 0, 0x78563412, Color.Empty }; 4519yield return new object[] { 0, 0, Color.Empty }; 4524public void RichTextBox_SelectionColor_CustomGetCharFormat_Success(uint mask, int textColor, Color expected) 4545Assert.Equal(Color.Empty, control.SelectionColor); 4559yield return new object[] { Color.Empty, Color.Black }; 4560yield return new object[] { Color.Red, Color.Red }; 4561yield return new object[] { Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.FromArgb(0xFF, 0x34, 0x56, 0x78) }; 4566public void RichTextBox_SelectionColor_Set_GetReturnsExpected(Color value, Color expected) 4583public void RichTextBox_SelectionColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 4616control.SelectionColor = Color.FromArgb(0x12, 0x34, 0x56, 0x78); 4627yield return new object[] { Color.Empty }; 4628yield return new object[] { Color.Red }; 4629yield return new object[] { Color.FromArgb(0x12, 0x34, 0x56, 0x78) }; 4634public void RichTextBox_SelectionColor_SetCantCreateHandle_GetReturnsExpected(Color value) 4638Assert.Equal(Color.Empty, control.SelectionColor); 4643Assert.Equal(Color.Empty, control.SelectionColor); 4649public void RichTextBox_SelectionColor_SetDisposed_ThrowsObjectDisposedException(Color value)
System\Windows\Forms\ScrollableControlTests.cs (64)
1514yield return new object[] { hScroll, vScroll, true, Color.Empty, backgroundImage, backgroundImageLayout }; 1515yield return new object[] { hScroll, vScroll, true, Color.Red, backgroundImage, backgroundImageLayout }; 1516yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout }; 1517yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout }; 1518yield return new object[] { hScroll, vScroll, false, Color.Empty, backgroundImage, backgroundImageLayout }; 1519yield return new object[] { hScroll, vScroll, false, Color.Red, backgroundImage, backgroundImageLayout }; 1528public void ScrollableControl_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 1587yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 1588yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 1589yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 1590yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 1591yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 1592yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 1596yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1597yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1598yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 1599yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 1600yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1601yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1603yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1604yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1605yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 }; 1606yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 }; 1607yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1608yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1630yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 1631yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 1632yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 1633yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 1641yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 1642yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 1646yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1647yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1648yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 }; 1649yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 }; 1650yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1651yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1653yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 1654yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 1655yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 1656yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 1657yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 1658yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 }; 1675public void ScrollableControl_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 1727public void ScrollableControl_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 1787yield return new object[] { hScroll, vScroll, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 1788yield return new object[] { hScroll, vScroll, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 1789yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 1790yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 1791yield return new object[] { hScroll, vScroll, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 1792yield return new object[] { hScroll, vScroll, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 1796yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1797yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1798yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 1799yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 1800yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1801yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 1803yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1804yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1805yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1806yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1807yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1808yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 1815public 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)
194public void ScrollBar_BackColor_Set_GetReturnsExpected(Color value, Color expected) 223control.BackColor = Color.Red; 224Assert.Equal(Color.Red, control.BackColor); 228control.BackColor = Color.Red; 229Assert.Equal(Color.Red, control.BackColor); 233control.BackColor = Color.Empty; 239control.BackColor = Color.Red; 240Assert.Equal(Color.Red, control.BackColor); 543public void ScrollBar_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 572control.ForeColor = Color.Red; 573Assert.Equal(Color.Red, control.ForeColor); 577control.ForeColor = Color.Red; 578Assert.Equal(Color.Red, control.ForeColor); 582control.ForeColor = Color.Empty; 588control.ForeColor = Color.Red; 589Assert.Equal(Color.Red, control.ForeColor);
System\Windows\Forms\SplitterTests.cs (16)
795public void Splitter_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 812yield return new object[] { Color.Red, Color.Red, 1 }; 813yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 814yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 819public void Splitter_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 860control.ForeColor = Color.Red; 861Assert.Equal(Color.Red, control.ForeColor); 865control.ForeColor = Color.Red; 866Assert.Equal(Color.Red, control.ForeColor); 870control.ForeColor = Color.Empty; 876control.ForeColor = Color.Red; 877Assert.Equal(Color.Red, control.ForeColor);
System\Windows\Forms\StatusStripTests.cs (1)
1187Assert.Equal(Color.Transparent, grip.BackColor);
System\Windows\Forms\StatusStripTests.Rendering.cs (5)
17BackColor = Color.Blue, 45Validate.BitBltValidator(bitBltBounds, State.BrushColor(Color.Blue)), 46Validate.Polyline16(polylineBounds, null, State.Pen(16, Color.Green, penStyle))); 53public override Color StatusStripBorder => Color.Green;
System\Windows\Forms\TabControlTests.cs (25)
528yield return new object[] { Color.Red }; 529yield return new object[] { Color.FromArgb(254, 1, 2, 3) }; 530yield return new object[] { Color.Empty }; 535public void TabControl_BackColor_Set_GetReturnsExpected(Color value) 552public void TabControl_BackColor_SetWithHandle_GetReturnsExpected(Color value) 594control.BackColor = Color.Red; 599control.BackColor = Color.Red; 604control.BackColor = Color.Empty; 610control.BackColor = Color.Red; 922public void TabControl_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 939yield return new object[] { Color.Red, Color.Red, 1 }; 940yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 941yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 946public void TabControl_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 988control.ForeColor = Color.Red; 989Assert.Equal(Color.Red, control.ForeColor); 993control.ForeColor = Color.Red; 994Assert.Equal(Color.Red, control.ForeColor); 998control.ForeColor = Color.Empty; 1004control.ForeColor = Color.Red; 1005Assert.Equal(Color.Red, control.ForeColor);
System\Windows\Forms\TabPageTests.cs (74)
599Assert.Equal(Color.Transparent, control.BackColor); 611yield return new object[] { true, TabAppearance.Normal, Color.Transparent }; 619public static void TabPage_BackColor_GetVisualStylesWithParent_ReturnsExpected(bool useVisualStyleBackColorParam, TabAppearance parentAppearanceParam, Color expectedParam) 626Color expected = Color.FromArgb(int.Parse(expectedString)); 645public void TabPage_BackColor_Set_GetReturnsExpected(Color value, Color expected) 662public void TabPage_BackColor_SetWithUseVisualStyleBackColor_GetReturnsExpected(Color value, Color expected) 682public void TabPage_BackColor_SetDesignMode_GetReturnsExpected(Color value, Color expected) 724public void TabPage_BackColor_SetDesignModeWithUseVisualStyleBackColor_GetReturnsExpected(Color value, Color expected) 767public void TabPage_BackColor_SetDesignModeWithInvalidDescriptor_GetReturnsExpected(Color value, Color expected) 826yield return new object[] { Color.Red, Color.Red, 1 }; 827yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 832public void TabPage_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 873control.BackColor = Color.Red; 874Assert.Equal(Color.Red, control.BackColor); 878control.BackColor = Color.Red; 879Assert.Equal(Color.Red, control.BackColor); 883control.BackColor = Color.Empty; 889control.BackColor = Color.Red; 890Assert.Equal(Color.Red, control.BackColor); 2284control.BackColor = Color.FromArgb(254, 255, 255, 255); 3962yield return new object[] { true, Color.Empty, backgroundImage, backgroundImageLayout }; 3963yield return new object[] { true, Color.Red, backgroundImage, backgroundImageLayout }; 3964yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout }; 3965yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout }; 3966yield return new object[] { false, Color.Empty, backgroundImage, backgroundImageLayout }; 3967yield return new object[] { false, Color.Red, backgroundImage, backgroundImageLayout }; 3974public void TabPage_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 4016yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 4017yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 4018yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 4019yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 4020yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 4021yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 4025yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4026yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4027yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 4028yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 4029yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4030yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4032yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4033yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4034yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4035yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4036yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4037yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4044public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 4100public void TabPage_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 4155yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 4156yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 4157yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 4158yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 4159yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 4160yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 4164yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4165yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4166yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 4167yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 4168yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4169yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 4171yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4172yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4173yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4174yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4175yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4176yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 4183public 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)
21yield return new object[] { hint, text, null, Point.Empty, Color.Red }; 22yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Red }; 23yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Black }; 24yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.White }; 25yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Transparent }; 26yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Empty }; 33public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt, Color foreColor) 50yield return new object[] { hint, text, null, Point.Empty, Color.Red, Color.Blue }; 51yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Red, Color.Blue }; 52yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Black, Color.Blue }; 53yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.White, Color.Blue }; 54yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Transparent, Color.Blue }; 55yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Empty, Color.Blue }; 56yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Red }; 57yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Black }; 58yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.White }; 59yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Transparent }; 60yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Empty }; 67public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt, Color foreColor, Color backColor) 84yield return new object[] { hint, text, null, Point.Empty, Color.Red, TextFormatFlags.Default, }; 85yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Red, TextFormatFlags.Default, }; 86yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Black, TextFormatFlags.Default, }; 87yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.White, TextFormatFlags.Default, }; 88yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Transparent, TextFormatFlags.Default, }; 89yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Empty, TextFormatFlags.Default, }; 91yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.HorizontalCenter }; 92yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 93yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Bottom | TextFormatFlags.Right }; 94yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.SingleLine }; 95yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)1024 }; 96yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.RightToLeft }; 97yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)int.MaxValue }; 104public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt, Color foreColor, TextFormatFlags flags) 121yield return new object[] { hint, text, null, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default, }; 122yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Red, Color.Blue, TextFormatFlags.Default, }; 123yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Black, Color.Blue, TextFormatFlags.Default, }; 124yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.White, Color.Blue, TextFormatFlags.Default, }; 125yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Transparent, Color.Blue, TextFormatFlags.Default, }; 126yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.Empty, Color.Blue, TextFormatFlags.Default, }; 127yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Red, TextFormatFlags.Default, }; 128yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Black, TextFormatFlags.Default, }; 129yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.White, TextFormatFlags.Default, }; 130yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Transparent, TextFormatFlags.Default, }; 131yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Empty, TextFormatFlags.Default, }; 133yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 134yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right }; 135yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.SingleLine }; 136yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)1024 }; 137yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.RightToLeft }; 138yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue }; 145public void TextRenderer_DrawText_InvokeIDeviceContextStringFontPointColorColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Point pt, Color foreColor, Color backColor, TextFormatFlags flags) 162yield return new object[] { hint, text, null, Rectangle.Empty, Color.Red }; 163yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4), Color.Red }; 164yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red }; 165yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 3, 4), Color.Red }; 166yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red }; 167yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black }; 168yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.White }; 169yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent }; 170yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty }; 177public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle bounds, Color foreColor) 194yield return new object[] { hint, text, null, Rectangle.Empty, Color.Red, Color.Blue }; 195yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4), Color.Red, Color.Blue }; 196yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, Color.Blue }; 197yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue }; 198yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, Color.Blue }; 199yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, Color.Blue }; 200yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, Color.Blue }; 201yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, Color.Blue }; 202yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Red }; 203yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Black }; 204yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.White }; 205yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Transparent }; 206yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Empty }; 213public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle, Color foreColor, Color backColor) 230yield return new object[] { hint, text, null, Rectangle.Empty, Color.Red, TextFormatFlags.Default, }; 231yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4), Color.Red, TextFormatFlags.Default, }; 232yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, TextFormatFlags.Default, }; 233yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default, }; 234yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, TextFormatFlags.Default, }; 235yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, TextFormatFlags.Default, }; 236yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, TextFormatFlags.Default, }; 237yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, TextFormatFlags.Default, }; 239yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.HorizontalCenter }; 240yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 241yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Bottom | TextFormatFlags.Right }; 242yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.SingleLine }; 243yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, TextFormatFlags.SingleLine }; 244yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)1024 }; 245yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.RightToLeft }; 246yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)int.MaxValue }; 253public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle, Color foreColor, TextFormatFlags flags) 270yield return new object[] { hint, text, null, Rectangle.Empty, Color.Red, Color.Blue, TextFormatFlags.Default, }; 271yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4), Color.Red, Color.Blue, TextFormatFlags.Default, }; 272yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Blue, Color.Blue, TextFormatFlags.Default, }; 273yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default, }; 274yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, Color.Blue, TextFormatFlags.Default, }; 275yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, Color.Blue, TextFormatFlags.Default, }; 276yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, Color.Blue, TextFormatFlags.Default, }; 277yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, Color.Blue, TextFormatFlags.Default, }; 278yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Red, TextFormatFlags.Default, }; 279yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Black, TextFormatFlags.Default, }; 280yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.White, TextFormatFlags.Default, }; 281yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Transparent, TextFormatFlags.Default, }; 282yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Empty, TextFormatFlags.Default, }; 284yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 285yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right }; 286yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.SingleLine }; 287yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, Color.Blue, TextFormatFlags.SingleLine }; 288yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)1024 }; 289yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.RightToLeft }; 290yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue }; 297public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle, Color foreColor, Color backColor, TextFormatFlags flags) 323TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty, Color.Red); 327TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue); 331TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Default); 335TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default); 339TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red); 343TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default); 347TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue); 351TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default); 355TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty, Color.Red); 359TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue); 363TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Default); 367TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default); 371TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red); 375TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default); 379TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue); 383TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default); 391Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.DrawText(null, "text", SystemFonts.MenuFont, Point.Empty, Color.Red)); 583State.TextColor(Color.Blue), 592pt: default, Color.Blue), 595pt: default, Color.Blue, flags: default), 598bounds: new Rectangle(0, 0, int.MaxValue, int.MaxValue), Color.Blue), 601bounds: new Rectangle(0, 0, int.MaxValue, int.MaxValue), Color.Blue, flags: default), 620Color.Empty, 627Color.Empty, 628Color.Empty, 635Color.Empty, 642Color.Empty, 643Color.Empty, 678Color.Red, 687State.TextColor(Color.Red))); 701Color.Red, 710State.TextColor(Color.Red))); 771Color.Red, 786State.TextColor(Color.Red)));
System\Windows\Forms\ToolStripArrowRenderEventArgsTests.cs (11)
14Assert.Throws<ArgumentNullException>(() => new ToolStripArrowRenderEventArgs(null, toolStripButton, Rectangle.Empty, Color.Empty, ArrowDirection.Up)); 21yield return new object[] { graphics, null, Rectangle.Empty, Color.Empty, ArrowDirection.Down + 1 }; 22yield return new object[] { graphics, new ToolStripButton(), new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down }; 23yield return new object[] { graphics, new ToolStripButton(), new Rectangle(-1, -2, -3, -4), Color.Blue, ArrowDirection.Down }; 28public void Ctor_Graphics_ToolStripItem_Rectangle_Color_ArrowDirection(Graphics g, ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) 52ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down) 61yield return new object[] { Color.Empty }; 62yield return new object[] { Color.Red }; 67public void ArrowColor_Set_GetReturnsExpected(Color value) 72ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down) 87ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down)
System\Windows\Forms\ToolStripButtonTests.cs (11)
64Assert.Equal(Color.Empty, item.ImageTransparentColor); 145Assert.Equal(Color.Empty, item.ImageTransparentColor); 232Assert.Equal(Color.Empty, item.ImageTransparentColor); 322Assert.Equal(Color.Empty, item.ImageTransparentColor); 410Assert.Equal(Color.Empty, item.ImageTransparentColor); 508Assert.Equal(Color.Empty, item.ImageTransparentColor); 1278ForeColor = Color.Red, 1316Assert.Equal(Color.Red, e.TextColor); 1369ForeColor = Color.Red, 1407Assert.Equal(Color.Red, e.TextColor); 1468ForeColor = Color.Red,
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (2)
44BackColor = Color.Blue, 60State.Brush(Color.Blue, BRUSH_STYLE.BS_SOLID)));
System\Windows\Forms\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapterTests.cs (7)
55Color result = (Color)_adapter.TestAccessor().Dynamic.GetOuterBorderColor(_comboBox); 57result.Should().Be(Color.FromKnownColor(expectedColor)); 69Color result = (Color)_adapter.TestAccessor().Dynamic.GetPopupOuterBorderColor(_comboBox, focused); 71result.Should().Be(Color.FromKnownColor(expectedColor)); 83bitmap.GetPixel(50, 50).Should().NotBe(Color.Empty);
System\Windows\Forms\ToolStripContentPanelTests.cs (33)
608public void ToolStripContentPanel_BackColor_Set_GetReturnsExpected(Color value, Color expected) 625yield return new object[] { Color.Empty, Color.Blue }; 626yield return new object[] { Color.Red, Color.Red }; 627yield return new object[] { Color.Transparent, Color.Transparent }; 632public void ToolStripContentPanel_BackColor_SetWithParent_GetReturnsExpected(Color value, Color expected) 636BackColor = Color.Blue 644Assert.Equal(Color.Blue, parent.BackColor); 650Assert.Equal(Color.Blue, parent.BackColor); 657yield return new object[] { Color.Empty, Color.Blue, Color.Blue }; 658yield return new object[] { Color.Red, Color.Red, Color.Blue }; 659yield return new object[] { Color.Transparent, Color.Transparent, Color.Transparent }; 664public void ToolStripContentPanel_BackColor_SetWithToolStripContainerParent_GetReturnsExpected(Color value, Color expected, Color expectedBackColor) 668BackColor = Color.Blue 699control.BackColor = Color.Red; 700Assert.Equal(Color.Red, control.BackColor); 704control.BackColor = Color.Red; 705Assert.Equal(Color.Red, control.BackColor); 709control.BackColor = Color.Empty; 715control.BackColor = Color.Red; 716Assert.Equal(Color.Red, control.BackColor);
System\Windows\Forms\ToolStripControlHostTests.cs (49)
27BackColor = Color.Red, 32ForeColor = Color.Blue, 93Assert.Equal(Color.Empty, item.ImageTransparentColor); 264public void ToolStripControlHost_BackColor_Set_GetReturnsExpected(Color value, Color expected) 297item.BackColor = Color.Red; 298Assert.Equal(Color.Red, item.BackColor); 302item.BackColor = Color.Red; 303Assert.Equal(Color.Red, item.BackColor); 307item.BackColor = Color.Empty; 313item.BackColor = Color.Red; 314Assert.Equal(Color.Red, item.BackColor); 325Assert.Throws<ObjectDisposedException>(() => item.BackColor = Color.Red); 336item.BackColor = Color.Red; 337Assert.Equal(Color.Red, item.BackColor); 367item.BackColor = Color.Red; 368Assert.Equal(Color.Red, item.BackColor); 546c.BackColor = Color.Red; 547Assert.Equal(Color.Red, c.BackColor); 548Assert.Equal(Color.Red, item.BackColor); 629c.ForeColor = Color.Red; 630Assert.Equal(Color.Red, c.ForeColor); 631Assert.Equal(Color.Red, item.ForeColor); 1083public void ToolStripControlHost_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1116item.ForeColor = Color.Red; 1117Assert.Equal(Color.Red, item.ForeColor); 1121item.ForeColor = Color.Red; 1122Assert.Equal(Color.Red, item.ForeColor); 1126item.ForeColor = Color.Empty; 1132item.ForeColor = Color.Red; 1133Assert.Equal(Color.Red, item.ForeColor); 1144Assert.Throws<ObjectDisposedException>(() => item.ForeColor = Color.Red); 1155item.ForeColor = Color.Red; 1156Assert.Equal(Color.Red, item.ForeColor); 1186item.ForeColor = Color.Red; 1187Assert.Equal(Color.Red, item.ForeColor); 1207foreach (Color imageTransparentColor in new Color[] { Color.Empty, Color.Red }) 1218public void ToolStripControlHost_Image_Set_GetReturnsExpected(Color imageTransparentColor, Image value) 1333foreach (Color color in new Color[] { Color.Empty, Color.Red }) 1344public void ToolStripControlHost_ImageTransparentColor_Set_GetReturnsExpected(Image image, Color value) 4397item.BackColor = Color.Black; 4430item.ForeColor = Color.Black;
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
64Assert.Equal(Color.Empty, item.ImageTransparentColor); 153Assert.Equal(Color.Empty, item.ImageTransparentColor); 252Assert.Equal(Color.Empty, item.ImageTransparentColor); 360Assert.Equal(Color.Empty, item.ImageTransparentColor);
System\Windows\Forms\ToolStripDropDownTests.cs (9)
1707public void ToolStripDropDown_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1736control.ForeColor = Color.Red; 1737Assert.Equal(Color.Red, control.ForeColor); 1741control.ForeColor = Color.Red; 1742Assert.Equal(Color.Red, control.ForeColor); 1746control.ForeColor = Color.Empty; 1752control.ForeColor = Color.Red; 1753Assert.Equal(Color.Red, control.ForeColor);
System\Windows\Forms\ToolStripItemTests.cs (120)
63Assert.Equal(Color.Empty, item.ImageTransparentColor); 148Assert.Equal(Color.Empty, item.ImageTransparentColor); 243Assert.Equal(Color.Empty, item.ImageTransparentColor); 1548BackColor = Color.Red 1562BackColor = Color.Red 1568Assert.Equal(Color.Red, item.BackColor); 1573public void ToolStripItem_BackColor_Set_GetReturnsExpected(Color value, Color expected) 1588public void ToolStripItem_BackColor_SetWithOwner_GetReturnsExpected(Color value, Color expected) 1608public void ToolStripItem_BackColor_SetWithOwnerWithHandle_GetReturnsExpected(Color value, Color expected) 1641public void ToolStripItem_BackColor_SetWithParent_GetReturnsExpected(Color value, Color expected) 1661yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 1662yield return new object[] { Color.Red, Color.Red, 1 }; 1667public void ToolStripItem_BackColor_SetWithParentWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 1712item.BackColor = Color.Red; 1713Assert.Equal(Color.Red, item.BackColor); 1717item.BackColor = Color.Red; 1718Assert.Equal(Color.Red, item.BackColor); 1722item.BackColor = Color.Empty; 1728item.BackColor = Color.Red; 1729Assert.Equal(Color.Red, item.BackColor); 1740item.BackColor = Color.Red; 1741Assert.Equal(Color.Red, item.BackColor); 1756item.BackColor = Color.Red; 1757Assert.Equal(Color.Red, item.BackColor); 3238ForeColor = Color.Red 3252ForeColor = Color.Red 3258Assert.Equal(Color.Red, item.ForeColor); 3263public void ToolStripItem_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 3278public void ToolStripItem_ForeColor_SetWithOwner_GetReturnsExpected(Color value, Color expected) 3298public void ToolStripItem_ForeColor_SetWithOwnerWithHandle_GetReturnsExpected(Color value, Color expected) 3331public void ToolStripItem_ForeColor_SetWithParent_GetReturnsExpected(Color value, Color expected) 3351yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 3352yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 3353yield return new object[] { Color.White, Color.White, 1 }; 3354yield return new object[] { Color.Black, Color.Black, 1 }; 3355yield return new object[] { Color.Red, Color.Red, 1 }; 3360public void ToolStripItem_ForeColor_SetWithParentWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 3405item.ForeColor = Color.Red; 3406Assert.Equal(Color.Red, item.ForeColor); 3410item.ForeColor = Color.Red; 3411Assert.Equal(Color.Red, item.ForeColor); 3415item.ForeColor = Color.Empty; 3421item.ForeColor = Color.Red; 3422Assert.Equal(Color.Red, item.ForeColor); 3433item.ForeColor = Color.Red; 3434Assert.Equal(Color.Red, item.ForeColor); 3449item.ForeColor = Color.Red; 3450Assert.Equal(Color.Red, item.ForeColor); 3781foreach (Color imageTransparentColor in new Color[] { Color.Empty, Color.Red }) 3792public void ToolStripItem_Image_Set_GetReturnsExpected(Color imageTransparentColor, Image value) 3811foreach (Color imageTransparentColor in new Color[] { Color.Empty, Color.Red }) 3822public void ToolStripItem_Image_SetWithImageIndex_GetReturnsExpected(Color imageTransparentColor, Image value, int expectedImageIndex) 3842public void ToolStripItem_Image_SetWithNonNullOldValue_GetReturnsExpected(Color imageTransparentColor, Image value) 3863public void ToolStripItem_Image_SetWithNonNullOldValueWithImageIndex_GetReturnsExpected(Color imageTransparentColor, Image value, int expectedImageIndex) 3885foreach (Color imageTransparentColor in new Color[] { Color.Empty, Color.Red }) 3896public void ToolStripItem_Image_SetWithOwner_GetReturnsExpected(Color imageTransparentColor, Image value, int expectedOwnerLayoutCallCount) 3941public void ToolStripItem_Image_SetWithOwnerWithHandle_GetReturnsExpected(Color imageTransparentColor, Image value, int expectedOwnerLayoutCallCount) 3999public void ToolStripItem_Image_SetWithParent_GetReturnsExpected(Color imageTransparentColor, Image value) 4034public void ToolStripItem_Image_SetWithParentWithHandle_GetReturnsExpected(Color imageTransparentColor, Image value) 5599foreach (Color color in new Color[] { Color.Empty, Color.Red }) 5610public void ToolStripItem_ImageTransparentColor_Set_GetReturnsExpected(Image image, Color value) 5627public void ToolStripItem_ImageTransparentColor_SetWithCustomOldValue_GetReturnsExpected(Image image, Color value) 5632ImageTransparentColor = Color.Red 5645public void ToolStripItem_ImageTransparentColor_SetWithOwner_GetReturnsExpected(Image image, Color value) 5666yield return new object[] { null, Color.Empty, 0 }; 5667yield return new object[] { null, Color.Red, 0 }; 5668yield return new object[] { new Bitmap(10, 10), Color.Empty, 0 }; 5669yield return new object[] { new Bitmap(10, 10), Color.Red, 1 }; 5670yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Empty, 0 }; 5671yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Red, 1 }; 5672yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Empty, 0 }; 5673yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Red, 1 }; 5678public void ToolStripItem_ImageTransparentColor_SetWithOwnerWithHandle_GetReturnsExpected(Image image, Color value, int expectedInvalidatedCallCount) 5712public void ToolStripItem_ImageTransparentColor_SetWithParent_GetReturnsExpected(Image image, Color value) 5733yield return new object[] { null, Color.Empty, 0 }; 5734yield return new object[] { null, Color.Red, 1 }; 5735yield return new object[] { new Bitmap(10, 10), Color.Empty, 0 }; 5736yield return new object[] { new Bitmap(10, 10), Color.Red, 1 }; 5737yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Empty, 0 }; 5738yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Red, 1 }; 5739yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Empty, 0 }; 5740yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Red, 1 }; 5745public void ToolStripItem_ImageTransparentColor_SetWithParentWithHandle_GetReturnsExpected(Image image, Color value, int expectedParentInvalidatedCallCount) 5784item.ImageTransparentColor = Color.Red; 5785Assert.Equal(Color.Red, item.ImageTransparentColor); 5789Assert.Equal(Color.Empty, item.ImageTransparentColor); 5800item.ImageTransparentColor = Color.Red; 5801Assert.Equal(Color.Red, item.ImageTransparentColor); 5805Assert.Equal(Color.Empty, item.ImageTransparentColor); 12525item.BackColor = Color.Red; 12619item.ForeColor = Color.Red; 14105item.BackColor = Color.Black; 14168item.ForeColor = Color.Black;
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (15)
12yield return new object[] { new ToolStripButton(), null, Rectangle.Empty, Color.Empty, null, TextFormatFlags.Top - 1 }; 13yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Top }; 14yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Bottom }; 19public void Ctor_ToolStripItem_String_Rectangle_Color_Font_TextFormatFlags(ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, TextFormatFlags format) 37yield return new object[] { new ToolStripButton(), null, Rectangle.Empty, Color.Empty, null, ContentAlignment.TopLeft - 1, TextFormatFlags.Default | TextFormatFlags.Top | TextFormatFlags.HidePrefix }; 38yield 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 }; 39yield 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 }; 40yield 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 }; 45public void Ctor_ToolStripItem_String_Rectangle_Color_Font_ContentAlignment(ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, ContentAlignment textAlign, TextFormatFlags expectedTextFormat) 66Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Top)); 67Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.TopLeft)); 72yield return new object[] { Color.Empty }; 73yield return new object[] { Color.Red }; 78public void TextColor_Set_GetReturnsExpected(Color value) 82ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Blue, SystemFonts.DefaultFont, TextFormatFlags.Top)
System\Windows\Forms\ToolStripLabelTests.cs (19)
106Color expectedColor = Color.Red; 144Color expectedColor = Color.Green; 154Color defaultColor = accessor.IEVisitedLinkColor; 162Color expectedColor = Color.Blue; 197_toolStripLabel.ActiveLinkColor = Color.Red; 202Color defaultColor = accessor.IEActiveLinkColor; 210_toolStripLabel.LinkColor = Color.Blue; 215Color defaultColor = accessor.IELinkColor; 220public static TheoryData<string, Color, bool> ShouldSerializeColorData => 223{ nameof(ToolStripLabel.ActiveLinkColor), Color.Red, true }, 224{ nameof(ToolStripLabel.ActiveLinkColor), Color.Empty, false }, 225{ nameof(ToolStripLabel.LinkColor), Color.Blue, true }, 226{ nameof(ToolStripLabel.LinkColor), Color.Empty, false }, 227{ nameof(ToolStripLabel.VisitedLinkColor), Color.Green, true }, 228{ nameof(ToolStripLabel.VisitedLinkColor), Color.Empty, false } 233public void ToolStripLabel_ShouldSerializeColor_ReturnsExpected(string propertyName, Color color, bool expected)
System\Windows\Forms\ToolStripMenuItemTests.cs (4)
68Assert.Equal(Color.Empty, item.ImageTransparentColor); 276BackColor = Color.Red, 287ForeColor = Color.Blue, 291ImageTransparentColor = Color.Green,
System\Windows\Forms\ToolStripRendererTests.cs (21)
30yield return new object[] { null, Rectangle.Empty, Color.Empty, arrowDirection }; 31yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4), Color.Red, arrowDirection }; 34yield return new object[] { null, Rectangle.Empty, Color.Empty, ArrowDirection.Left - 1 }; 35yield return new object[] { null, Rectangle.Empty, Color.Empty, ArrowDirection.Up + 1 }; 36yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4), Color.Red, ArrowDirection.Left - 1 }; 37yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4), Color.Red, ArrowDirection.Up + 1 }; 42public void ToolStripRenderer_DrawArrow_Invoke_CallsRenderArrow(ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) 294yield return new object[] { new SubToolStripItem(), null, Rectangle.Empty, Color.Empty, null, TextFormatFlags.Left }; 295yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 0, 4), Color.Empty, null, TextFormatFlags.Left }; 296yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 0), Color.Empty, null, TextFormatFlags.Left }; 297yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 4), Color.Empty, null, TextFormatFlags.Left }; 299yield return new object[] { new SubToolStripItem(), "Text", Rectangle.Empty, Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 300yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 0, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 301yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 0), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 302yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 303yield return new object[] { new SubToolStripItem() { Enabled = false }, "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 304yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical270 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 305yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical90 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 310public void ToolStripRenderer_DrawItemText_Invoke_CallsRenderItemText(ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, TextFormatFlags format) 722public void ToolStripRenderer_OnRenderArrow_Invoke_Nop(ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) 839public void ToolStripRenderer_OnRenderItemText_Invoke_Nop(ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, TextFormatFlags format)
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (15)
30yield return new object[] { new ToolStrip() { BackColor = Color.Red }, new Rectangle(0, 0, 100, 25), Color.Red }; 37public void ToolStripRenderEventArgs_Ctor_Graphics_ToolStrip(ToolStrip toolStrip, Rectangle expectedAffectedBounds, Color expectedBackColor) 52yield return new object[] { new ToolStrip(), new Rectangle(1, 2, 3, 4), Color.Empty, SystemColors.Control }; 53yield return new object[] { new ToolStrip() { BackColor = Color.Red }, new Rectangle(1, 2, 3, 4), Color.Empty, Color.Red }; 54yield return new object[] { new ToolStripDropDown(), new Rectangle(1, 2, 3, 4), Color.Empty, SystemColors.Menu }; 55yield return new object[] { new MenuStrip(), new Rectangle(1, 2, 3, 4), Color.Empty, SystemColors.MenuBar }; 56yield return new object[] { new ToolStrip() { BackColor = Color.Red }, new Rectangle(1, 2, 3, 4), Color.Blue, Color.Blue }; 61public void ToolStripRenderEventArgs_Ctor_Graphics_ToolStrip_Rectangle_Color(ToolStrip toolStrip, Rectangle affectedBounds, Color backColor, Color expectedBackColor) 94ToolStripRenderEventArgs e = new(graphics, toolStrip, new Rectangle(1, 2, 3, 4), Color.Empty);
System\Windows\Forms\ToolStripSeparatorTests.cs (24)
61Assert.Equal(Color.Empty, item.ImageTransparentColor); 335public void ToolStripSeparator_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 362item.ForeColor = Color.Red; 363Assert.Equal(Color.Red, item.ForeColor); 367item.ForeColor = Color.Red; 368Assert.Equal(Color.Red, item.ForeColor); 372item.ForeColor = Color.Empty; 378item.ForeColor = Color.Red; 379Assert.Equal(Color.Red, item.ForeColor); 390item.ForeColor = Color.Red; 391Assert.Equal(Color.Red, item.ForeColor); 406item.ForeColor = Color.Red; 407Assert.Equal(Color.Red, item.ForeColor); 417foreach (Color imageTransparentColor in new Color[] { Color.Empty, Color.Red }) 428public void ToolStripSeparator_Image_Set_GetReturnsExpected(Color imageTransparentColor, Image value) 527foreach (Color color in new Color[] { Color.Empty, Color.Red }) 538public void ToolStripSeparator_ImageTransparentColor_Set_GetReturnsExpected(Image image, Color value)
System\Windows\Forms\ToolStripTests.cs (78)
1059yield return new object[] { Color.Empty, Control.DefaultBackColor }; 1060yield return new object[] { Color.Red, Color.Red }; 1065public void ToolStrip_BackColor_Set_GetReturnsExpected(Color value, Color expected) 2672public void ToolStrip_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 2701control.ForeColor = Color.Red; 2702Assert.Equal(Color.Red, control.ForeColor); 2706control.ForeColor = Color.Red; 2707Assert.Equal(Color.Red, control.ForeColor); 2711control.ForeColor = Color.Empty; 2717control.ForeColor = Color.Red; 2718Assert.Equal(Color.Red, control.ForeColor); 5855yield return new object[] { hScroll, vScroll, true, Color.Empty, backgroundImage, backgroundImageLayout }; 5856yield return new object[] { hScroll, vScroll, true, Color.Red, backgroundImage, backgroundImageLayout }; 5857yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout }; 5858yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout }; 5859yield return new object[] { hScroll, vScroll, false, Color.Empty, backgroundImage, backgroundImageLayout }; 5860yield return new object[] { hScroll, vScroll, false, Color.Red, backgroundImage, backgroundImageLayout }; 5869public void ToolStrip_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 5929yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 5930yield return new object[] { parent, hScroll, vScroll, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 5931yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 5932yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 5933yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 5934yield return new object[] { parent, hScroll, vScroll, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 5938yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 5939yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 5940yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 5941yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 5942yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 5943yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 5945yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 5946yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 5947yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 }; 5948yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 2 }; 5949yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 5950yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 5980yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, backgroundImage, backgroundImageLayout, expected1 }; 5981yield return new object[] { parent, hScroll, vScroll, true, Color.Red, backgroundImage, backgroundImageLayout, expected1 }; 5982yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, backgroundImage, backgroundImageLayout, expected1 }; 5983yield return new object[] { parent, hScroll, vScroll, false, Color.Red, backgroundImage, backgroundImageLayout, expected1 }; 5991yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 5992yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, expected }; 5996yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 }; 5997yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 }; 5998yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 }; 5999yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 }; 6000yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected2 }; 6001yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected2 }; 6003yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 }; 6004yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 }; 6005yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 }; 6006yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 }; 6007yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 }; 6008yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 }; 6016public void ToolStrip_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 6067public void ToolStrip_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 6126yield return new object[] { hScroll, vScroll, true, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 6127yield return new object[] { hScroll, vScroll, true, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 6128yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 6129yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), backgroundImage, backgroundImageLayout, 1 }; 6130yield return new object[] { hScroll, vScroll, false, Color.Empty, backgroundImage, backgroundImageLayout, 0 }; 6131yield return new object[] { hScroll, vScroll, false, Color.Red, backgroundImage, backgroundImageLayout, 0 }; 6135yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 6136yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 6137yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 6138yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 1 }; 6139yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 6140yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 }; 6142yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 6143yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 6144yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 6145yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 6146yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 6147yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 }; 6154public 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)
17BackColor = Color.Blue, 49State.BrushColor(Color.Blue)),
System\Windows\Forms\ToolTipTests.cs (3)
280public void ToolTip_BackColor_Set_GetReturnsExpected(Color value) 336public void ToolTip_ForeColor_Set_GetReturnsExpected(Color value) 353Assert.Throws<ArgumentException>("value", () => toolTip.ForeColor = Color.Empty);
System\Windows\Forms\TreeNodeCollectionTests.cs (2)
19Assert.Equal(Color.Empty, treeNode.BackColor); 27Assert.Equal(Color.Empty, treeNode.ForeColor);
System\Windows\Forms\TreeNodeTests.cs (56)
17Assert.Equal(Color.Empty, node.BackColor); 22Assert.Equal(Color.Empty, node.ForeColor); 57Assert.Equal(Color.Empty, node.BackColor); 62Assert.Equal(Color.Empty, node.ForeColor); 105Assert.Equal(Color.Empty, node.BackColor); 110Assert.Equal(Color.Empty, node.ForeColor); 148Assert.Equal(Color.Empty, node.BackColor); 153Assert.Equal(Color.Empty, node.ForeColor); 196Assert.Equal(Color.Empty, node.BackColor); 201Assert.Equal(Color.Empty, node.ForeColor); 263public void TreeNode_BackColor_Set_GetReturnsExpected(Color value) 278public void TreeNode_BackColor_SetWithTreeView_GetReturnsExpected(Color value) 296yield return new object[] { Color.Empty, 0 }; 297yield return new object[] { Color.Red, 1 }; 302public void TreeNode_BackColor_SetWithTreeViewWithHandle_GetReturnsExpected(Color value, int expectedInvalidatedCallCount) 333yield return new object[] { Color.Empty }; 334yield return new object[] { Color.Blue }; 335yield return new object[] { Color.Red }; 340public void TreeNode_BackColor_SetWithCustomOldValue_GetReturnsExpected(Color value) 344BackColor = Color.Blue 357public void TreeNode_BackColor_SetWithCustomOldValueWithTreeView_GetReturnsExpected(Color value) 362BackColor = Color.Blue 378yield return new object[] { Color.Empty, 1 }; 379yield return new object[] { Color.Red, 1 }; 380yield return new object[] { Color.Blue, 0 }; 385public void TreeNode_BackColor_SetWithCustomOldValueWithTreeViewWithHandle_GetReturnsExpected(Color value, int expectedInvalidatedCallCount) 390BackColor = Color.Blue 424node.BackColor = Color.Red; 425Assert.Equal(Color.Red, node.BackColor); 429Assert.Equal(Color.Red, node.BackColor); 440node.BackColor = Color.Red; 441Assert.Equal(Color.Red, node.BackColor); 445Assert.Equal(Color.Red, node.BackColor); 704public void TreeNode_ForeColor_Set_GetReturnsExpected(Color value) 719public void TreeNode_ForeColor_SetWithTreeView_GetReturnsExpected(Color value) 737yield return new object[] { Color.Empty, 0 }; 738yield return new object[] { Color.Red, 1 }; 743public void TreeNode_ForeColor_SetWithTreeViewWithHandle_GetReturnsExpected(Color value, int expectedInvalidatedCallCount) 774yield return new object[] { Color.Empty }; 775yield return new object[] { Color.Blue }; 776yield return new object[] { Color.Red }; 781public void TreeNode_ForeColor_SetWithCustomOldValue_GetReturnsExpected(Color value) 785ForeColor = Color.Blue 798public void TreeNode_ForeColor_SetWithCustomOldValueWithTreeView_GetReturnsExpected(Color value) 803ForeColor = Color.Blue 819yield return new object[] { Color.Empty, 1 }; 820yield return new object[] { Color.Red, 1 }; 821yield return new object[] { Color.Blue, 0 }; 826public void TreeNode_ForeColor_SetWithCustomOldValueWithTreeViewWithHandle_GetReturnsExpected(Color value, int expectedInvalidatedCallCount) 831ForeColor = Color.Blue 865node.ForeColor = Color.Red; 866Assert.Equal(Color.Red, node.ForeColor); 870Assert.Equal(Color.Red, node.ForeColor); 881node.ForeColor = Color.Red; 882Assert.Equal(Color.Red, node.ForeColor); 886Assert.Equal(Color.Red, node.ForeColor);
System\Windows\Forms\TreeViewTests.cs (57)
86Assert.Equal(Color.Empty, control.LineColor); 698yield return new object[] { Color.Empty, SystemColors.Window }; 699yield return new object[] { Color.Red, Color.Red }; 704public void TreeView_BackColor_Set_GetReturnsExpected(Color value, Color expected) 721yield return new object[] { Color.Empty, SystemColors.Window, 0 }; 722yield return new object[] { Color.Red, Color.Red, 1 }; 727public void TreeView_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 768control.BackColor = Color.Red; 769Assert.Equal(Color.Red, control.BackColor); 773control.BackColor = Color.Red; 774Assert.Equal(Color.Red, control.BackColor); 778control.BackColor = Color.Empty; 784control.BackColor = Color.Red; 785Assert.Equal(Color.Red, control.BackColor); 1459yield return new object[] { Color.Empty, SystemColors.WindowText }; 1460yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 1461yield return new object[] { Color.White, Color.White }; 1462yield return new object[] { Color.Black, Color.Black }; 1463yield return new object[] { Color.Red, Color.Red }; 1468public void ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1483public void ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 1510control.ForeColor = Color.Red; 1511Assert.Equal(Color.Red, control.ForeColor); 1515control.ForeColor = Color.Red; 1516Assert.Equal(Color.Red, control.ForeColor); 1520control.ForeColor = Color.Empty; 1526control.ForeColor = Color.Red; 1527Assert.Equal(Color.Red, control.ForeColor); 2956public void LineColor_Set_GetReturnsExpected(Color value) 6020BackColor = Color.Red, 6021ForeColor = Color.Blue, 6022LineColor = Color.Yellow, 6048Assert.Equal(Color.Red, control.BackColor); 6049Assert.Equal(Color.Blue, control.ForeColor); 6050Assert.Equal(Color.Yellow, control.LineColor); 6066Assert.Equal(Color.Red, control.BackColor); 6067Assert.Equal(Color.Blue, control.ForeColor); 6068Assert.Equal(Color.Yellow, control.LineColor); 6100BackColor = Color.Red, 6101ForeColor = Color.Blue, 6102LineColor = Color.Yellow, 6129Assert.Equal(Color.Red, control.BackColor); 6130Assert.Equal(Color.Blue, control.ForeColor); 6131Assert.Equal(Color.Yellow, control.LineColor); 6147Assert.Equal(Color.Red, control.BackColor); 6148Assert.Equal(Color.Blue, control.ForeColor); 6149Assert.Equal(Color.Yellow, control.LineColor);
System\Windows\Forms\UpDownBaseTests.cs (43)
509yield return new object[] { Color.Red, Color.Red }; 510yield return new object[] { Color.Empty, SystemColors.Window }; 515public void UpDownBase_BackColor_Set_GetReturnsExpected(Color value, Color expected) 532yield return new object[] { Color.Red, Color.Red, 1 }; 533yield return new object[] { Color.Empty, SystemColors.Window, 1 }; 538public void UpDownBase_BackColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 579control.BackColor = Color.Red; 580Assert.Equal(Color.Red, control.BackColor); 584control.BackColor = Color.Red; 585Assert.Equal(Color.Red, control.BackColor); 589control.BackColor = Color.Empty; 595control.BackColor = Color.Red; 596Assert.Equal(Color.Red, control.BackColor); 935yield return new object[] { Color.Empty, SystemColors.WindowText }; 936yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 937yield return new object[] { Color.White, Color.White }; 938yield return new object[] { Color.Black, Color.Black }; 939yield return new object[] { Color.Red, Color.Red }; 944public void UpDownBase_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 961public void UpDownBase_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected) 1002control.ForeColor = Color.Red; 1003Assert.Equal(Color.Red, control.ForeColor); 1007control.ForeColor = Color.Red; 1008Assert.Equal(Color.Red, control.ForeColor); 1012control.ForeColor = Color.Empty; 1018control.ForeColor = Color.Red; 1019Assert.Equal(Color.Red, control.ForeColor); 2229foreach (Color backColor in new Color[] { Color.Red, Color.Empty }) 2243public void UpDownBase_OnPaint_Invoke_CallsPaint(Size size, bool enabled, BorderStyle borderStyle, Color backColor) 2279public void UpDownBase_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabled, BorderStyle borderStyle, Color backColor)
System\Windows\Forms\VisualStyles\VisualStyleInformationTests.cs (4)
54Color color = VisualStyleInformation.ControlHighlightHot; 55Assert.NotEqual(Color.Empty, color); 141Color color = VisualStyleInformation.TextControlBorder; 142Assert.NotEqual(Color.Empty, color);
TextBoxBaseTests.cs (41)
383yield return new object[] { Color.Empty, SystemColors.Window }; 384yield return new object[] { Color.Red, Color.Red }; 389public void TextBoxBase_BackColor_Set_GetReturnsExpected(Color value, Color expected) 418control.BackColor = Color.Red; 419Assert.Equal(Color.Red, control.BackColor); 423control.BackColor = Color.Red; 424Assert.Equal(Color.Red, control.BackColor); 428control.BackColor = Color.Empty; 434control.BackColor = Color.Red; 435Assert.Equal(Color.Red, control.BackColor); 1161yield return new object[] { Color.Empty, SystemColors.WindowText }; 1162yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }; 1163yield return new object[] { Color.White, Color.White }; 1164yield return new object[] { Color.Black, Color.Black }; 1165yield return new object[] { Color.Red, Color.Red }; 1170public void TextBoxBase_ForeColor_Set_GetReturnsExpected(Color value, Color expected) 1187yield return new object[] { Color.Empty, SystemColors.WindowText, 0 }; 1188yield return new object[] { Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3), 1 }; 1189yield return new object[] { Color.White, Color.White, 1 }; 1190yield return new object[] { Color.Black, Color.Black, 1 }; 1191yield return new object[] { Color.Red, Color.Red, 1 }; 1196public void TextBoxBase_ForeColor_SetWithHandle_GetReturnsExpected(Color value, Color expected, int expectedInvalidatedCallCount) 1237control.ForeColor = Color.Red; 1238Assert.Equal(Color.Red, control.ForeColor); 1242control.ForeColor = Color.Red; 1243Assert.Equal(Color.Red, control.ForeColor); 1247control.ForeColor = Color.Empty; 1253control.ForeColor = Color.Red; 1254Assert.Equal(Color.Red, control.ForeColor);
ToolStripContainerTests.cs (8)
60_toolStripContainer.BackColor = Color.Red; 65_toolStripContainer.BackColor = Color.Blue; 193[InlineData(typeof(Color), "Red")] 194[InlineData(typeof(Color), "Blue")] 195[InlineData(typeof(Color), "Black")] 202Color colorValue = (Color)colorType.GetProperty(colorName).GetValue(null); 208_toolStripContainer.ForeColor = Color.Red;
TrackBarTests.cs (11)
684yield return new object[] { Color.Red }; 685yield return new object[] { Color.FromArgb(254, 1, 2, 3) }; 686yield return new object[] { Color.White }; 687yield return new object[] { Color.Black }; 688yield return new object[] { Color.Empty }; 693public void TrackBar_ForeColor_Set_Nop(Color value) 710public void TrackBar_ForeColor_SetWithHandle_Nop(Color value) 751control.ForeColor = Color.Red; 756control.ForeColor = Color.Red; 761control.ForeColor = Color.Empty; 767control.ForeColor = Color.Red;
System.Windows.Forms.TestUtilities (20)
CommonTestHelperEx.cs (20)
13public static TheoryData<Color, Color> GetBackColorTheoryData() 15return new TheoryData<Color, Color> 17{ Color.Red, Color.Red }, 18{ Color.Empty, Control.DefaultBackColor } 22public static TheoryData<Color, Color> GetForeColorTheoryData() 24return new TheoryData<Color, Color> 26{ Color.Red, Color.Red }, 27{ Color.FromArgb(254, 1, 2, 3), Color.FromArgb(254, 1, 2, 3) }, 28{ Color.White, Color.White }, 29{ Color.Black, Color.Black }, 30{ Color.Empty, Control.DefaultForeColor }
System.Windows.Forms.UI.IntegrationTests (37)
PropertyGridTests.cs (37)
109_propertyGrid.CommandsBorderColor = Color.Red; 110_propertyGrid.CommandsBorderColor.Should().Be(Color.Red); 118_propertyGrid.HelpBorderColor = Color.Blue; 119_propertyGrid.HelpBorderColor.Should().Be(Color.Blue); 127_propertyGrid.SelectedItemWithFocusBackColor = Color.Green; 128_propertyGrid.SelectedItemWithFocusBackColor.Should().Be(Color.Green); 136_propertyGrid.SelectedItemWithFocusForeColor = Color.Red; 137_propertyGrid.SelectedItemWithFocusForeColor.Should().Be(Color.Red); 145_propertyGrid.DisabledItemForeColor = Color.Blue; 146_propertyGrid.DisabledItemForeColor.Should().Be(Color.Blue); 154_propertyGrid.CategorySplitterColor = Color.Green; 155_propertyGrid.CategorySplitterColor.Should().Be(Color.Green); 163_propertyGrid.ForeColor = Color.Red; 164_propertyGrid.ForeColor.Should().Be(Color.Red); 191_propertyGrid.BackColor = Color.Blue; 192_propertyGrid.BackColor.Should().Be(Color.Blue); 210_propertyGrid.CommandsBackColor = Color.Green; 211_propertyGrid.CommandsBackColor.Should().Be(Color.Green); 219_propertyGrid.CommandsForeColor = Color.Red; 220_propertyGrid.CommandsForeColor.Should().Be(Color.Red); 251_propertyGrid.HelpBackColor = Color.Blue; 252_propertyGrid.HelpBackColor.Should().Be(Color.Blue); 260_propertyGrid.HelpForeColor = Color.Green; 261_propertyGrid.HelpForeColor.Should().Be(Color.Green); 269_propertyGrid.LineColor = Color.Red; 270_propertyGrid.LineColor.Should().Be(Color.Red); 340_propertyGrid.ViewBackColor = Color.Red; 341_propertyGrid.ViewBackColor.Should().Be(Color.Red); 349_propertyGrid.ViewBorderColor = Color.Blue; 350_propertyGrid.ViewBorderColor.Should().Be(Color.Blue); 358_propertyGrid.ViewForeColor = Color.Green; 359_propertyGrid.ViewForeColor.Should().Be(Color.Green); 379_propertyGrid.CommandsLinkColor = Color.Silver; 380_propertyGrid.CommandsLinkColor.Should().Be(Color.Silver); 386_propertyGrid.CommandsActiveLinkColor.Should().Be(Color.Red); 400_propertyGrid.CommandsDisabledLinkColor = Color.Orange; 401_propertyGrid.CommandsDisabledLinkColor.Should().Be(Color.Orange);
TrimTestBinaryDeserialization (1)
Form1.Designer.cs (1)
42imageList1.TransparentColor = Color.Transparent;
WindowsFormsIntegration (10)
System\Windows\Integration\Convert.cs (2)
324internal static SD.Color ToSystemDrawingColor(SWM.Color color) 326return SD.Color.FromArgb(color.A, color.R, color.G, color.B);
System\Windows\Integration\ElementHost.cs (3)
1545private static SD.Color FindSolidColorParent(Control whichControl) 1551if (control.BackColor != SD.Color.Empty && control.BackColor.A == 255) 1556return SD.Color.Empty;
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (5)
85SD.Color wfColor = WindowsFormsHostPropertyMap.TranslateSolidOrGradientBrush(brush, out ignore); 223SD.Color wfColor = WindowsFormsHostPropertyMap.TranslateSolidOrGradientBrush(brush, out defined); 375private static SD.Color TranslateSolidOrGradientBrush(SWM.Brush brush, out bool defined) 378SD.Color wfColor = SD.Color.Empty;
WinFormsControlsTest (89)
ChartControl.Designer.cs (67)
97this.chart1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240))))); 99this.chart1.BackSecondaryColor = System.Drawing.Color.White; 100this.chart1.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 111chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 112chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 115chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 116chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 118chartArea1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228))))); 120chartArea1.BackSecondaryColor = System.Drawing.Color.White; 121chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 128chartArea1.ShadowColor = System.Drawing.Color.Transparent; 131legend1.BackColor = System.Drawing.Color.Transparent; 144series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 149series1.MarkerBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 150series1.MarkerColor = System.Drawing.Color.LightSkyBlue; 156series2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 161series2.MarkerBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 162series2.MarkerColor = System.Drawing.Color.Gold; 173title1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 175title1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); 182this.chart2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(223)))), ((int)(((byte)(193))))); 184this.chart2.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(64)))), ((int)(((byte)(1))))); 198chartArea2.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 199chartArea2.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 203chartArea2.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 204chartArea2.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 205chartArea2.BackColor = System.Drawing.Color.OldLace; 207chartArea2.BackSecondaryColor = System.Drawing.Color.White; 208chartArea2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 210chartArea2.ShadowColor = System.Drawing.Color.Transparent; 217series3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 229series4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 247title2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 249title2.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); 256this.chart3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240))))); 258this.chart3.BackSecondaryColor = System.Drawing.Color.White; 259this.chart3.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 270chartArea3.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 271chartArea3.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 273chartArea3.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 274chartArea3.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 275chartArea3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228))))); 277chartArea3.BackSecondaryColor = System.Drawing.Color.White; 278chartArea3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 280chartArea3.ShadowColor = System.Drawing.Color.Transparent; 282legend3.BackColor = System.Drawing.Color.Transparent; 290series5.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 294series6.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 297series6.Color = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(180)))), ((int)(((byte)(65))))); 299series6.MarkerBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 309title3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 311title3.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); 318this.chart4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240))))); 320this.chart4.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 330chartArea4.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 332chartArea4.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 337chartArea4.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 339chartArea4.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 343chartArea4.BackColor = System.Drawing.Color.Transparent; 345chartArea4.BackSecondaryColor = System.Drawing.Color.Transparent; 346chartArea4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 348chartArea4.ShadowColor = System.Drawing.Color.Transparent; 351legend4.BackColor = System.Drawing.Color.Transparent; 359series7.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 362series7.Color = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240))))); 403title4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); 405title4.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
DataGridViewTest.Designer.cs (1)
77dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Maroon;
ListViewTest.Designer.cs (3)
52this.imageList1.TransparentColor = System.Drawing.Color.Transparent; 103this.imageList2.TransparentColor = System.Drawing.Color.Transparent; 131this.LargeImageList.TransparentColor = System.Drawing.Color.Transparent;
MenuStripAndCheckedListBox.Designer.cs (1)
65this.menuStrip1.BackColor = System.Drawing.Color.IndianRed;
Panels.Designer.cs (4)
50this.tableLayoutPanel1.BackColor = System.Drawing.Color.FromArgb((int)(byte)128, (int)(byte)255, (int)(byte)128); 57this.tableLayoutPanel2.BackColor = System.Drawing.Color.FromArgb((int)(byte)255, (int)(byte)255, (int)(byte)128); 65this.tableLayoutPanel3.BackColor = System.Drawing.Color.FromArgb((int)(byte)128, (int)(byte)255, (int)(byte)255); 84this.currentDPILabel1.BackColor = System.Drawing.Color.FromArgb((int)(byte)255, (int)(byte)128, (int)(byte)255);
Splitter.Designer.cs (2)
48this.splitContainer1.Panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); 52this.splitContainer1.Panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
ToolStripTests.Designer.cs (9)
163this.toolStrip2_Button1.ImageTransparentColor = System.Drawing.Color.Magenta; 172this.toolStrip2_Button2.ImageTransparentColor = System.Drawing.Color.Magenta; 180this.toolStrip2_Button3.ImageTransparentColor = System.Drawing.Color.Magenta; 189this.toolStrip2_Button4.ImageTransparentColor = System.Drawing.Color.Magenta; 196this.toolStrip2_Button5.ImageTransparentColor = System.Drawing.Color.Magenta; 288this.toolStrip2_SplitButton2.ImageTransparentColor = System.Drawing.Color.Magenta; 305this.toolStrip2_DropDownButton2.ImageTransparentColor = System.Drawing.Color.Magenta; 349this.toolStrip2_SplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; 371this.toolStrip2_DropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
TreeViewTest.Designer.cs (2)
56this.imageList1.TransparentColor = System.Drawing.Color.Transparent; 64this.BackColor = System.Drawing.Color.FromArgb((int)(byte)0, (int)(byte)192, (int)(byte)0);