102 references to Control
System.Windows.Forms (102)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (20)
62
if (
Control
.CheckState == CheckState.Indeterminate)
126
if (
Control
.CheckState == CheckState.Indeterminate)
132
DrawCheckBackground(
Control
.Enabled,
Control
.CheckState, e, bounds, checkBackground, disabledColors);
139
Control
.Checked,
140
Control
.Enabled,
141
Control
.CheckState,
236
if (
Control
.CheckState == CheckState.Unchecked)
245
if (!
Control
.Enabled)
250
if (
Control
.MouseIsDown)
262
if (
Control
.CheckState == CheckState.Indeterminate)
269
CheckBoxRenderer.ConvertFromButtonState(style, isMixed: true,
Control
.MouseIsOver),
270
Control
.HWNDInternal);
284
CheckBoxRenderer.ConvertFromButtonState(style, isMixed: false,
Control
.MouseIsOver),
285
Control
.HWNDInternal);
330
if (string.IsNullOrEmpty(
Control
.Text))
336
layout.Focus =
Control
.AutoSize ? Rectangle.Inflate(layout.CheckBounds, -2, -2) : layout.Field;
343
layout.CheckAlign =
Control
.CheckAlign;
345
layout.ShadowedText = !
Control
.Enabled;
346
layout.LayoutRTL =
Control
.RightToLeft == RightToLeft.Yes;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxFlatAdapter.cs (11)
14
if (
Control
.Appearance == Appearance.Button)
16
ButtonAdapter.PaintDown(e,
Control
.CheckState);
21
if (
Control
.Enabled)
33
if (
Control
.Appearance == Appearance.Button)
35
ButtonAdapter.PaintOver(e,
Control
.CheckState);
40
if (
Control
.Enabled)
52
if (
Control
.Appearance == Appearance.Button)
54
ButtonAdapter.PaintUp(e,
Control
.CheckState);
59
if (
Control
.Enabled)
72
PaintButtonBackground(e,
Control
.ClientRectangle, background: null);
87
protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreateFlatAdapter(
Control
);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxModernAdapter.cs (41)
22
if (
Control
.Appearance == Appearance.Button)
24
ButtonAdapter.PaintUp(e,
Control
.CheckState);
33
if (
Control
.Appearance == Appearance.Button)
35
ButtonAdapter.PaintDown(e,
Control
.CheckState);
44
if (
Control
.Appearance == Appearance.Button)
46
ButtonAdapter.PaintOver(e,
Control
.CheckState);
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
.CheckGlyphRenderer.NotifyCheckStateChanged(
Control
.CheckState);
115
Control
.CheckGlyphRenderer.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\CheckBoxPopupAdapter.cs (16)
17
if (
Control
.Appearance == Appearance.Button)
19
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(
Control
);
20
adapter.PaintUp(e,
Control
.CheckState);
27
PaintButtonBackground(e,
Control
.ClientRectangle, background: null);
41
(colors.Options.HighContrast && !
Control
.Enabled) ? colors.WindowFrame : colors.ButtonShadow);
52
if (
Control
.Appearance == Appearance.Button)
54
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(
Control
);
55
adapter.PaintOver(e,
Control
.CheckState);
62
Control
.PaintBackground(e,
Control
.ClientRectangle);
77
if (!string.IsNullOrEmpty(
Control
.Text))
95
if (
Control
.Appearance == Appearance.Button)
97
ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(
Control
);
98
adapter.PaintDown(e,
Control
.CheckState);
105
PaintButtonBackground(e,
Control
.ClientRectangle, background: null);
118
protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreatePopupAdapter(
Control
);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxStandardAdapter.cs (14)
17
if (
Control
.Appearance == Appearance.Button)
19
ButtonAdapter.PaintUp(e,
Control
.CheckState);
25
PaintButtonBackground(e,
Control
.ClientRectangle, null);
36
if (!string.IsNullOrEmpty(
Control
.Text))
66
if (
Control
.Appearance == Appearance.Button)
68
ButtonAdapter.PaintDown(e,
Control
.CheckState);
78
if (
Control
.Appearance == Appearance.Button)
80
ButtonAdapter.PaintOver(e,
Control
.CheckState);
90
if (
Control
.Appearance == Appearance.Button)
92
ButtonStandardAdapter adapter = new(
Control
);
108
protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreateStandardAdapter(
Control
);
124
Control
.MouseIsOver),
125
Control
.HWNDInternal).Width;
130
?
Control
.LogicalToDeviceUnits(layout.CheckSize)