1 override of BackColor
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
56
public override Color
BackColor
24 writes to BackColor
System.Windows.Forms (3)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
3368
public virtual void ResetBackColor() =>
BackColor
= Color.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
496
menuItem.
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)
393
BackColor
= SystemColors.Window,
System.Windows.Forms.Tests (20)
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (1)
44
BackColor
= Color.Blue,
System\Windows\Forms\ToolStripItemTests.cs (18)
1577
BackColor
= value
1582
item.
BackColor
= value;
1596
item.
BackColor
= value;
1601
item.
BackColor
= value;
1623
item.
BackColor
= value;
1631
item.
BackColor
= value;
1649
item.
BackColor
= value;
1654
item.
BackColor
= value;
1682
item.
BackColor
= value;
1690
item.
BackColor
= value;
1712
item.
BackColor
= Color.Red;
1717
item.
BackColor
= Color.Red;
1722
item.
BackColor
= Color.Empty;
1728
item.
BackColor
= Color.Red;
1740
item.
BackColor
= Color.Red;
1756
item.
BackColor
= Color.Red;
12506
item.
BackColor
= Color.Red;
14086
item.
BackColor
= Color.Black;
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
276
BackColor
= Color.Red,
67 references to BackColor
System.Windows.Forms (32)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
525
Color previous =
BackColor
;
527
if (!previous.Equals(
BackColor
))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
496
menuItem.BackColor =
BackColor
;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (12)
270
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, bounds, fillRect);
359
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, bounds, fillRect);
599
item.
BackColor
,
604
else if (item.Owner is not null && item.
BackColor
!= item.Owner.BackColor)
606
using var brush = item.
BackColor
.GetCachedSolidBrushScope();
653
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, bounds, fillRect);
655
else if (item.Owner is not null && item.
BackColor
!= item.Owner.BackColor)
657
using var brush = item.
BackColor
.GetCachedSolidBrushScope();
1114
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, bounds, fillRect);
1574
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, bounds, fillRect);
1587
else if (item.Owner is not null && item.
BackColor
!= item.Owner.BackColor)
1589
using var brush = item.
BackColor
.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
835
Color backgroundColor = e.Item.Selected ? SystemColors.Highlight : e.Item.
BackColor
;
839
Image 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)
428
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, item.ContentRectangle, item.ContentRectangle);
432
FillBackground(g, item.ContentRectangle, item.
BackColor
);
473
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, item.ContentRectangle, fillRect);
477
FillBackground(g, fillRect, item.
BackColor
);
567
ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.
BackColor
, splitButton.BackgroundImageLayout, fillRect, fillRect);
602
ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.
BackColor
, splitButton.BackgroundImageLayout, bounds, fillRect);
607
FillBackground(g, splitButtonButtonRect, splitButton.
BackColor
);
620
FillBackground(g, dropDownRect, splitButton.
BackColor
);
675
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, fillRect, fillRect);
680
if ((parent is not null) && (state != ToolBarState.Checked) && (item.
BackColor
!= parent.BackColor))
682
FillBackground(g, fillRect, item.
BackColor
);
797
ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.
BackColor
, item.BackgroundImageLayout, fillRect, fillRect);
803
if (vsRenderer is null || (item.
BackColor
!= SystemColors.Control))
805
FillBackground(g, fillRect, item.
BackColor
);
System.Windows.Forms.Tests (35)
System\Windows\Forms\ToolStripButtonTests.cs (4)
30
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
111
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
198
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
288
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
System\Windows\Forms\ToolStripDropDownItemTests.cs (1)
29
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
System\Windows\Forms\ToolStripItemTests.cs (26)
32
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
1554
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
1568
Assert.Equal(Color.Red, item.
BackColor
);
1579
Assert.Equal(expected, item.
BackColor
);
1583
Assert.Equal(expected, item.
BackColor
);
1597
Assert.Equal(expected, item.
BackColor
);
1602
Assert.Equal(expected, item.
BackColor
);
1624
Assert.Equal(expected, item.
BackColor
);
1632
Assert.Equal(expected, item.
BackColor
);
1650
Assert.Equal(expected, item.
BackColor
);
1655
Assert.Equal(expected, item.
BackColor
);
1683
Assert.Equal(expected, item.
BackColor
);
1691
Assert.Equal(expected, item.
BackColor
);
1713
Assert.Equal(Color.Red, item.
BackColor
);
1718
Assert.Equal(Color.Red, item.
BackColor
);
1723
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
1729
Assert.Equal(Color.Red, item.
BackColor
);
1736
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.
BackColor
)];
1741
Assert.Equal(Color.Red, item.
BackColor
);
1745
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
1752
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.
BackColor
)];
1757
Assert.Equal(Color.Red, item.
BackColor
);
1761
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
14083
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
14088
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
14092
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
30
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
321
clone.
BackColor
.Should().Be(original.
BackColor
);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
30
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);