The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRPictureBox.Image Property

Bindable. Gets or sets the image to be displayed in the XRPictureBox control.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

[TypeConverter(typeof(ImageTypeConverter))]
[Browsable(false)]
[XtraSerializableProperty]
public Image Image { get; set; }
<TypeConverter(GetType(ImageTypeConverter))>
<Browsable(False)>
<XtraSerializableProperty>
Public Property Image As Image

Property Value

Type Description
Image

The image to be displaed in the picture box.

Remarks

This property is obsolete. Use the ImageSource property instead. It extends the list of supported image formats with SVG.

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;
using DevExpress.XtraPrinting.Drawing;
// ...

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

    // Set its image.
    xrPictureBox.ImageSource = new ImageSource(new Bitmap("C:\\test.bmp"));
    // Uncomment these lines to get images from a data source.
    // ExpressionBinding expressionBinding = new ExpressionBinding("BeforePrint", "ImageSource", "[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;
}
See Also