System.Windows.Forms.ToolStrip.AutoSize Property

Gets or sets a value indicating whether the control is automatically resized to display its entire contents.

Syntax

[System.ComponentModel.DefaultValue(true)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)]
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Visible)]
public override bool AutoSize { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If you set ToolStrip.AutoSize to false and the System.Windows.Forms.ToolStrip is embedded in a System.Windows.Forms.ToolStripContainer panel, the bounds of the System.Windows.Forms.ToolStrip are not translated when you move the System.Windows.Forms.ToolStrip to a different panel of the System.Windows.Forms.ToolStripContainer. To translate the bounds properly, synchronize the ToolStrip.LayoutStyleChanged event, check the value of the ToolStrip.Orientation property, and resize the System.Windows.Forms.ToolStrip.

The ToolStripItem.Image, ToolStripItem.ImageAlign, ToolStripItem.ImageIndex, ToolStripItem.ImageKey, and ToolStripItem.ImageScaling properties pertain to various aspects of image handling. Use images in System.Windows.Forms.ToolStrip controls by setting these properties directly or by setting the run-time–only ToolStrip.ImageList property.

Image scaling is determined by the interaction of properties in both System.Windows.Forms.ToolStrip and System.Windows.Forms.ToolStripItem, as follows:

Requirements

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