7 types derived from ButtonBase
System.Windows.Forms (3)
System\Windows\Forms\Controls\Buttons\Button.cs (1)
18
public partial class Button :
ButtonBase
, IButtonControl
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
21
public partial class CheckBox :
ButtonBase
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
22
public partial class RadioButton :
ButtonBase
System.Windows.Forms.Tests (4)
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (2)
267
private class SubButtonBase :
ButtonBase
278
private class ButtonWithCustomAccessibleObject :
ButtonBase
System\Windows\Forms\ButtonBaseTests.cs (2)
9254
private class ButtonControl :
ButtonBase
, IButtonControl
9269
private class SubButtonBase :
ButtonBase
69 references to ButtonBase
PresentationUI (2)
MS\Internal\Documents\DialogBaseForm.cs (2)
114
else 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
))))
18
this.IsOwnerHandleCreated(out
ButtonBase
? owner) && owner.OwnerDraw && owner.MouseIsDown
24
if (this.IsOwnerHandleCreated(out
ButtonBase
? owner))
46
public override string? KeyboardShortcut => this.TryGetOwnerAs(out
ButtonBase
? owner)
54
if (!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"/>.
19
internal ButtonBaseAdapter(
ButtonBase
control) => Control = control.OrThrowIfNull();
21
protected
ButtonBase
Control { get; }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (1)
12
internal ButtonFlatAdapter(
ButtonBase
control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (1)
11
internal ButtonPopupAdapter(
ButtonBase
control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
14
internal ButtonStandardAdapter(
ButtonBase
control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckableControlBaseAdapter.cs (1)
16
internal CheckableControlBaseAdapter(
ButtonBase
control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
22
internal CheckBoxBaseAdapter(
ButtonBase
control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxFlatAdapter.cs (1)
8
internal CheckBoxFlatAdapter(
ButtonBase
control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
11
internal CheckBoxPopupAdapter(
ButtonBase
control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxStandardAdapter.cs (1)
11
internal CheckBoxStandardAdapter(
ButtonBase
control) : base(control)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
10
internal RadioButtonBaseAdapter(
ButtonBase
control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonFlatAdapter.cs (1)
10
internal RadioButtonFlatAdapter(
ButtonBase
control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonPopupAdapter.cs (1)
8
internal RadioButtonPopupAdapter(
ButtonBase
control) : base(control) { }
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonStandardAdapter.cs (2)
8
internal RadioButtonStandardAdapter(
ButtonBase
control) : base(control) { }
65
ButtonBase
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)
12
private readonly
ButtonBase
_owner;
20
internal FlatButtonAppearance(
ButtonBase
owner) => _owner = owner;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
14
internal DropDownButtonAdapter(
ButtonBase
control) : base(control) { }
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseAccessibleObject.cs (1)
8
using 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)
10
protected abstract
ButtonBase
CreateButton();
14
using
var
control = CreateButton();
36
using
var
control = CreateButton();
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (13)
14
Assert.Throws<ArgumentException>(() => new
ButtonBase
.ButtonBaseAccessibleObject(null));
21
Assert.Throws<ArgumentException>(() => new
ButtonBase
.ButtonBaseAccessibleObject(textBox));
60
var buttonBaseAccessibleObject = new
ButtonBase
.ButtonBaseAccessibleObject(button);
87
ButtonBase
.ButtonBaseAccessibleObject instance = Assert.IsType<
ButtonBase
.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance());
106
ButtonBase
.ButtonBaseAccessibleObject instance = Assert.IsType<
ButtonBase
.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance());
122
ButtonBase
.ButtonBaseAccessibleObject instance = Assert.IsType<
ButtonBase
.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance());
149
var buttonBaseAccessibleObject = new
ButtonBase
.ButtonBaseAccessibleObject(control);
177
var buttonBaseAccessibleObject = new
ButtonBase
.ButtonBaseAccessibleObject(control);
191
using
ButtonBase
buttonBase = new SubButtonBase();
226
using
ButtonBase
buttonBase = new SubButtonBase();
System\Windows\Forms\ButtonBaseTests.cs (13)
1776
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
ButtonBase
))[nameof(
ButtonBase
.Image)];
1795
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
ButtonBase
))[nameof(
ButtonBase
.Image)];
1823
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
ButtonBase
))[nameof(
ButtonBase
.Image)];
4280
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
ButtonBase
))[nameof(
ButtonBase
.UseVisualStyleBackColor)];
4298
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
ButtonBase
))[nameof(
ButtonBase
.UseVisualStyleBackColor)];
4325
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
ButtonBase
))[nameof(
ButtonBase
.UseVisualStyleBackColor)];
9380
protected override
ButtonBase
CreateButton() => new Button();
System\Windows\Forms\ButtonRenderingTests.cs (1)
249
protected override
ButtonBase
CreateButton() => new Button();
System\Windows\Forms\ButtonTests.cs (1)
3675
protected override
ButtonBase
CreateButton() => new SubButton();
System\Windows\Forms\CheckBoxRendererTests.cs (1)
160
protected override
ButtonBase
CreateButton() => new CheckBox();
System\Windows\Forms\CheckBoxTests.cs (1)
874
protected override
ButtonBase
CreateButton() => new SubCheckBox();
System\Windows\Forms\RadioButtonRendererTests.cs (1)
149
protected override
ButtonBase
CreateButton() => new RadioButton();
System\Windows\Forms\RadioButtonTests.cs (1)
1666
protected override
ButtonBase
CreateButton() => new SubRadioButton();