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)
3419public virtual void ResetBackColor() => BackColor = Color.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
498menuItem.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)
44BackColor = Color.Blue,
System\Windows\Forms\ToolStripItemTests.cs (18)
1578BackColor = value 1583item.BackColor = value; 1597item.BackColor = value; 1602item.BackColor = value; 1624item.BackColor = value; 1632item.BackColor = value; 1650item.BackColor = value; 1655item.BackColor = value; 1683item.BackColor = value; 1691item.BackColor = value; 1713item.BackColor = Color.Red; 1718item.BackColor = Color.Red; 1723item.BackColor = Color.Empty; 1729item.BackColor = Color.Red; 1741item.BackColor = Color.Red; 1757item.BackColor = Color.Red; 12526item.BackColor = Color.Red; 14106item.BackColor = Color.Black;
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
276BackColor = Color.Red,
67 references to BackColor
System.Windows.Forms (32)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
532Color previous = BackColor; 534if (!previous.Equals(BackColor))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
498menuItem.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); 567ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, fillRect, fillRect); 602ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, bounds, fillRect); 607FillBackground(g, splitButtonButtonRect, splitButton.BackColor); 620FillBackground(g, dropDownRect, splitButton.BackColor); 675ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect); 680if ((parent is not null) && (state != ToolBarState.Checked) && (item.BackColor != parent.BackColor)) 682FillBackground(g, fillRect, item.BackColor); 797ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect); 803if (vsRenderer is null || (item.BackColor != SystemColors.Control)) 805FillBackground(g, fillRect, item.BackColor);
System.Windows.Forms.Tests (35)
System\Windows\Forms\ToolStripButtonTests.cs (4)
30Assert.Equal(Control.DefaultBackColor, item.BackColor); 111Assert.Equal(Control.DefaultBackColor, item.BackColor); 198Assert.Equal(Control.DefaultBackColor, item.BackColor); 288Assert.Equal(Control.DefaultBackColor, item.BackColor);
System\Windows\Forms\ToolStripDropDownItemTests.cs (1)
29Assert.Equal(Control.DefaultBackColor, item.BackColor);
System\Windows\Forms\ToolStripItemTests.cs (26)
32Assert.Equal(Control.DefaultBackColor, item.BackColor); 1555Assert.Equal(Control.DefaultBackColor, item.BackColor); 1569Assert.Equal(Color.Red, item.BackColor); 1580Assert.Equal(expected, item.BackColor); 1584Assert.Equal(expected, item.BackColor); 1598Assert.Equal(expected, item.BackColor); 1603Assert.Equal(expected, item.BackColor); 1625Assert.Equal(expected, item.BackColor); 1633Assert.Equal(expected, item.BackColor); 1651Assert.Equal(expected, item.BackColor); 1656Assert.Equal(expected, item.BackColor); 1684Assert.Equal(expected, item.BackColor); 1692Assert.Equal(expected, item.BackColor); 1714Assert.Equal(Color.Red, item.BackColor); 1719Assert.Equal(Color.Red, item.BackColor); 1724Assert.Equal(Control.DefaultBackColor, item.BackColor); 1730Assert.Equal(Color.Red, item.BackColor); 1737PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.BackColor)]; 1742Assert.Equal(Color.Red, item.BackColor); 1746Assert.Equal(Control.DefaultBackColor, item.BackColor); 1753PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.BackColor)]; 1758Assert.Equal(Color.Red, item.BackColor); 1762Assert.Equal(Control.DefaultBackColor, item.BackColor); 14103Assert.Equal(Control.DefaultBackColor, item.BackColor); 14108Assert.Equal(Control.DefaultBackColor, item.BackColor); 14112Assert.Equal(Control.DefaultBackColor, item.BackColor);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
30Assert.Equal(Control.DefaultBackColor, item.BackColor); 321clone.BackColor.Should().Be(original.BackColor);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
30Assert.Equal(Control.DefaultBackColor, item.BackColor);