91 references to Control
System.Windows.Forms (91)
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 (30)
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)); 89Color? customBorderColor = Control.FlatAppearance.BorderColor.IsEmpty 91: Control.FlatAppearance.BorderColor; 93Control.CheckGlyphRenderer.NotifyCheckStateChanged(Control.CheckState); 94Control.CheckGlyphRenderer.DrawGlyph( 98Control.Enabled, 99Control.MouseIsOver, 100Control.Focused && Control.ShowFocusCues, 106Color preferredTextColor = Control.ShouldSerializeForeColor() || Control.ForeColor != Forms.Control.DefaultForeColor 107? Control.ForeColor 111Color disabledTextBackColor = Control.ShouldSerializeBackColor() 112&& Control.BackColor.A == byte.MaxValue 113? Control.BackColor 114: Control.Parent?.BackColor ?? Control.BackColor; 116Color 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)