ImageBrick Class
A visual brick containing an image.
Namespace: DevExpress.XtraPrinting
Assembly: DevExpress.Printing.v24.1.Core.dll
NuGet Package: DevExpress.Printing.Core
#Declaration
[BrickExporter(typeof(ImageBrickExporter))]
public class ImageBrick :
VisualBrick,
IImageBrick,
IVisualBrick,
IBaseBrick,
IBrick,
IXtraSupportAfterDeserialize,
IXtraPartlyDeserializable
#Related API Members
The following members return ImageBrick objects:
#Remarks
ImageBrick is used to draw an image in a document and provides options that define the image settings.
An image can be a bitmap, cursor or metafile and is assigned via the ImageBrick.ImageSource property.
#Example
This example demonstrates how to create an ImageBrick
using the BrickGraphics.DrawImage method.
using DevExpress.XtraPrinting;
// ...
VisualBrick visBrick;
Image img = imageList1.Images[0];
BrickGraphics brickGraph = printingSystem1.Graph;
// Start the report generation.
printingSystem1.Begin();
// Create a rectangle.
RectangleF rect = new RectangleF(new PointF(0, 0), new SizeF(96, 96));
// Specify a page area.
brickGraph.Modifier = BrickModifier.Detail;
// Add an image brick to the report.
visBrick = brickGraph.DrawImage(img, rect, BorderSide.All, Color.White);
// Finish the report generation.
printingSystem1.End();
// Preview the report.
printingSystem1.PreviewFormEx.Show();
#Inheritance
Object
DevExpress.Printing.Utils.DocumentStoring.StorableObjectBase
BrickBase
Brick
VisualBrick
ImageBrick
See Also