/// <summary> /// Adds category to a collection. /// </summary> /// <param name="name">The name of category.</param> /// <returns>Created category panel.</returns> public StiOutlookPanel AddCategory(string name) { StiOutlookPanel panel = new StiOutlookPanel(); panel.Text = name; this.Controls.Add(panel); panel.Dock = DockStyle.Top; this.Controls.SetChildIndex(panel, 0); return(panel); }
private void OnAddPanel(object sender, EventArgs e) { IDesignerHost host = ((IDesignerHost)base.GetService(typeof(IDesignerHost))); DesignerTransaction transaction = host.CreateTransaction("Add Panel"); StiOutlookPanel panel = ((StiOutlookPanel)host.CreateComponent(typeof(StiOutlookPanel))); outlookBar.Controls.Add(panel); outlookBar.Controls.SetChildIndex(panel, 0); panel.Dock = DockStyle.Top; transaction.Commit(); }