Gets or sets the index value of the images displayed on the Label.
[Visual Basic] Public Property ImageIndex As Integer [C#] public int ImageIndex {get; set;} [C++] public: __property int get_ImageIndex(); public: __property void set_ImageIndex(int); [JScript] public function get ImageIndex() : int; public function set ImageIndex(int);
A zero-based index that represents the position in the ImageList property. The default is-1.
Exception Type | Condition |
---|---|
ArgumentException | The value assigned is less than the lower bounds of the System.WinForms.ImageIndex property. |
When the ImageIndex or ImageList property is set, the Image property is set to a null reference (in Visual Basic Nothing).
Label Class | Label Members | System.WinForms Namespace | Image | ImageAlign | ImageList