ButtonBase.ImageKey Właściwość

Definicja

Pobiera lub ustawia metodę dostępu klucza dla obrazu w elemecie ImageList.

public:
 property System::String ^ ImageKey { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageKeyConverter))]
public string ImageKey { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageKeyConverter))>]
member this.ImageKey : string with get, set
Public Property ImageKey As String

Wartość właściwości

String

Ciąg reprezentujący klucz obrazu.

Atrybuty

Uwagi

Właściwość ImageKey określa obraz z listy obrazów do wyświetlenia w kontrolce.

ImageKey i ImageIndex wzajemnie wykluczają się, co oznacza, że jeśli jest ustawiona, druga jest ustawiona na nieprawidłową wartość i ignorowana. Jeśli właściwość zostanie ustawiona ImageKey , ImageIndex właściwość zostanie automatycznie ustawiona na -1. Jeśli właściwość zostanie ustawiona ImageIndex , ImageKey właściwość zostanie automatycznie ustawiona na pusty ciąg ("").

Dotyczy