# ImageList

The `ImageList` component is typically used by other controls, such as the `ListView`, `TreeView`, or `ToolBar`. You can add bitmaps or icons to the `ImageList`, and the other controls are able to use the images as they require.

The Wisej.NET `ImageList` component is used to store images, which can then be displayed by controls. An image list allows you to write code for a single, consistent catalog of images. For example, you can rotate images displayed by a `Button` control simply by changing the button's `ImageIndex` or `ImageKey` property. You can also associate the same image list with multiple controls. For example, if you are using both a `ListView` control and a `TreeView` control to display the same list of files, changing a file's icon in the image list will cause the new icon to appear in both views.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation.](http://docs.wisej.com/api)
{% endhint %}

## Features

### Resizing

When set, the `ImageSize` property will automatically force all images in the `ImageSet` to become the given size.

![ImageList resizing demonstration](/files/-MjVM-2icQgKMRf1BAiE)

### Transparent Color

When set, the `TransparentColor` property specifies which color in the image should be treated as transparent.

**Original Image:**

![Image before applying transparent color](/files/-MgrBjyC4r1CMS74DO4w)

## How To

### Add images to the ImageList

```csharp
ImageList imageList1 = new ImageList();
imageList1.Images.Add("tree", Image.FromFile("tree.jpg"));
imageList1.Images.Add("apple", Image.FromFile("apple.png"));
```

In this code example, both tree.jpg and apple.png are located in the root folder of the project.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/docs/controls/content/imagelist.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
