Name
UserControl
Synopsis
You should derive your own custom container controls from this base class. It manages focus, tab, and mnemonic (shortcut) behavior for you, and provides designer integration support.
public class UserControl : ContainerControl { // Public Constructors public UserControl(); // Public Instance Properties public override string Text{set; get; } // overrides Control // Protected Instance Properties protected override Size DefaultSize{get; } // overrides Control // Protected Instance Methods protected override void OnCreateControl(); // overrides ContainerControl protected virtual void OnLoad(EventArgs e); protected override void OnMouseDown(MouseEventArgs e); // overrides Control protected override void WndProc(ref Message m); // overrides ContainerControl // Events public event EventHandler Load; }
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)
→ ScrollableControl → ContainerControl(IContainerControl) → UserControl
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access