Back to Devexpress

PictureShape Class

officefileapi-devexpress-dot-docs-dot-presentation-81eca6a2.md

latest2.6 KB
Original Source

PictureShape Class

A shape that displays a picture.

Namespace : DevExpress.Docs.Presentation

Assembly : DevExpress.Docs.Presentation.v25.2.dll

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public sealed class PictureShape :
    FilledShape
vb
Public NotInheritable Class PictureShape
    Inherits FilledShape

The following members return PictureShape objects:

Remarks

The following code snippet adds a PictureShape to a slide and sets its properties:

csharp
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);
vb
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.

Implements

ICloneable

Inheritance

Object PresentationObject ShapeBase StyledShapeBase SimpleShape FilledShape PictureShape

See Also

PictureShape Members

DevExpress.Docs.Presentation Namespace