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
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.