Name
ButtonBase
Synopsis
This Control
is the base class for the various
button-like controls supported by the .NET Framework, including
Button
(a pushbutton),
CheckBox
, and RadioButton
.
In addition to the standard control features, it provides support for
an Image
(which can then be positioned in the
control using the ImageAlign
property) and for
alignment of the text (using the TextAlign
property).
Note that the default FlatStyle
for this class
supports .NET features such as images, font, and color changes, but
does not support Windows XP themes. You must set the
FlatStyle
to System
in this
case, but you will lose the .NET features.
public abstract class ButtonBase : Control { // Protected Constructors protected ButtonBase(); // Public Instance Properties public FlatStyle FlatStyle{set; get; } public Image Image{set; get; } public ContentAlignment ImageAlign{set; get; } public int ImageIndex{set; get; } public ImageList ImageList{set; get; } public ImeMode ImeMode{set; get; } // overrides Control public virtual ContentAlignment TextAlign{set; get; } // Protected Instance Properties protected override CreateParams CreateParams{get; } // overrides Control protected override ImeMode DefaultImeMode{get; } // overrides Control protected override Size DefaultSize{get; } // overrides Control protected bool IsDefault{set; get; } // Protected Instance Methods protected override AccessibleObject CreateAccessibilityInstance(); // overrides Control protected override void Dispose(bool disposing ...
Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.