Skip to main content
A newer version of this page is available.

XRPictureBox.Image Property

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core

Declaration

[Browsable(false)]
public Image Image { get; set; }

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.

Example

This example demonstrates how to create an XRPictureBox object and set 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;
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the Image property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also