Implementation

Now that the responsibilities and expected functionality of the OutlookBarTab have been defined, it's time to realize the design in code. Listing 7.1 provides the complete listing for the OutlookBarTab component.

Listing 7.1. OutlookBarTab
 1: using System; 2: using System.ComponentModel; 3: using System.Drawing; 4: using System.Windows.Forms; 5: 6: namespace SAMS.ToolKit.Controls 7: { 8: 9: [ 10: Description( "OutlookBarTab Component" ), 11: ToolboxItem( false ) 12: ] 13: public class OutlookBarTab : System.ComponentModel.Component { 14: 15: #region STATIC FIELDS 16: internal static int EDGE_PADDING = 4; 17: #endregion 18: 19: #region Protected Instance Members 20: protected string text; 21: protected StringAlignment textAlignment; ...

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.