Base:
property
BackColor
System.Windows.Forms.Control.BackColor
27 writes to BackColor
DesignSurface (7)
CustomControls\CustomButtonDesignerActionList.cs (1)
80
_control.
BackColor
= backColor != Color.Yellow ? Color.Yellow : Color.Blue;
MainForm.cs (6)
133
b1.
BackColor
= Color.LightGray;
134
b2.
BackColor
= Color.LightGreen;
194
b1.
BackColor
= Color.Coral;
226
b3.
BackColor
= Color.LightGray;
244
b1.
BackColor
= Color.Gold;
245
b2.
BackColor
= Color.LightGreen;
System.Windows.Forms (2)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
208
_dropDownButton.
BackColor
= SystemColors.Control;
244
BackColor
= SystemColors.Control,
System.Windows.Forms.Design (1)
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (1)
20
BackColor
= Color.Transparent,
System.Windows.Forms.Tests (17)
System\Windows\Forms\AbstractButtonBaseTests.cs (1)
38
control.
BackColor
= expectedColor;
System\Windows\Forms\ButtonBaseTests.cs (16)
507
BackColor
= value
513
control.
BackColor
= value;
525
BackColor
= value
532
control.
BackColor
= value;
571
BackColor
= value
578
control.
BackColor
= value;
617
BackColor
= value
624
control.
BackColor
= value;
680
control.
BackColor
= value;
686
control.
BackColor
= value;
711
control.
BackColor
= value;
719
control.
BackColor
= value;
741
control.
BackColor
= Color.Red;
746
control.
BackColor
= Color.Red;
751
control.
BackColor
= Color.Empty;
757
control.
BackColor
= Color.Red;
44 references to BackColor
DesignSurface (2)
CustomControls\CustomButtonDesignerActionList.cs (2)
53
PropertyDescriptor dockProp = TypeDescriptor.GetProperties(Component)[nameof(CustomButton.
BackColor
)];
79
Color backColor = _control.
BackColor
;
System.Windows.Forms (21)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1265
get => (_isEnableVisualStyleBackgroundSet || (RawBackColor.IsEmpty && (
BackColor
== SystemColors.Control)))
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (4)
105
if (Control.
BackColor
!= SystemColors.Control && SystemInformation.HighContrast)
113
ControlPaint.DrawBorderSimple(deviceContext, bounds, ControlPaint.Dark(Control.
BackColor
));
370
ControlPaint.DrawFocusRectangle(g, r, Control.ForeColor, Control.
BackColor
);
641
new(deviceContext, Control.ForeColor, Control.
BackColor
)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (2)
40
Color backColor = Control.
BackColor
;
133
Color backColor = Control.
BackColor
;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (2)
27
Control.PaintBackground(e, r, IsHighContrastHighlighted() ? SystemColors.Highlight : Control.
BackColor
, r.Location);
73
Control.PaintBackground(e, r, IsHighContrastHighlighted() ? SystemColors.Highlight : Control.
BackColor
, r.Location);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
73
Color color = isHighContrastHighlighted ? SystemColors.Highlight : Control.
BackColor
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
107
ControlPaint.DrawFocusRectangle(pevent.Graphics, dropDownButtonRect, ForeColor,
BackColor
);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (10)
18
if (Control.
BackColor
!= SystemColors.Control && SystemInformation.HighContrast)
22
Color c = ControlPaint.LightLight(Control.
BackColor
);
32
ControlPaint.DrawBorderSimple(e, r, ControlPaint.Dark(Control.
BackColor
));
39
Color c = ControlPaint.Light(Control.
BackColor
);
44
Control.
BackColor
, 2, ButtonBorderStyle.Outset,
45
Control.
BackColor
, 2, ButtonBorderStyle.Outset);
51
c = ControlPaint.LightLight(Control.
BackColor
);
61
ControlPaint.DrawBorderSimple(e, r, ControlPaint.Dark(Control.
BackColor
));
90
Color backgroundColor = isHighContrastHighlighted ? SystemColors.Highlight : Control.
BackColor
;
93
using Image invertedImage = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, Control.
BackColor
);
System.Windows.Forms.Tests (21)
System\Windows\Forms\AbstractButtonBaseTests.cs (1)
43
control.
BackColor
.Should().Be(expectedColor);
System\Windows\Forms\ButtonBaseTests.cs (17)
29
Assert.Equal(Control.DefaultBackColor, control.
BackColor
);
509
Assert.Equal(expected, control.
BackColor
);
514
Assert.Equal(expected, control.
BackColor
);
527
Assert.Equal(expected, control.
BackColor
);
533
Assert.Equal(expected, control.
BackColor
);
573
Assert.Equal(expected, control.
BackColor
);
579
Assert.Equal(expected, control.
BackColor
);
619
Assert.Equal(expected, control.
BackColor
);
625
Assert.Equal(expected, control.
BackColor
);
681
Assert.Equal(expected, control.
BackColor
);
687
Assert.Equal(expected, control.
BackColor
);
712
Assert.Equal(expected, control.
BackColor
);
720
Assert.Equal(expected, control.
BackColor
);
742
Assert.Equal(Color.Red, control.
BackColor
);
747
Assert.Equal(Color.Red, control.
BackColor
);
752
Assert.Equal(Control.DefaultBackColor, control.
BackColor
);
758
Assert.Equal(Color.Red, control.
BackColor
);
System\Windows\Forms\ButtonTests.cs (1)
31
Assert.Equal(Control.DefaultBackColor, control.
BackColor
);
System\Windows\Forms\CheckBoxTests.cs (1)
30
Assert.Equal(Control.DefaultBackColor, control.
BackColor
);
System\Windows\Forms\RadioButtonTests.cs (1)
30
Assert.Equal(Control.DefaultBackColor, control.
BackColor
);