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)
3368public 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)
44BackColor = Color.Blue,
System\Windows\Forms\ToolStripItemTests.cs (18)
1577BackColor = value 1582item.BackColor = value; 1596item.BackColor = value; 1601item.BackColor = value; 1623item.BackColor = value; 1631item.BackColor = value; 1649item.BackColor = value; 1654item.BackColor = value; 1682item.BackColor = value; 1690item.BackColor = value; 1712item.BackColor = Color.Red; 1717item.BackColor = Color.Red; 1722item.BackColor = Color.Empty; 1728item.BackColor = Color.Red; 1740item.BackColor = Color.Red; 1756item.BackColor = Color.Red; 12506item.BackColor = Color.Red; 14086item.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)
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); 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); 1554Assert.Equal(Control.DefaultBackColor, item.BackColor); 1568Assert.Equal(Color.Red, item.BackColor); 1579Assert.Equal(expected, item.BackColor); 1583Assert.Equal(expected, item.BackColor); 1597Assert.Equal(expected, item.BackColor); 1602Assert.Equal(expected, item.BackColor); 1624Assert.Equal(expected, item.BackColor); 1632Assert.Equal(expected, item.BackColor); 1650Assert.Equal(expected, item.BackColor); 1655Assert.Equal(expected, item.BackColor); 1683Assert.Equal(expected, item.BackColor); 1691Assert.Equal(expected, item.BackColor); 1713Assert.Equal(Color.Red, item.BackColor); 1718Assert.Equal(Color.Red, item.BackColor); 1723Assert.Equal(Control.DefaultBackColor, item.BackColor); 1729Assert.Equal(Color.Red, item.BackColor); 1736PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.BackColor)]; 1741Assert.Equal(Color.Red, item.BackColor); 1745Assert.Equal(Control.DefaultBackColor, item.BackColor); 1752PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.BackColor)]; 1757Assert.Equal(Color.Red, item.BackColor); 1761Assert.Equal(Control.DefaultBackColor, item.BackColor); 14083Assert.Equal(Control.DefaultBackColor, item.BackColor); 14088Assert.Equal(Control.DefaultBackColor, item.BackColor); 14092Assert.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);