Język

ImageList.ImageCollection.Item[] Właściwość

Definicja

Pobiera lub ustawia element Image w istniejącym ImageListobiekcie .

Przeciążenia

Nazwa Opis
Item[String]

Pobiera element Image z określonym kluczem z kolekcji.

Item[Int32]

Pobiera lub ustawia element Image w określonym indeksie w kolekcji.

Item[String]

Źródło:
ImageList.ImageCollection.cs
Źródło:
ImageList.ImageCollection.cs
Źródło:
ImageList.ImageCollection.cs
Źródło:
ImageList.ImageCollection.cs
Źródło:
ImageList.ImageCollection.cs

Pobiera element Image z określonym kluczem z kolekcji.

public:
 property System::Drawing::Image ^ default[System::String ^] { System::Drawing::Image ^ get(System::String ^ key); };
public System.Drawing.Image this[string key] { get; }
public System.Drawing.Image? this[string key] { get; }
member this.Item(string) : System.Drawing.Image
Default Public ReadOnly Property Item(key As String) As Image

Parametry

key
String

Nazwa obrazu do pobrania z kolekcji.

Wartość właściwości

Element Image z określonym kluczem.

Uwagi

Nazwa obrazu odpowiada jego kluczowi w pliku ImageList.ImageCollection. Kluczowe porównanie nie uwzględnia wielkości liter.

Jeśli nie można odnaleźć obrazu z określonym kluczem, wartość Item[] właściwości to null.

Dotyczy

Item[Int32]

Źródło:
ImageList.ImageCollection.cs
Źródło:
ImageList.ImageCollection.cs
Źródło:
ImageList.ImageCollection.cs
Źródło:
ImageList.ImageCollection.cs
Źródło:
ImageList.ImageCollection.cs

Pobiera lub ustawia element Image w określonym indeksie w kolekcji.

public:
 property System::Drawing::Image ^ default[int] { System::Drawing::Image ^ get(int index); void set(int index, System::Drawing::Image ^ value); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Image this[int index] { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.Item(int) : System.Drawing.Image with get, set
Default Public Property Item(index As Integer) As Image

Parametry

index
Int32

Indeks obrazu do pobrania lub ustawienia.

Wartość właściwości

Obraz na liście określony przez index.

Atrybuty

Wyjątki

Indeks jest mniejszy niż 0 lub większy niż lub równy Count.

imagenie jest .Bitmap

Obraz, który ma zostać przypisany, jest null lub nie .Bitmap

Nie można dodać obrazu do listy.

Uwagi

Zwrócona mapa bitowa jest kopią oryginalnego obrazu i powinna zostać usunięta przy użyciu Image.Dispose metody .

Dotyczy