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)
3419
public virtual void ResetBackColor() =>
BackColor
= Color.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
498
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)
1578
BackColor
= value
1583
item.
BackColor
= value;
1597
item.
BackColor
= value;
1602
item.
BackColor
= value;
1624
item.
BackColor
= value;
1632
item.
BackColor
= value;
1650
item.
BackColor
= value;
1655
item.
BackColor
= value;
1683
item.
BackColor
= value;
1691
item.
BackColor
= value;
1713
item.
BackColor
= Color.Red;
1718
item.
BackColor
= Color.Red;
1723
item.
BackColor
= Color.Empty;
1729
item.
BackColor
= Color.Red;
1741
item.
BackColor
= Color.Red;
1757
item.
BackColor
= Color.Red;
12526
item.
BackColor
= Color.Red;
14106
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)
532
Color previous =
BackColor
;
534
if (!previous.Equals(
BackColor
))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
498
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
);
1555
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
1569
Assert.Equal(Color.Red, item.
BackColor
);
1580
Assert.Equal(expected, item.
BackColor
);
1584
Assert.Equal(expected, item.
BackColor
);
1598
Assert.Equal(expected, item.
BackColor
);
1603
Assert.Equal(expected, item.
BackColor
);
1625
Assert.Equal(expected, item.
BackColor
);
1633
Assert.Equal(expected, item.
BackColor
);
1651
Assert.Equal(expected, item.
BackColor
);
1656
Assert.Equal(expected, item.
BackColor
);
1684
Assert.Equal(expected, item.
BackColor
);
1692
Assert.Equal(expected, item.
BackColor
);
1714
Assert.Equal(Color.Red, item.
BackColor
);
1719
Assert.Equal(Color.Red, item.
BackColor
);
1724
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
1730
Assert.Equal(Color.Red, item.
BackColor
);
1737
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.
BackColor
)];
1742
Assert.Equal(Color.Red, item.
BackColor
);
1746
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
1753
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.
BackColor
)];
1758
Assert.Equal(Color.Red, item.
BackColor
);
1762
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
14103
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
14108
Assert.Equal(Control.DefaultBackColor, item.
BackColor
);
14112
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
);