> For the complete documentation index, see [llms.txt](https://docs.wisej.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md).

# IImageExtensions

Namespace: **Wisej.Web.Markup**

Assembly: **Wisej.Framework** (4.0.0.0)

Adds [fluent markup](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/markup/markup) extension methods to the [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md) interface.

{% tabs %}
{% tab title="C#" %}

```csharp
public class IImageExtensions
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class IImageExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/lIX317sDtMTZJBi9oSIx) Image\<TImage>(target, value)

Sets the image for the specified target.

| Parameter  | Type                                                                            | Description                                                                                           |
| ---------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **TImage** |                                                                                 | The type of the target, which must implement [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md). |
| **target** | [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md) | The target object on which to set the image.                                                          |
| **value**  | [Image](https://docs.microsoft.com/dotnet/api/system.drawing.image)             | The image to set.                                                                                     |

**Returns:** [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md). The target object with the updated image.

### ![](/files/lIX317sDtMTZJBi9oSIx) ImageAlign\<TImage>(target, value)

Sets the image alignment for the specified target.

| Parameter  | Type                                                                                      | Description                                                                                           |
| ---------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **TImage** |                                                                                           | The type of the target, which must implement [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md). |
| **target** | [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md)           | The target object on which to set the image alignment.                                                |
| **value**  | [ContentAlignment](https://docs.microsoft.com/dotnet/api/system.drawing.contentalignment) | The image alignment to set.                                                                           |

**Returns:** [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md). The target object with the updated image alignment.

### ![](/files/lIX317sDtMTZJBi9oSIx) ImageIndex\<TImage>(target, value)

Sets the image index for the specified target.

| Parameter  | Type                                                                            | Description                                                                                           |
| ---------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **TImage** |                                                                                 | The type of the target, which must implement [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md). |
| **target** | [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md) | The target object on which to set the image index.                                                    |
| **value**  | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                     | The image index to set.                                                                               |

**Returns:** [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md). The target object with the updated image index.

### ![](/files/lIX317sDtMTZJBi9oSIx) ImageKey\<TImage>(target, value)

Sets the image key for the specified target.

| Parameter  | Type                                                                            | Description                                                                                           |
| ---------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **TImage** |                                                                                 | The type of the target, which must implement [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md). |
| **target** | [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md) | The target object on which to set the image key.                                                      |
| **value**  | [String](https://docs.microsoft.com/dotnet/api/system.string)                   | The image key to set.                                                                                 |

**Returns:** [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md). The target object with the updated image key.

### ![](/files/lIX317sDtMTZJBi9oSIx) ImageList\<TImage>(target, value)

Sets the image list for the specified target.

| Parameter  | Type                                                                            | Description                                                                                           |
| ---------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **TImage** |                                                                                 | The type of the target, which must implement [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md). |
| **target** | [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md) | The target object on which to set the image list.                                                     |
| **value**  | [ImageList](/api/wisej.web/content/imagelist.md)                                | The image list to set.                                                                                |

**Returns:** [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md). The target object with the updated image list.

### ![](/files/lIX317sDtMTZJBi9oSIx) ImageSource\<TImage>(target, value)

Sets the image source for the specified target.

| Parameter  | Type                                                                            | Description                                                                                           |
| ---------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **TImage** |                                                                                 | The type of the target, which must implement [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md). |
| **target** | [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md) | The target object on which to set the image source.                                                   |
| **value**  | [String](https://docs.microsoft.com/dotnet/api/system.string)                   | The image source to set.                                                                              |

**Returns:** [TImage](/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.md). The target object with the updated image source.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/api/wisej.web.markup/extensions/wisej.web.markup.iimageextensions.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.
