Class PictureBoxControl
Represents a Windows picture box control for displaying an image.
Wraps the
Implements
Inherited Members
Namespace: FastReport.Dialog
Assembly: FastReport.dll
Syntax
public class PictureBoxControl : DialogControl, IFRSerializable
Constructors
PictureBoxControl()
Initializes a new instance of the PictureBoxControl class with default settings.
Declaration
public PictureBoxControl()
Properties
BorderStyle
Indicates the border style for the control.
Wraps the
Declaration
public BorderStyle BorderStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| BorderStyle |
Image
Gets or sets the image that the PictureBox displays.
Wraps the
Declaration
public Image Image { get; set; }
Property Value
| Type | Description |
|---|---|
| Image |
PictureBox
Gets an internal PictureBox.
Declaration
public PictureBox PictureBox { get; }
Property Value
| Type | Description |
|---|---|
| PictureBox |
SizeMode
Indicates how the image is displayed.
Wraps the
Declaration
public PictureBoxSizeMode SizeMode { get; set; }
Property Value
| Type | Description |
|---|---|
| PictureBoxSizeMode |
Methods
Draw(FRPaintEventArgs)
Draws the object.
Declaration
public override void Draw(FRPaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| FRPaintEventArgs | e | Paint event args. |
Overrides
Remarks
This method is widely used in the FastReport. It is called each time when the object needs to draw or print itself.
In order to draw the object correctly, you should multiply the object's bounds by the scale parameter.
cache parameter is used to optimize the drawing speed. It holds all items such as pens, fonts, brushes, string formats that was used before. If the item with requested parameters exists in the cache, it will be returned (instead of create new item and then dispose it).
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll(Base) methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).