93 references to Control
System.Windows.Forms (93)
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 (32)
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)); 84Control, 86Control.ClientRectangle, 87Control.BackColor); 93Color? customOnColor = Control.ShouldSerializeBackColor() 94&& Control.BackColor.A == byte.MaxValue 95? Control.BackColor 98Color? customBorderColor = Control.FlatAppearance.BorderColor.IsEmpty 100: Control.FlatAppearance.BorderColor; 102Control.CheckGlyphRenderer.NotifyCheckStateChanged(Control.CheckState); 103Control.CheckGlyphRenderer.DrawGlyph( 107Control.Enabled, 108Control.MouseIsOver, 109Control.Focused && Control.ShowFocusCues, 115Color preferredTextColor = Control.ShouldSerializeForeColor() 116? Control.ForeColor 120Color textColor = Control.Enabled 124Control.Parent?.BackColor ?? Control.BackColor);
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)