public TabHost() { InitializeComponent(); tabs = new TabItemCollection(this); TabAlignment = TabAlignment.Top; TabDistance = DefaultTabDistance; TabHeight = DefaultTabHeight; SelectedTabHeight = DefaultSelectedTabHeight; // enable double-buffering this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); this.UpdateStyles(); }