102 references to Control
System.Windows.Forms (102)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (20)
62if (Control.CheckState == CheckState.Indeterminate) 126if (Control.CheckState == CheckState.Indeterminate) 132DrawCheckBackground(Control.Enabled, Control.CheckState, e, bounds, checkBackground, disabledColors); 139Control.Checked, 140Control.Enabled, 141Control.CheckState, 236if (Control.CheckState == CheckState.Unchecked) 245if (!Control.Enabled) 250if (Control.MouseIsDown) 262if (Control.CheckState == CheckState.Indeterminate) 269CheckBoxRenderer.ConvertFromButtonState(style, isMixed: true, Control.MouseIsOver), 270Control.HWNDInternal); 284CheckBoxRenderer.ConvertFromButtonState(style, isMixed: false, Control.MouseIsOver), 285Control.HWNDInternal); 330if (string.IsNullOrEmpty(Control.Text)) 336layout.Focus = Control.AutoSize ? Rectangle.Inflate(layout.CheckBounds, -2, -2) : layout.Field; 343layout.CheckAlign = Control.CheckAlign; 345layout.ShadowedText = !Control.Enabled; 346layout.LayoutRTL = Control.RightToLeft == RightToLeft.Yes;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxFlatAdapter.cs (11)
14if (Control.Appearance == Appearance.Button) 16ButtonAdapter.PaintDown(e, Control.CheckState); 21if (Control.Enabled) 33if (Control.Appearance == Appearance.Button) 35ButtonAdapter.PaintOver(e, Control.CheckState); 40if (Control.Enabled) 52if (Control.Appearance == Appearance.Button) 54ButtonAdapter.PaintUp(e, Control.CheckState); 59if (Control.Enabled) 72PaintButtonBackground(e, Control.ClientRectangle, background: null); 87protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreateFlatAdapter(Control);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxModernAdapter.cs (41)
22if (Control.Appearance == Appearance.Button) 24ButtonAdapter.PaintUp(e, Control.CheckState); 33if (Control.Appearance == Appearance.Button) 35ButtonAdapter.PaintDown(e, Control.CheckState); 44if (Control.Appearance == Appearance.Button) 46ButtonAdapter.PaintOver(e, Control.CheckState); 56FlatStyle.Flat => DarkModeAdapterFactory.CreateFlatAdapter(Control), 57FlatStyle.Popup => DarkModeAdapterFactory.CreatePopupAdapter(Control), 58_ => DarkModeAdapterFactory.CreateStandardAdapter(Control) 64layout.CheckPaddingSize = Control.LogicalToDeviceUnits(2); 66Control.LogicalToDeviceUnits(13), 67(int)(Control.Font.Height * 0.9f)); 83bool useExplicitBackColor = Control.ShouldSerializeBackColor() || !Control.UseVisualStyleBackColor; 84bool hasTransparentBackColor = Control.BackColor.HasTransparency(); 88using var backBrush = Control.BackColor.GetCachedSolidBrushScope(); 89graphics.FillRectangle(backBrush, Control.ClientRectangle); 94Control, 96Control.ClientRectangle, 97Control.BackColor); 99if (useExplicitBackColor && hasTransparentBackColor && Control.BackColor.A > 0) 101using var backBrush = Control.BackColor.GetCachedSolidBrushScope(); 102graphics.FillRectangle(backBrush, Control.ClientRectangle); 110Color? customBorderColor = Control.FlatAppearance.BorderColor.IsEmpty 112: Control.FlatAppearance.BorderColor; 114Control.CheckGlyphRenderer.NotifyCheckStateChanged(Control.CheckState); 115Control.CheckGlyphRenderer.DrawGlyph( 119Control.Enabled, 120Control.MouseIsOver, 121Control.Focused && Control.ShowFocusCues, 127Color preferredTextColor = Control.ShouldSerializeForeColor() || Control.ForeColor != Forms.Control.DefaultForeColor 128? Control.ForeColor 132Color disabledTextBackColor = Control.ShouldSerializeBackColor() 133&& Control.BackColor.A == byte.MaxValue 134? Control.BackColor 135: Control.Parent?.BackColor ?? Control.BackColor; 137Color textColor = Control.Enabled
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (16)
17if (Control.Appearance == Appearance.Button) 19ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(Control); 20adapter.PaintUp(e, Control.CheckState); 27PaintButtonBackground(e, Control.ClientRectangle, background: null); 41(colors.Options.HighContrast && !Control.Enabled) ? colors.WindowFrame : colors.ButtonShadow); 52if (Control.Appearance == Appearance.Button) 54ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(Control); 55adapter.PaintOver(e, Control.CheckState); 62Control.PaintBackground(e, Control.ClientRectangle); 77if (!string.IsNullOrEmpty(Control.Text)) 95if (Control.Appearance == Appearance.Button) 97ButtonBaseAdapter adapter = DarkModeAdapterFactory.CreatePopupAdapter(Control); 98adapter.PaintDown(e, Control.CheckState); 105PaintButtonBackground(e, Control.ClientRectangle, background: null); 118protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreatePopupAdapter(Control);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxStandardAdapter.cs (14)
17if (Control.Appearance == Appearance.Button) 19ButtonAdapter.PaintUp(e, Control.CheckState); 25PaintButtonBackground(e, Control.ClientRectangle, null); 36if (!string.IsNullOrEmpty(Control.Text)) 66if (Control.Appearance == Appearance.Button) 68ButtonAdapter.PaintDown(e, Control.CheckState); 78if (Control.Appearance == Appearance.Button) 80ButtonAdapter.PaintOver(e, Control.CheckState); 90if (Control.Appearance == Appearance.Button) 92ButtonStandardAdapter adapter = new(Control); 108protected override ButtonBaseAdapter CreateButtonAdapter() => DarkModeAdapterFactory.CreateStandardAdapter(Control); 124Control.MouseIsOver), 125Control.HWNDInternal).Width; 130? Control.LogicalToDeviceUnits(layout.CheckSize)