System.Windows.Forms.ToolStripSeparator Class

Represents a line used to group items of a System.Windows.Forms.ToolStrip or the drop-down items of a System.Windows.Forms.MenuStrip or System.Windows.Forms.ContextMenuStrip or other System.Windows.Forms.ToolStripDropDown control.

See Also: ToolStripSeparator Members

Syntax

[System.Windows.Forms.Design.ToolStripItemDesignerAvailability(System.Windows.Forms.Design.ToolStripItemDesignerAvailability.ToolStrip | System.Windows.Forms.Design.ToolStripItemDesignerAvailability.ContextMenuStrip)]
public class ToolStripSeparator : ToolStripItem

Remarks

Use a System.Windows.Forms.ToolStripSeparator to group related items on a menu or System.Windows.Forms.ToolStrip. The System.Windows.Forms.ToolStripSeparator is automatically spaced and oriented horizontally or vertically to accord with its container.

You can add a System.Windows.Forms.ToolStripSeparator at design time by choosing it from a drop-down list. However, you can also automatically create a System.Windows.Forms.ToolStripSeparator by typing a hyphen (-) in either the designer template node or in the ToolStripItemCollection.Add(string) 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