Picture Box¶
Overview¶
The Picture Box control enables the embedding of static images into a report.
To incorporate this control into a report, simply drag the Picture Box item from the Toolbox and drop it onto the desired location within the report's area.
The Picture Box can showcase images in various formats, including BMP, JPG, JPEG, GIF, TIF, TIFF, PNG, ICO, DIB, RLE, JPE, JFIF, EMF, WMF, and SVG.
To specify the image displayed by the Picture Box, utilize either the Image Source or Image URL property. These properties can be accessed in the Picture Box Tasks category.
When utilizing the Image Source property, the specified image is saved along with the report. However, if you opt for the Image URL property, only the path to the image is stored within the report.
SVG Support Limitations¶
The Picture Box does not support the following SVG content:
- Gradient colors
- Text (you can convert text to curves as a workaround)
- Animations
- External .css styles
Export (except for PDF) has the following limitations:
- SVG images are converted to metafiles because document viewers may not support SVG format.
- SVG images are exported as PNG in the Microsoft Azure environment.
The Medium Trust permission level does not support SVG.
Image Size Modes¶
Use the Sizing property to specify an image's position in the Picture Box.
This control offers support for the following image size modes:
- Normal: The image is exhibited at the top left corner with its original dimensions. If the image surpasses the control's boundaries, it's clipped.
- Stretch Image: The image is stretched or shrunk to completely fill the width and height of the control.
- Zoom Image: The image is resized proportionally to fit within the control's dimensions without clipping.
- Squeeze: if the control's dimensions exceed the image size, the image is centered and displayed at its full size. If the control's boundaries are smaller than the image, the image is resized to fit within the control.
- Title: The original image is replicated within the control, starting from the top left corner. If the replicated image exceeds the control's boundaries, it's clipped.
- Auto Size: The control's dimensions are automatically adjusted to match the size of the image.
In the "Normal", "Zoom Image", and "Squeeze" modes, you can utilize the Image Alignment property to specify the alignment of the image in relation to the control's boundaries.
Interactivity¶
You can add a possibility to load/change an image and/or draw a signature in a Picture Box when it is displayed in Print Preview. To do this, expand the Behavior category, select the Edit Options section and set the Enabled property to Yes.
Click on the Picture Box within a previewed document to trigger an editor.
Tip: To make the editor visible in Print Preview when an image is not specified, you can draw borders for the Picture Box.