1 override of BackColor
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
56public override Color BackColor
24 writes to BackColor
System.Windows.Forms (3)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
3377public virtual void ResetBackColor() => BackColor = Color.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
496menuItem.BackColor = BackColor;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
230_splitButtonButton.BackColor = BackColor;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
387BackColor = SystemColors.Window,
System.Windows.Forms.Tests (20)
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (1)
46BackColor = Color.Blue,
System\Windows\Forms\ToolStripItemTests.cs (18)
1579BackColor = value 1584item.BackColor = value; 1598item.BackColor = value; 1603item.BackColor = value; 1625item.BackColor = value; 1633item.BackColor = value; 1651item.BackColor = value; 1656item.BackColor = value; 1684item.BackColor = value; 1692item.BackColor = value; 1714item.BackColor = Color.Red; 1719item.BackColor = Color.Red; 1724item.BackColor = Color.Empty; 1730item.BackColor = Color.Red; 1742item.BackColor = Color.Red; 1758item.BackColor = Color.Red; 12508item.BackColor = Color.Red; 14088item.BackColor = Color.Black;
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
274BackColor = Color.Red,
71 references to BackColor
System.Windows.Forms (36)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
530Color previous = BackColor; 532if (!previous.Equals(BackColor))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
496menuItem.BackColor = BackColor;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (12)
270ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 358ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 598item.BackColor, 603else if (item.Owner is not null && item.BackColor != item.Owner.BackColor) 605using var brush = item.BackColor.GetCachedSolidBrushScope(); 652ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 654else if (item.Owner is not null && item.BackColor != item.Owner.BackColor) 656using var brush = item.BackColor.GetCachedSolidBrushScope(); 1113ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 1573ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 1586else if (item.Owner is not null && item.BackColor != item.Owner.BackColor) 1588using var brush = item.BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
868Color backgroundColor = e.Item.Selected ? SystemColors.Highlight : e.Item.BackColor; 872Image invertedImage = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, e.Item.BackColor);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
230_splitButtonButton.BackColor = BackColor;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (4)
251backColor: GetDarkModeColor(e.Item.BackColor), 259if (e.Item.BackColor != Color.Transparent && e.Item.BackColor != Color.Empty) 262FillBackground(e.Graphics, bounds, e.Item.BackColor);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (14)
481ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, item.ContentRectangle, item.ContentRectangle); 485FillBackground(g, item.ContentRectangle, item.BackColor); 526ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, item.ContentRectangle, fillRect); 530FillBackground(g, fillRect, item.BackColor); 625ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, fillRect, fillRect); 661ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, bounds, fillRect); 666FillBackground(g, splitButtonButtonRect, splitButton.BackColor); 679FillBackground(g, dropDownRect, splitButton.BackColor); 734ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect); 739if ((parent is not null) && (state != ToolBarState.Checked) && (item.BackColor != parent.BackColor)) 741FillBackground(g, fillRect, item.BackColor); 856ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect); 862if (vsRenderer is null || (item.BackColor != SystemColors.Control)) 864FillBackground(g, fillRect, item.BackColor);
System.Windows.Forms.Tests (35)
System\Windows\Forms\ToolStripButtonTests.cs (4)
32Assert.Equal(Control.DefaultBackColor, item.BackColor); 113Assert.Equal(Control.DefaultBackColor, item.BackColor); 200Assert.Equal(Control.DefaultBackColor, item.BackColor); 290Assert.Equal(Control.DefaultBackColor, item.BackColor);
System\Windows\Forms\ToolStripDropDownItemTests.cs (1)
31Assert.Equal(Control.DefaultBackColor, item.BackColor);
System\Windows\Forms\ToolStripItemTests.cs (26)
34Assert.Equal(Control.DefaultBackColor, item.BackColor); 1556Assert.Equal(Control.DefaultBackColor, item.BackColor); 1570Assert.Equal(Color.Red, item.BackColor); 1581Assert.Equal(expected, item.BackColor); 1585Assert.Equal(expected, item.BackColor); 1599Assert.Equal(expected, item.BackColor); 1604Assert.Equal(expected, item.BackColor); 1626Assert.Equal(expected, item.BackColor); 1634Assert.Equal(expected, item.BackColor); 1652Assert.Equal(expected, item.BackColor); 1657Assert.Equal(expected, item.BackColor); 1685Assert.Equal(expected, item.BackColor); 1693Assert.Equal(expected, item.BackColor); 1715Assert.Equal(Color.Red, item.BackColor); 1720Assert.Equal(Color.Red, item.BackColor); 1725Assert.Equal(Control.DefaultBackColor, item.BackColor); 1731Assert.Equal(Color.Red, item.BackColor); 1738PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.BackColor)]; 1743Assert.Equal(Color.Red, item.BackColor); 1747Assert.Equal(Control.DefaultBackColor, item.BackColor); 1754PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.BackColor)]; 1759Assert.Equal(Color.Red, item.BackColor); 1763Assert.Equal(Control.DefaultBackColor, item.BackColor); 14085Assert.Equal(Control.DefaultBackColor, item.BackColor); 14090Assert.Equal(Control.DefaultBackColor, item.BackColor); 14094Assert.Equal(Control.DefaultBackColor, item.BackColor);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
28Assert.Equal(Control.DefaultBackColor, item.BackColor); 319clone.BackColor.Should().Be(original.BackColor);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
32Assert.Equal(Control.DefaultBackColor, item.BackColor);