Shape Interface
An object that can be placed above and below the text layer of the document, as well as within the document, with text surrounding it.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v18.2.Core.dll
Declaration
Related API Members
The following members return Shape objects:
Remarks
There are two kinds of shapes - a floating picture and a text box.
Shapes can be inserted in the document by end-users via commands, such as the InsertFloatingObjectPictureCommand and the InsertTextBoxCommand. RichEdit API provides the ShapeCollection.InsertPicture and the ShapeCollection.InsertTextBox methods for that purpose.
Shapes contained in a document can be obtained by the ReadOnlyShapeCollection.Get method using RichEditControl.Document.Shapes.Get(DocumentRange range) notation. The method returns a ShapeCollection - a collection of shapes. For a named shape, i.e. a shape that has a Shape.Name value, you can use the ShapeCollection.Item method to retrieve it from a collection.
A shape is always attached to an anchoring range specified by the Shape.Range property. You can position the shape anywhere on the page that contains the anchor.
Note
There is no easy way to transform a Shape to inline object or text. You should use Shape.Picture or Shape.TextBox properties to access the image or text content of a shape and then insert it into the document via SubDocument.InsertDocumentContent or DocumentImageCollection.Insert methods.