System.Windows.Forms.ToolStripItemCollection Class

Represents a collection of System.Windows.Forms.ToolStripItem objects.

See Also: ToolStripItemCollection Members

Syntax

[System.ComponentModel.Editor("System.Windows.Forms.Design.ToolStripCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
[System.ComponentModel.ListBindable(false)]
public class ToolStripItemCollection : System.Windows.Forms.Layout.ArrangedElementCollection

Remarks

The ToolStripItemCollection.Add(ToolStripItem), ToolStripItemCollection.Remove(ToolStripItem), and ToolStripItemCollection.RemoveAt(int) methods enable you to add and remove individual controls from the collection. You can also use the ToolStripItemCollection.AddRange(ToolStripItem[]) or ToolStripItemCollection.Clear methods to add or remove all the controls from the collection.

You can determine whether a System.Windows.Forms.ToolStripItem is a member of the collection by passing the control into the ToolStripItemCollection.Contains(ToolStripItem) method. To get the index value of the location of a System.Windows.Forms.ToolStripItem in the collection, pass the control into the ToolStripItemCollection.IndexOf(ToolStripItem) method. The collection can be copied into an array by calling the ToolStripItemCollection.CopyTo(ToolStripItem[], int) method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0