Creating User Controls

ARE MENUS USEFUL?

When used carefully, context-sensitive menus can be very useful. Menus are typically associated with keyboard shortcuts and can allow the user to easily navigate a complex business application.

A set of controls provided by the .NET Framework is quite broad and, for most applications scenarios, perhaps sufficient. However, for scenarios when you will need to either tweak the prebuilt controls or create new controls by aggregating multiple simpler controls, the Windows Forms application model allows developers to create their own controls by subclassing the UserControl class. For instance, consider Listing 7.8, where a Phone control is created by using a set of TextBox and Label controls. The control also ...

Get Microsoft® .NET Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.