Table of Contents

Class PictureBox

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Represents a picture box control for displaying an image.

[DefaultBindingProperty("Image")]
[ControlCategory("Common")]
public class PictureBox : GraphicControl, IBaseObject, IDisposableObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo, IValidatorReporter
Inheritance
PictureBox
Implements

Remarks

Example of how a PictureBox can look:

PictureBox

Constructors

PictureBox()

Initializes a new instance of the PictureBox class.

Properties

Background

Gets or sets the background brush for the control.

Canvas

Gets Graphics for the Image on which you can paint.

CenterHorz

Gets or sets whether to center image horizontally in the control rectangle. Default is true. This property is used when image is not stretched.

CenterVert

Gets or sets whether to center image vertically in the control rectangle. Default is true. This property is used when image is not stretched.

ControlKind

Returns control identifier.

DisabledImage

Gets or sets the disabled image that is displayed by PictureBox.

DisabledImageSet

Gets or sets the ImageSet that is displayed by PictureBox.

Image

Gets or sets the image that is displayed by PictureBox.

ImageSet

Gets or sets the ImageSet that is displayed by PictureBox.

ImageStretch

Gets or sets a value indicating whether to draw image stretched to the size of the control.

ImageVisible

Gets or sets a value indicating whether to draw image.

Padding

Gets or sets the padding inside a control.

Text

Gets or sets the text associated with this control.

TextVisible

Gets or sets whether to display text in the control.

Methods

DefaultPaint(Graphics, RectD)

Default painting method of the UserControl and its descendants.

Draw(Action<SKCanvas, int, int>, Color?)

Helper method which allows to draw on SKCanvas.

DrawDefaultImage(Graphics, RectD)

Paints image in the default style.

GetImageAndTextSize()

Gets size of the image and text.

GetPreferredSize(SizeD)

Retrieves the size of a rectangular area into which a control can be fitted, in device-independent units.

GetTextPreferredSize()

Gets size of the text.

OnImageChanged(EventArgs)

Called when the value of the Image property changes.

OnSizeChanged(EventArgs)

Called when the SizeChanged event.

RaiseImageChanged(EventArgs)

Raises the ImageChanged event and calls OnImageChanged(EventArgs).

Events

ImageChanged

Occurs when the Image property changes.