System.Windows.Forms.ToolStripItem.ImageIndex Property

Gets or sets the index value of the image that is displayed on the item.

Syntax

[System.ComponentModel.Editor("System.Windows.Forms.Design.ToolStripImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.NoneExcludedImageIndexConverter))]
[System.Windows.Forms.RelatedImageList("Owner.ImageList")]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.Localizable(true)]
public int ImageIndex { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The ToolStripItem.ImageIndex property specifies the position of the image in the image list. The ToolStripItem.ImageKey property specifies the image itself.

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