Compartir a través de

ButtonBase.ImageKey Property


Gets or sets the key accessor for the image in the ImageList.

 property System::String ^ ImageKey { System::String ^ get(); void set(System::String ^ value); };
public string ImageKey { get; set; }
member this.ImageKey : string with get, set
Public Property ImageKey As String

Property Value

A string representing the key of the image.



The ImageKey property specifies the image from the image list to display on the control.

ImageKey and ImageIndex are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. If you set the ImageKey property, the ImageIndex property is automatically set to -1. Alternatively, if you set the ImageIndex property, the ImageKey is automatically set to an empty string ("").

Applies to