Creating Custom Controls

When you must create a new control from scratch, you have two different classes from which you can inherit. The first is Control, which is the base class from which all controls are derived, including the standard framework controls. The other is UserControl, which is a special class, new to .NET Compact Framework 2.0, that is designed especially to support user-designed and user-created controls. It is important to understand the functional differences between the two classes before you start to create a custom control.

UserControl is derived from the ContainerControl class, which in turn inherits from ScrollableControl. These two classes add support for hosting child controls, managing their layout, and supporting scrolling. ...

Get Microsoft® Mobile Development Handbook 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.