91 references to Control
System.Windows.Forms (91)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (12)
35
if (!
Control
.Enabled && disabledColors)
63
if (!
Control
.Enabled)
135
if (!
Control
.Checked)
140
if (!
Control
.Enabled && disabledColors)
172
if (
Control
.Checked)
181
if (!
Control
.Enabled)
186
if (
Control
.MouseIsDown)
210
RadioButtonRenderer.ConvertFromButtonState(style,
Control
.MouseIsOver),
211
Control
.HWNDInternal);
221
if (string.IsNullOrEmpty(
Control
.Text))
227
layout.Focus =
Control
.AutoSize ? layout.CheckBounds : layout.Field;
234
layout.CheckAlign =
Control
.CheckAlign;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonFlatAdapter.cs (14)
14
if (
Control
.Appearance == Appearance.Button)
16
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreateFlatAdapter(
Control
);
17
adapter.PaintDown(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
22
if (
Control
.Enabled)
34
if (
Control
.Appearance == Appearance.Button)
36
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreateFlatAdapter(
Control
);
37
adapter.PaintOver(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
42
if (
Control
.Enabled)
54
if (
Control
.Appearance == Appearance.Button)
56
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreateFlatAdapter(
Control
);
57
adapter.PaintUp(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
62
if (
Control
.Enabled)
75
PaintButtonBackground(e,
Control
.ClientRectangle, background: null);
83
protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreateFlatAdapter(
Control
);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonModernAdapter.cs (41)
22
if (
Control
.Appearance == Appearance.Button)
24
ButtonAdapter.PaintUp(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
33
if (
Control
.Appearance == Appearance.Button)
35
ButtonAdapter.PaintDown(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
44
if (
Control
.Appearance == Appearance.Button)
46
ButtonAdapter.PaintOver(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
56
FlatStyle.Flat => DarkModeAdapterFactory.CreateFlatAdapter(
Control
),
57
FlatStyle.Popup => DarkModeAdapterFactory.CreatePopupAdapter(
Control
),
58
_ => DarkModeAdapterFactory.CreateStandardAdapter(
Control
)
64
layout.CheckPaddingSize =
Control
.LogicalToDeviceUnits(2);
66
Control
.LogicalToDeviceUnits(13),
67
(int)(
Control
.Font.Height * 0.9f));
83
bool useExplicitBackColor =
Control
.ShouldSerializeBackColor() || !
Control
.UseVisualStyleBackColor;
84
bool hasTransparentBackColor =
Control
.BackColor.HasTransparency();
88
using var backBrush =
Control
.BackColor.GetCachedSolidBrushScope();
89
graphics.FillRectangle(backBrush,
Control
.ClientRectangle);
94
Control
,
96
Control
.ClientRectangle,
97
Control
.BackColor);
99
if (useExplicitBackColor && hasTransparentBackColor &&
Control
.BackColor.A > 0)
101
using var backBrush =
Control
.BackColor.GetCachedSolidBrushScope();
102
graphics.FillRectangle(backBrush,
Control
.ClientRectangle);
110
Color? customBorderColor =
Control
.FlatAppearance.BorderColor.IsEmpty
112
:
Control
.FlatAppearance.BorderColor;
114
Control
.RadioGlyphRenderer.NotifyCheckedChanged(
Control
.Checked);
115
Control
.RadioGlyphRenderer.DrawGlyph(
119
Control
.Enabled,
120
Control
.MouseIsOver,
121
Control
.Focused &&
Control
.ShowFocusCues,
127
Color preferredTextColor =
Control
.ShouldSerializeForeColor() ||
Control
.ForeColor != Forms.Control.DefaultForeColor
128
?
Control
.ForeColor
132
Color disabledTextBackColor =
Control
.ShouldSerializeBackColor()
133
&&
Control
.BackColor.A == byte.MaxValue
134
?
Control
.BackColor
135
:
Control
.Parent?.BackColor ??
Control
.BackColor;
137
Color textColor =
Control
.Enabled
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonPopupAdapter.cs (15)
12
if (
Control
.Appearance == Appearance.Button)
14
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(
Control
);
15
adapter.PaintUp(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
22
PaintButtonBackground(e,
Control
.ClientRectangle, background: null);
41
if (
Control
.Appearance == Appearance.Button)
43
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(
Control
);
44
adapter.PaintOver(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
51
PaintButtonBackground(e,
Control
.ClientRectangle, background: null);
66
if (
Control
.Appearance == Appearance.Button)
68
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(
Control
);
69
adapter.PaintDown(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
76
PaintButtonBackground(e,
Control
.ClientRectangle, background: null);
88
protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreatePopupAdapter(
Control
);
94
if (!
Control
.MouseIsDown && !
Control
.MouseIsOver)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonStandardAdapter.cs (9)
12
if (
Control
.Appearance == Appearance.Button)
14
ButtonAdapter.PaintUp(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
20
PaintButtonBackground(e,
Control
.ClientRectangle, background: null);
31
if (
Control
.Appearance == Appearance.Button)
33
ButtonAdapter.PaintDown(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
43
if (
Control
.Appearance == Appearance.Button)
45
ButtonAdapter.PaintOver(e,
Control
.Checked ? CheckState.Checked : CheckState.Unchecked);
53
protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreateStandardAdapter(
Control
);
63
ButtonBase b =
Control
;