Class PictureBox
Represents a picture box control for displaying an image.
[DefaultBindingProperty("Image")]
[ControlCategory("Common")]
public class PictureBox : GraphicControl, IBaseObjectWithId, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo, IValidatorReporter
- Inheritance
-
PictureBox
- Implements
- Derived
Remarks
Example of how a PictureBox can look:
Constructors
- PictureBox()
Initializes a new instance of the PictureBox class.
- PictureBox(Control)
Initializes a new instance of the PictureBox class.
Fields
- DefaultParentBackColor
Gets or sets default value of the ParentBackColor for the PictureBox control.
- DefaultParentForeColor
Gets or sets default value of the ParentForeColor for the PictureBox control.
Properties
- Background
Gets or sets the background brush for the control. Usage of this property depends on the control. Not all controls support it.
- 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.
- IsImageCentered
Gets or sets whether image is centered horizontally and vertically.
- 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(PaintEventArgs)
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.
- DrawDefaultImage(PaintEventArgs)
Paints image in the default style.
- GetImageAndTextSize()
Gets size of the image and text.
- GetImagePreferredSize()
Gets size of the image.
- 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).
- SetIcon(MessageBoxIcon, int)
Sets image from MessageBoxSvg using the specified MessageBoxIcon.
Events
- ImageChanged
Occurs when the Image property changes.