officefileapi-devexpress-dot-docs-dot-presentation-81eca6a2.md
A shape that displays a picture.
Namespace : DevExpress.Docs.Presentation
Assembly : DevExpress.Docs.Presentation.v25.2.dll
NuGet Package : DevExpress.Docs.Presentation
public sealed class PictureShape :
FilledShape
Public NotInheritable Class PictureShape
Inherits FilledShape
The following members return PictureShape objects:
The following code snippet adds a PictureShape to a slide and sets its properties:
PictureShape picture = new PictureShape();
string imagePath = "D:\\AirbusA318.png";
Stream stream = new FileStream(imagePath, FileMode.Open, FileAccess.Read);
picture.Image = DXImage.FromStream(stream);
picture.Width = 700;
picture.Height = 500;
picture.Outline = new LineStyle { Fill = new SolidFill(Color.DarkGreen), Width = 4 };
slide.Shapes.Add(picture);
Dim picture As PictureShape = New PictureShape()
Dim imagePath = "D:\AirbusA318.png"
Dim stream As Stream = New FileStream(imagePath, FileMode.Open, FileAccess.Read)
picture.Image = DXImage.FromStream(stream)
picture.Width = 700
picture.Height = 500
picture.Outline = New LineStyle With {
.Fill = New SolidFill(Color.DarkGreen),
.Width = 4
}
slide.Shapes.Add(picture)
For more information about shapes, refer to the following help topic: DevExpress Presentation API Library: Work with Shapes.
Object PresentationObject ShapeBase StyledShapeBase SimpleShape FilledShape PictureShape
See Also