System.Windows.Forms.PictureBoxSizeMode Enumeration

Specifies how an image is positioned within a System.Windows.Forms.PictureBox.

Syntax

public enum PictureBoxSizeMode

Remarks

Use the members of this enumeration to set the value of the PictureBox.SizeMode property of the System.Windows.Forms.PictureBox.

Members

Member NameDescription
AutoSize

The System.Windows.Forms.PictureBox is sized equal to the size of the image that it contains.

CenterImage

The image is displayed in the center if the System.Windows.Forms.PictureBox is larger than the image. If the image is larger than the System.Windows.Forms.PictureBox, the picture is placed in the center of the System.Windows.Forms.PictureBox and the outside edges are clipped.

Normal

The image is placed in the upper-left corner of the System.Windows.Forms.PictureBox. The image is clipped if it is larger than the System.Windows.Forms.PictureBox it is contained in.

StretchImage

The image within the System.Windows.Forms.PictureBox is stretched or shrunk to fit the size of the System.Windows.Forms.PictureBox.

Zoom

The size of the image is increased or decreased maintaining the size ratio.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0