System.Windows.Forms.ToolStripItem.Anchor Property

Gets or sets the edges of the container to which a System.Windows.Forms.ToolStripItem is bound and determines how a System.Windows.Forms.ToolStripItem is resized with its parent.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.DefaultValue(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)]
[System.ComponentModel.Browsable(false)]
public AnchorStyles Anchor { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the ToolStripItem.Anchor property to define how a System.Windows.Forms.ToolStripItem is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized.

Note:

The ToolStripItem.Anchor and ToolStripItem.Dock properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence.

Requirements

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