A Picture Box control that is used to display an image in a report.
Namespace:DevExpress.XtraReports.UI
Assembly:DevExpress.XtraReports.v17.2.dll

Syntax
C# |
public class XRPictureBox : XRControl
|
VB |
Public Class XRPictureBox Inherits XRControl
|

Remarks
The XRPictureBox 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. The clipping and positioning of an image in the display area of the XRPictureBox is controlled by the Sizing property set to a DevExpress.XtraPrinting.ImageSizeMode enumeration value.
For more detailed information about the XRPictureBox control, see Picture Box.

Example
This example demonstrates how to create an XRPictureBox object, and set some of its properties.
C# |
using System.Drawing;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
public XRPictureBox CreateXRPictureBox()
{
XRPictureBox xrPictureBox = new XRPictureBox();
xrPictureBox.Image = new Bitmap("C:\\test.bmp");
xrPictureBox.LocationF = new PointF(150F, 25F);
xrPictureBox.SizeF = new SizeF(160F, 120F);
xrPictureBox.Sizing = ImageSizeMode.AutoSize;
return xrPictureBox;
}
|
VB |
Imports System.Drawing
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraReports.UI
Public Function CreateXRPictureBox() As XRPictureBox
Dim xrPictureBox As New XRPictureBox()
xrPictureBox.Image = new Bitmap("C:\\test.bmp");
xrPictureBox.LocationF = New PointF(150F, 25F)
xrPictureBox.SizeF = New SizeF(160F, 120F)
xrPictureBox.Sizing = ImageSizeMode.AutoSize
Return xrPictureBox
End Function
|

Inheritance Hierarchy
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
XRControl
XRPictureBox

See Also