DekGenius.com
[ Team LiB ] Previous Section Next Section

ButtonBasemarshal by reference, disposable

System.Windows.Forms (system.windows.forms.dll)abstract class

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);  // overrides Control
   protected override void OnEnabledChanged(EventArgs e);  // overrides Control
   protected override void OnGotFocus(EventArgs e);  // overrides Control
   protected override void OnKeyDown(KeyEventArgs kevent);  // overrides Control
   protected override void OnKeyUp(KeyEventArgs kevent);  // overrides Control
   protected override void OnLostFocus(EventArgs e);  // overrides Control
   protected override void OnMouseDown(MouseEventArgs mevent);  // overrides Control
   protected override void OnMouseEnter(EventArgs eventargs);  // overrides Control
   protected override void OnMouseLeave(EventArgs eventargs);  // overrides Control
   protected override void OnMouseMove(MouseEventArgs mevent);  // overrides Control
   protected override void OnMouseUp(MouseEventArgs mevent);  // overrides Control
   protected override void OnPaint(PaintEventArgs pevent);  // overrides Control
   protected override void OnParentChanged(EventArgs e);  // overrides Control
   protected override void OnTextChanged(EventArgs e);  // overrides Control
   protected override void OnVisibleChanged(EventArgs e);  // overrides Control
   protected void ResetFlagsandPaint();
   protected override void WndProc(ref Message m);  // overrides Control
}

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) Control(IOleContro, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, System.ComponentModel.ISynchronizeInvoke, IWin32Window) ButtonBase

Subclasses

Button, CheckBox, RadioButton

    [ Team LiB ] Previous Section Next Section