/// <summary> /// Set up this SidePane for use, adding its components to containingControl. /// </summary> private void Init(Control containingControl) { _containingControl = containingControl; _banner = new Banner { Text = "", Dock = DockStyle.Top, //Padding = new Padding(0), // TODO not magic number Font = new System.Drawing.Font("Tahoma",13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))), Height = 24, // TODO not magic number }; _itemAreaContainer = new Panel { Dock = DockStyle.Fill, }; _itemAreas = new Dictionary<Tab, IItemArea>(); _tabArea = new OutlookBar { Dock = DockStyle.Bottom, Font = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World), Name = "outlookBar", }; _tabArea.Size = _tabArea.MinimumSize; _tabArea.ButtonClicked += new OutlookBar.ButtonClickedEventHandler(HandleTabAreaButtonClicked); // Controls must be added in the right order to lay out properly _containingControl.Controls.Add(_itemAreaContainer); _containingControl.Controls.Add(_banner); _containingControl.Controls.Add(_tabArea); }