XRPictureBox Class

A Picture Box control that is used to display an image in a report.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.1.dll

Syntax

[DefaultBindableProperty("Image")]
[XRToolboxSubcategory(0, 3)]
public class XRPictureBox :
    XRControl,
    IXRSerializable,
    IEnumerable,
    IBrickOwner,
    IScriptable,
    IXtraSupportDeserializeCollectionItem,
    IXtraSerializable

The XRPictureBox control is typically used to display graphics from a bitmap, JPEG, GIF or PNG file. This picture is specified either by the XRPictureBox.Image or the XRPictureBox.ImageUrl property. The clipping and positioning of an image in the display area of the XRPictureBox is controlled by the XRPictureBox.Sizing property set to a ImageSizeMode enumeration value.

For more detailed information about the XRPictureBox control, see Picture Box.

Examples

This example demonstrates how to create an XRPictureBox object, and set some of its properties.

using System.Drawing;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
// ...

public XRPictureBox CreateXRPictureBox()
{
    // Create an XRPictureBox object.
    XRPictureBox xrPictureBox = new XRPictureBox();

    // Set its image.
    xrPictureBox.Image = new Bitmap("C:\\test.bmp");
    // Uncomment these lines to get images from a data source.
    // ExpressionBinding expressionBinding = new ExpressionBinding("BeforePrint", "Image", "[Picture]");
    // xrPictureBox.ExpressionBindings.Add(expressionBinding);

    // Set its location.
    xrPictureBox.LocationF = new PointF(150F, 25F);

    // Set its size.
    xrPictureBox.SizeF = new SizeF(160F, 120F);

    // Set its size mode.
    xrPictureBox.Sizing = ImageSizeMode.AutoSize;

    return xrPictureBox;
}

Inheritance

Object
XRControl
XRPictureBox

Implements

DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable

Inherited Members

See Also