System.Windows.Forms.TreeNode.ImageIndex Property

Gets or sets the image list index value of the image displayed when the tree node is in the unselected state.

Syntax

[System.ComponentModel.Localizable(true)]
[System.ComponentModel.Editor("System.Windows.Forms.Design.ImageIndexEditor, 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.TreeViewImageIndexConverter))]
[System.Windows.Forms.RelatedImageList("TreeView.ImageList")]
[System.ComponentModel.DefaultValue(-1)]
public int ImageIndex { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The TreeNode.ImageIndex value is the index value of an System.Drawing.Image stored in the System.Windows.Forms.ImageList assigned to the TreeView.ImageList property.

Note:

The default value of the TreeNode.ImageIndex property is the same as the TreeView.ImageIndex property of the System.Windows.Forms.TreeView control that the System.Windows.Forms.TreeNode is assigned to.

The TreeNode.ImageKey and TreeNode.ImageIndex properties are mutually exclusive; therefore, if one property is set, the other is ignored. If you set the TreeNode.ImageKey property, the TreeNode.ImageIndex property is automatically set to -1. Alternatively, if you set TreeNode.ImageIndex, TreeNode.ImageKey is automatically set to an empty string ("").

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0