public void Redraw() { this.RedrawHeader(); if (this.Items != null) { PicMenuItem item = null; int nowY = this.Controls[0].Height; for (int i = 0; i < items.Count; i++) { item = items[i]; item.Location = new Point(0, nowY); nowY += item.Size.Height + margin; item.BackColor = this.BackColor; item.Width = this.Width; item.ResetLocation(); this.Controls.Add(item); } } }
/// <summary> /// Removes the specified item. /// </summary> /// <param name="item">The item.</param> public void Remove(PicMenuItem item) { List.Remove(item); }
/// <summary> /// Adds the specified item. /// </summary> /// <param name="item">The item.</param> public void Add(PicMenuItem item) { List.Add(item); // item.Location = new Point(); }