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)
3372public 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)
393BackColor = 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,
67 references to BackColor
System.Windows.Forms (32)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
525Color previous = BackColor; 527if (!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); 359ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 599item.BackColor, 604else if (item.Owner is not null && item.BackColor != item.Owner.BackColor) 606using var brush = item.BackColor.GetCachedSolidBrushScope(); 653ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 655else if (item.Owner is not null && item.BackColor != item.Owner.BackColor) 657using var brush = item.BackColor.GetCachedSolidBrushScope(); 1114ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 1574ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 1587else if (item.Owner is not null && item.BackColor != item.Owner.BackColor) 1589using var brush = item.BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
835Color backgroundColor = e.Item.Selected ? SystemColors.Highlight : e.Item.BackColor; 839Image invertedImage = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, e.Item.BackColor);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
230_splitButtonButton.BackColor = BackColor;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (14)
428ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, item.ContentRectangle, item.ContentRectangle); 432FillBackground(g, item.ContentRectangle, item.BackColor); 473ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, item.ContentRectangle, fillRect); 477FillBackground(g, fillRect, item.BackColor); 565ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, fillRect, fillRect); 601ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, bounds, fillRect); 606FillBackground(g, splitButtonButtonRect, splitButton.BackColor); 619FillBackground(g, dropDownRect, splitButton.BackColor); 674ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect); 679if ((parent is not null) && (state != ToolBarState.Checked) && (item.BackColor != parent.BackColor)) 681FillBackground(g, fillRect, item.BackColor); 796ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect); 802if (vsRenderer is null || (item.BackColor != SystemColors.Control)) 804FillBackground(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);