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

XRPictureBox Class

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

[ToolboxTabName("DX.18.2: Report Controls")]
[XRDesigner("DevExpress.XtraReports.Design.XRPictureBoxDesigner,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[DefaultBindableProperty("ImageSource")]
[ToolboxBitmap(typeof(XRPictureBox))]
[XRToolboxSubcategory(0, 3)]
[ToolboxBitmap24("DevExpress.XtraReports.Images.Toolbox24x24.XRPictureBox.png,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[ToolboxBitmap32("DevExpress.XtraReports.Images.Toolbox32x32.XRPictureBox.png,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[ToolboxSvgImage("DevExpress.XtraReports.SvgImages.Controls.XRPictureBox.svg,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
public class XRPictureBox :
    XRControl,
    IEditOptionsContainer
<ToolboxTabName("DX.18.2: Report Controls")>
<XRDesigner("DevExpress.XtraReports.Design.XRPictureBoxDesigner,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
<DefaultBindableProperty("ImageSource")>
<ToolboxBitmap(GetType(XRPictureBox))>
<XRToolboxSubcategory(0, 3)>
<ToolboxBitmap24("DevExpress.XtraReports.Images.Toolbox24x24.XRPictureBox.png,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
<ToolboxBitmap32("DevExpress.XtraReports.Images.Toolbox32x32.XRPictureBox.png,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
<ToolboxSvgImage("DevExpress.XtraReports.SvgImages.Controls.XRPictureBox.svg,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
Public Class XRPictureBox
    Inherits XRControl
    Implements IEditOptionsContainer

Remarks

The XRPictureBox control is used to display graphics from a BMP, JPG, JPEG, GIF, TIF, TIFF, PNG, ICO, DIB, RLE, JPE, JFIF, EMF, WMF or SVG file. This picture is specified either by the XRPictureBox.ImageSource 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;
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;
}

Inheritance

Implements

DevExpress.XtraReports.Serialization.IXRSerializable
DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable
DevExpress.XtraReports.Native.IEditOptionsContainer
See Also