# PictureBox

Namespace: **Wisej.Web**

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

* [Control](https://docs.wisej.com/api/v2.2/wisej.web/general/control)
  * [PictureBox](https://docs.wisej.com/api/v2.2/wisej.web/content/wisej.web.picturebox)

Represents an image control.

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

```csharp
public class PictureBox : Control, ISupportInitialize
```

{% endtab %}

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

```visual-basic
Public Class PictureBox
    Inherits Control
    Implements ISupportInitialize
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)PictureBox()

Initializes a new instance of the [PictureBox](https://docs.wisej.com/api/v2.2/wisej.web/content/wisej.web.picturebox) class.

## Properties

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)BorderStyle

[BorderStyle](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.borderstyle): Indicates the border style for the control.

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Filter

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the filter ([filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter)) to apply to the picture.

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Image

[Image](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.image): Returns or sets the image that is displayed by [PictureBox](https://docs.wisej.com/api/v2.2/wisej.web/content/wisej.web.picturebox).

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ImageSource

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the theme name or URL for the image to display in the [PictureBox](https://docs.wisej.com/api/v2.2/wisej.web/content/wisej.web.picturebox).

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SizeMode

[PictureBoxSizeMode](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.pictureboxsizemode): Indicates how the image is displayed.

## Methods

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Load(url)

Sets the [ImageSource](#imagesource) to the specified URL and displays the image indicated.

| Parameter | Type                                                                | Description                                                                                                                    |
| --------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **url**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | The path for the image to display in the [PictureBox](https://docs.wisej.com/api/v2.2/wisej.web/content/wisej.web.picturebox). |

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)LoadAsync(url)

Loads the image at the specified location, asynchronously.

| Parameter | Type                                                                | Description                                                                                                                    |
| --------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **url**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | The path for the image to display in the [PictureBox](https://docs.wisej.com/api/v2.2/wisej.web/content/wisej.web.picturebox). |

## Events

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)LoadCompleted

[EventHandler](https://docs.microsoft.com/en-us/dotnet/api/system.eventhandler) Fired when the asynchronous image-load operation is completed.

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SizeModeChanged

[EventHandler](https://docs.microsoft.com/en-us/dotnet/api/system.eventhandler) Fired when [SizeMode](#sizemode) changes.

## Implements

| Name                                                                                                      | Description                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [IBindableComponent](https://docs.wisej.com/api/v2.2/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                                 |
| [IWisejComponent](https://docs.wisej.com/api/v2.2/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                                |
| [IWisejControl](https://docs.wisej.com/api/v2.2/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/v2.2/wisej.web/general/control) class must implement this interface. |
| [IWisejSerializable](https://docs.wisej.com/api/v2.2/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                                                         |


---

# 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/api/v2.2/wisej.web/content/wisej.web.picturebox.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.
