Shape.VerticalAlignment Property
Gets or sets how the shape is positioned vertically.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v18.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
ShapeVerticalAlignment | ‘A ShapeHorizontalAlignment enumeration member that specifies the shape’s vertical position. |
Available values:
Name | Description |
---|---|
None | The exact position is specified by the Shape.Offset property. |
Top | The shape is top aligned relative to its Shape.RelativeVerticalPosition. |
Center | The shape is centered relative to its Shape.RelativeVerticalPosition. |
Bottom | The shape is aligned to the bottom relative to its Shape.RelativeVerticalPosition. |
Inside | Not in use. |
Outside | Not in use. |
Remarks
The shape can be positioned horizontally relative to the area specified by the Shape.RelativeVerticalPosition. If the alignment is set to ShapeVerticalAlignment.None, the shape is positioned at a distance explicitly specified in the Shape.Offset property.
The code snippet below uses the Shape.ZOrder property to position an image behind the specified drawing object and sets the Shape.TextWrapping property to place the image behind the text.
document.LoadDocument("FirstLook.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
Shape myPicture = document.Shapes[1];
myPicture.VerticalAlignment = ShapeVerticalAlignment.Top;
myPicture.ZOrder = document.Shapes[0].ZOrder - 1;
myPicture.TextWrapping = TextWrappingType.BehindText;
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the VerticalAlignment property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.