PictureBox
Namespace: Wisej.Web
Assembly: Wisej.Framework (3.5.0.0)
Represents an image control.
- C#
- VB.NET
public class PictureBox : Control, ISupportInitialize, IButtonControl, IImage, ICommandSource
Public Class PictureBox
Inherits Control
Implements ISupportInitialize, IButtonControl, IImage, ICommandSource
Constructors
PictureBox()
Initializes a new instance of the PictureBox class.
PictureBox(image, sizeMode)
Initializes a new instance of the PictureBox class with specified settings.
| Name | Type | Description |
|---|---|---|
| image | Image | The Image object to display in the picture box. |
| sizeMode | PictureBoxSizeMode | The size mode for the picture box, optional and defaults to PictureBoxSizeMode.Normal. |
PictureBox(imageSource, sizeMode)
Initializes a new instance of the PictureBox class with specified settings.
| Name | Type | Description |
|---|---|---|
| imageSource | String | The source path of the image to display in the picture box. |
| sizeMode | PictureBoxSizeMode | The size mode for the picture box, optional and defaults to PictureBoxSizeMode.Normal. |
PictureBox(location, size)
Initializes a new instance of the PictureBox class with specified settings.
| Name | Type | Description |
|---|---|---|
| location | Point | The location of the TextBox on its parent control. |
| size | Size | The size of the TextBox. |
PictureBox(image, location, size, sizeMode)
Initializes a new instance of the PictureBox class with specified settings.
| Name | Type | Description |
|---|---|---|
| image | Image | The Image object to display in the picture box. |
| location | Point | The location of the TextBox on its parent control. |
| size | Size | The size of the TextBox. |
| sizeMode | PictureBoxSizeMode | The size mode for the picture box, optional and defaults to Normal. |
PictureBox(imageSource, location, size, sizeMode)
Initializes a new instance of the PictureBox class with specified settings.
| Name | Type | Description |
|---|---|---|
| imageSource | String | The source path of the image to display in the picture box. |
| location | Point | The location of the TextBox on its parent control. |
| size | Size | The size of the TextBox. |
| sizeMode | PictureBoxSizeMode | The size mode for the picture box, optional and defaults to Normal. |
Properties
BorderStyle
BorderStyle: Indicates the border style for the control. (Default: None)
Command
ICommand: Returns or sets the ICommand implementation to invoke. (Default: null)
DialogResult
DialogResult: Returns or sets a value that is returned to the parent form when the button is clicked. (Default: None)
Filter
String: Returns or sets the filter (filter) to apply to the picture. (Default: null)
Image
Image: Returns or sets the image that is displayed by PictureBox.
ImageSource
String: Returns or sets the theme name or URL for the image to display in the PictureBox.
SizeMode
PictureBoxSizeMode: Indicates how the image is displayed. (Default: Normal)
Methods
Load(url)
Sets the ImageSource to the specified URL and displays the image indicated.
| Parameter | Type | Description |
|---|---|---|
| url | String | The path for the image to display in the PictureBox. |
LoadAsync(url)
Loads the image at the specified location, asynchronously.
| Parameter | Type | Description |
|---|---|---|
| url | String | The path for the image to display in the PictureBox. |
PerformClick()
Generates a Click event for the LinkLabel control.
Events
CommandChanged
EventHandler Fired when the Command property value changes.
LoadCompleted
EventHandler Fired when the asynchronous image-load operation is completed.
SizeModeChanged
EventHandler Fired when SizeMode changes.
Implements
| Name | Description |
|---|---|
| IBindableComponent | Bindable components implement this interface. |
| IButtonControl | Allows a control to act like a button on a Form. |
| ICommandSource | Defines an object that can invoke a Command. |
| IDropTarget | Controls that support drag & drop operations implement this interface. |
| IImage | Provides access to common image properties across the controls that implement this interface. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejControl | All wisej controls derived from the Control class must implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |