All pages
Powered by GitBook
1 of 1

Loading...

PictureBox

Represents an image control.

The PictureBox control displays graphics from bitmap, metafile, icon, JPEG, GIF, or PNG files.

Set the Image property to display an image at design time or runtime. Alternatively, specify the image using the ImageSource property and load it synchronously with the Load method or asynchronously with LoadAsync.

For a full list of properties, methods and events see the

Features

Size Modes

The SizeMode property manages image placement and control sizing with several preset configurations:

  • AutoSize: The PictureBox is sized equal to the size of the image that it contains.

  • CenterImage: The image is centered in the PictureBox. If the image is larger, it is centered and the outside edges are clipped.

  • Cover: The image is resized to cover the entire container, maintaining aspect ratio while potentially cropping edges.

  • Normal: The image is placed in the upper-left corner. The image is clipped if larger than the PictureBox.

  • Stretch: The image is stretched or shrunk to fit the size of the PictureBox.

  • Zoom: The image is scaled maintaining its aspect ratio.

Advanced

JavaScript Widget

Item
Description

Class name

"wisej.web.PictureBox"

Theme appearance

"picturebox", see Themes.

Child components

"image" is the image element. See JavaScript.

Source code

https://github.com/iceteagroup/wisej-js

API documentation.
PictureBox demonstrating AutoSize mode with image at original dimensions
PictureBox showing CenterImage mode with centered image placement
PictureBox displaying Cover mode with image filling the entire container
PictureBox showing Normal mode with image aligned to top-left
PictureBox demonstrating Stretch mode with image scaled to fit
PictureBox showing Zoom mode with proportionally scaled image