7 types derived from ButtonBase
System.Windows.Forms (3)
System\Windows\Forms\Controls\Buttons\Button.cs (1)
18public partial class Button : ButtonBase, IButtonControl
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
21public partial class CheckBox : ButtonBase
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
22public partial class RadioButton : ButtonBase
System.Windows.Forms.Tests (4)
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (2)
267private class SubButtonBase : ButtonBase 278private class ButtonWithCustomAccessibleObject : ButtonBase
System\Windows\Forms\ButtonBaseTests.cs (2)
9254private class ButtonControl : ButtonBase, IButtonControl 9269private class SubButtonBase : ButtonBase
69 references to ButtonBase
PresentationUI (2)
MS\Internal\Documents\DialogBaseForm.cs (2)
114else if (c is ButtonBase) 116(c as ButtonBase).UseCompatibleTextRendering = false;
System.Windows.Forms (29)
System\Windows\Forms\Controls\Buttons\ButtonBase.ButtonBaseAccessibleObject.cs (6)
11: base(owner is ButtonBase 13: throw new ArgumentException(string.Format(SR.ConstructorArgumentInvalidValueType, nameof(owner), typeof(ButtonBase)))) 18this.IsOwnerHandleCreated(out ButtonBase? owner) && owner.OwnerDraw && owner.MouseIsDown 24if (this.IsOwnerHandleCreated(out ButtonBase? owner)) 46public override string? KeyboardShortcut => this.TryGetOwnerAs(out ButtonBase? owner) 54if (!this.TryGetOwnerAs(out ButtonBase? owner))
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
59/// Initializes a new instance of the <see cref="ButtonBase"/> class.
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (3)
12/// <see cref="ButtonBase"/>, parts of <see cref="ToolStripItem"/>, and parts of <see cref="DataGridView"/>. 19internal ButtonBaseAdapter(ButtonBase control) => Control = control.OrThrowIfNull(); 21protected ButtonBase Control { get; }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (1)
12internal ButtonFlatAdapter(ButtonBase control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (1)
11internal ButtonPopupAdapter(ButtonBase control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
14internal ButtonStandardAdapter(ButtonBase control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckableControlBaseAdapter.cs (1)
16internal CheckableControlBaseAdapter(ButtonBase control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
22internal CheckBoxBaseAdapter(ButtonBase control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxFlatAdapter.cs (1)
8internal CheckBoxFlatAdapter(ButtonBase control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
11internal CheckBoxPopupAdapter(ButtonBase control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxStandardAdapter.cs (1)
11internal CheckBoxStandardAdapter(ButtonBase control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
10internal RadioButtonBaseAdapter(ButtonBase control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonFlatAdapter.cs (1)
10internal RadioButtonFlatAdapter(ButtonBase control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonPopupAdapter.cs (1)
8internal RadioButtonPopupAdapter(ButtonBase control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonStandardAdapter.cs (2)
8internal RadioButtonStandardAdapter(ButtonBase control) : base(control) { } 65ButtonBase b = Control;
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
483/// Raises the <see cref="ButtonBase.OnMouseUp"/> event.
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (2)
12private readonly ButtonBase _owner; 20internal FlatButtonAppearance(ButtonBase owner) => _owner = owner;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
14internal DropDownButtonAdapter(ButtonBase control) : base(control) { }
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseAccessibleObject.cs (1)
8using static System.Windows.Forms.ButtonBase;
System\Windows\Forms\DataBinding\ICommandBindingTargetProvider.cs (1)
80/// See <see cref="ButtonBase"/> for an example implementation.
System.Windows.Forms.Design.Tests (3)
EnsureEditorsTests.cs (3)
79[InlineData(typeof(ButtonBase), "ImageIndex", typeof(ImageIndexEditor))] 80[InlineData(typeof(ButtonBase), "ImageKey", typeof(ImageIndexEditor))] 81[InlineData(typeof(ButtonBase), "Text", typeof(MultilineStringEditor))]
System.Windows.Forms.Tests (35)
System\Windows\Forms\AbstractButtonBaseTests.cs (3)
10protected abstract ButtonBase CreateButton(); 14using var control = CreateButton(); 36using var control = CreateButton();
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (13)
14Assert.Throws<ArgumentException>(() => new ButtonBase.ButtonBaseAccessibleObject(null)); 21Assert.Throws<ArgumentException>(() => new ButtonBase.ButtonBaseAccessibleObject(textBox)); 60var buttonBaseAccessibleObject = new ButtonBase.ButtonBaseAccessibleObject(button); 87ButtonBase.ButtonBaseAccessibleObject instance = Assert.IsType<ButtonBase.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance()); 106ButtonBase.ButtonBaseAccessibleObject instance = Assert.IsType<ButtonBase.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance()); 122ButtonBase.ButtonBaseAccessibleObject instance = Assert.IsType<ButtonBase.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance()); 149var buttonBaseAccessibleObject = new ButtonBase.ButtonBaseAccessibleObject(control); 177var buttonBaseAccessibleObject = new ButtonBase.ButtonBaseAccessibleObject(control); 191using ButtonBase buttonBase = new SubButtonBase(); 226using ButtonBase buttonBase = new SubButtonBase();
System\Windows\Forms\ButtonBaseTests.cs (13)
1776PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ButtonBase))[nameof(ButtonBase.Image)]; 1795PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ButtonBase))[nameof(ButtonBase.Image)]; 1823PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ButtonBase))[nameof(ButtonBase.Image)]; 4280PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ButtonBase))[nameof(ButtonBase.UseVisualStyleBackColor)]; 4298PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ButtonBase))[nameof(ButtonBase.UseVisualStyleBackColor)]; 4325PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ButtonBase))[nameof(ButtonBase.UseVisualStyleBackColor)]; 9380protected override ButtonBase CreateButton() => new Button();
System\Windows\Forms\ButtonRenderingTests.cs (1)
249protected override ButtonBase CreateButton() => new Button();
System\Windows\Forms\ButtonTests.cs (1)
3675protected override ButtonBase CreateButton() => new SubButton();
System\Windows\Forms\CheckBoxRendererTests.cs (1)
160protected override ButtonBase CreateButton() => new CheckBox();
System\Windows\Forms\CheckBoxTests.cs (1)
874protected override ButtonBase CreateButton() => new SubCheckBox();
System\Windows\Forms\RadioButtonRendererTests.cs (1)
149protected override ButtonBase CreateButton() => new RadioButton();
System\Windows\Forms\RadioButtonTests.cs (1)
1666protected override ButtonBase CreateButton() => new SubRadioButton();