Design-Time UI Clues

Now that the dry, tedious topics have been covered, it's time to get back to the fun stuff. The goal of any control designer is to provide a proper view of how the control will appear during runtime. However, it is also necessary for the designer to provide a set of hints or visual clues that facilitate the design of the control. The designer itself provides these design-time hints or UI clues by overriding the OnPaintAdornments method. Figure 5.4 shows the various UI clues provided by the TabPage designer.

Figure 5.4. The TabPage designer UI clues.

Each TabPage designer draws a focus rectangle and the control alignment grid ...

Get .NET Windows® Forms Custom Controls 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.