This is the fundamental base class for all the controls and forms in the framework.
After constructing a
Control, you can add it to
Controls collection of a parent control and
Show() it. (You can subsequently
Hide() it again or change the
property.) You can also toggle whether it is
Adding it to the
Controls collection causes its
Parent property to be set appropriately.
HasChildren determines whether this control
contains any children itself. Its index in the parent collection also
determines its position in the z-order. You can use
SendToBack() for gross control of this feature.
TopLevelControl returns the top-level
container—this is (usually) the outermost
Form in which you will find the control. Note that
if the control is contained in a
TabPage that is
not currently showing in the
TopLevelControl property will return null.
You can set a
Font with which
to paint the control imagery (in particular, the
Text). If you do not set these explicitly, it will
AmbientProperties from its container.
If all else fails, it will use the
DefaultFont. You can also specify a
BackgroundImage that will be tiled across the
control. Should the system theme or colors change, you can bind to
SystemColorsChanged event to update the
The general shape of the control can be specified with the
Bounds property and
SetBounds() method. ...