Class ImageCollection
Collection of images for ImageListAdv.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class ImageCollection : CollectionBase, IList, ICollection, IEnumerable
Constructors
ImageCollection()
Initializes a new instance of the ImageCollection class.
Declaration
public ImageCollection()
Properties
Empty
Gets value indicating whether collection is empty.
Declaration
public bool Empty { get; }
Property Value
Type |
---|
System.Boolean |
IsReadOnly
Added for compatibility reasons.
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
---|
System.Boolean |
Item[Int32]
Gets or sets image at specified index.
Declaration
public Image this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of image. |
Property Value
Type | Description |
---|---|
System.Drawing.Image | Image at specified index |
Item[String]
Gets or sets image with specified key.
Declaration
public Image this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of image. |
Property Value
Type | Description |
---|---|
System.Drawing.Image | Image with specified key. |
Keys
Gets collection of keys.
Declaration
public StringCollection Keys { get; }
Property Value
Type |
---|
System.Collections.Specialized.StringCollection |
Methods
Add(Icon)
Adds icon to the collection.
Declaration
public void Add(Icon value)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Icon | value | Icon to add. |
Add(Image)
Adds image to the collection.
Declaration
public void Add(Image value)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | value | Image to add. |
Add(String, Icon)
Adds icon with specified key to collection.
Declaration
public void Add(string key, Icon icon)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of the icon. |
System.Drawing.Icon | icon | Icon to add. |
Add(String, Image)
Adds image with specified key to collection.
Declaration
public void Add(string key, Image image)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of the image. |
System.Drawing.Image | image | Image to add. |
AddRange(Image[])
Adds array of images to collection.
Declaration
public void AddRange(Image[] images)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image[] | images | Array of images to add. |
Contains(Image)
Checks whether collection contains given image.
Declaration
public bool Contains(Image image)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | image | Image to be checked. |
Returns
Type | Description |
---|---|
System.Boolean | True if collection contains given image; otherwise false. |
ContainsKey(String)
Checks whether given key exists in collection.
Declaration
public bool ContainsKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key to be checked. |
Returns
Type | Description |
---|---|
System.Boolean | True if given key exists in collection; otherwise false. |
GetEnumerator()
Gets enumerator for collection.
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Enumerator for collection. |
IndexOf(Image)
Gets index of given image.
Declaration
public int IndexOf(Image image)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | image | Image to get index of. |
Returns
Type | Description |
---|---|
System.Int32 | Index of given image or -1 if image doesn't exist in collection. |
IndexOfKey(String)
Gets index of given key.
Declaration
public int IndexOfKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key to get index of. |
Returns
Type | Description |
---|---|
System.Int32 | Index if given key or -1 if key doesn't exist in collection. |
Remove(Image)
Removes given image from collection.
Declaration
public void Remove(Image image)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | image | Image to remove. |
RemoveByKey(String)
Removes image with specified key.
Declaration
public void RemoveByKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of image to remove. |
SetKeyName(Int32, String)
Sets new name to specified key.
Declaration
public void SetKeyName(int index, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of key to set new name to. |
System.String | name | New name of specified key. |
Explicit Interface Implementations
ICollection.CopyTo(Array, Int32)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Declaration
void ICollection.CopyTo(Array dest, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Array | dest | The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing. |
System.Int32 | index | The zero-based index in array at which copying begins. |
IList.Add(Object)
Adds an item to the IList.
Declaration
int IList.Add(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The Object to add to the IList. |
Returns
Type | Description |
---|---|
System.Int32 | The position into which the new element was inserted. |
IList.Contains(Object)
Determines whether the IList contains a specific value.
Declaration
bool IList.Contains(object image)
Parameters
Type | Name | Description |
---|---|---|
System.Object | image | The Object to locate in the IList. |
Returns
Type | Description |
---|---|
System.Boolean | True if the Object is found in the IList; otherwise, false. |
IList.get_Item(Int32)
Declaration
object IList.get_Item(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type |
---|
System.Object |
IList.IndexOf(Object)
Determines the index of a specific item in the IList.
Declaration
int IList.IndexOf(object image)
Parameters
Type | Name | Description |
---|---|---|
System.Object | image | The Object to locate in the IList. |
Returns
Type | Description |
---|---|
System.Int32 | The index of value if found in the list; otherwise, -1. |
IList.Insert(Int32, Object)
Inserts an item to the IList at the specified position.
Declaration
void IList.Insert(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which value should be inserted. |
System.Object | value | The Object to insert into the IList. |
IList.Item[Int32]
Gets or sets the element at the specified index.
Declaration
object IList.this[] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to get or set. |
Returns
Type | Description |
---|---|
System.Object | The element at the specified index. |
IList.Remove(Object)
Removes the first occurrence of a specific object from the IList.
Declaration
void IList.Remove(object image)
Parameters
Type | Name | Description |
---|---|---|
System.Object | image | The Object to remove from the IList. |
IList.set_Item(Int32, Object)
Declaration
void IList.set_Item(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
System.Object | value |