System.Windows.Forms.ToolStripItem.AutoSize Property

Gets or sets a value indicating whether the item is automatically sized.

Syntax

[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Visible)]
[System.ComponentModel.DefaultValue(true)]
[System.ComponentModel.Localizable(true)]
public bool AutoSize { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Set the ToolStripItem.AutoSize property to true to cause the System.Windows.Forms.ToolStripItem to adjust either its height or width, depending on the orientation of the System.Windows.Forms.ToolStrip, to ensure that the System.Windows.Forms.ToolStripItem uses only the required amount of space.

A System.Windows.Forms.ToolStripItem has a minimum size if the ToolStripItem.AutoSize property is true. Set the ToolStripItem.AutoSize property to false if you want a System.Windows.Forms.ToolStripItem to be smaller than the system-defined minimum size or to have a System.Windows.Forms.ToolStripItem size of zero.

Requirements

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