MX-Frame Library Send comments on this topic.
PictureBox
MX-Developer > Report - MxReport > Designing a Report > Controls > PictureBox

Glossary Item Box

Displays an image in a report.

Remarks

Control displays an image in a report. Use this control to insert images of different types into a report. 

This control is typically used to display graphics from a bitmap, JPEG, GIF or PNG file. This picture is specified either by the Image or the ImageUrl property.

It is possible to determine the precise location and size of the image.

It is also possible to define how the picture is displayed. This is done with control’s property Sizing. Several options are available.

Option Description
AutoSize The picture control's size is adjusted to that of the image it contains.
CenterImage The image is displayed in the centre of the picture control. If the image is larger than the picture control, the outside edges are clipped.
Normal The image is placed in the upper-left corner of the picture control. The image is clipped if it's larger than the picture control which contains it.
StretchImage The image within the picture control is stretched or shrunk to fit the size of the picture control.
ZoomImage The image is sized proportionally (without clipping), so that it is best fitted to the image control. If the height and width ratio of the image control is the same as the image's ratio it will be resized to exactly fit into the image control. Otherwise the closest fitting side (height or width) of the image will be sized to the control and the other side (height or width) of the image sized proportionally (leaving empty space).

Example (MxSpace)

To see the PictureBox on a report component, open MxSpace solution project in Visual Studio. In Solution Explorer expand node Reports and double click StockReport.cs. PictureBox control displays the MxSpace logo in the top left corner in ReportHeader band.

To add PictureBox to a report

  1. In Solution Explorer open the desired MxReport component (StockReport) by double clicking it.
  2. Open Toolbox window and expand DX:Reports.vX.X section.
  3. Select XRPictureBox control and drag it to the desired band (ReportHeader).
  4. Open Properties window.
  5. Select the desired image in property Image.

To learn more about the control, how to implement it and use it see Developer Express documentation.

©2009 Metronik. All Rights Reserved.