The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

Shape.RelativeVerticalPosition Property

Gets or sets an item to what the vertical position of a shape is relative.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.2.Core.dll

Declaration

ShapeRelativeVerticalPosition RelativeVerticalPosition { get; set; }
Property RelativeVerticalPosition As ShapeRelativeVerticalPosition
ShapeRelativeVerticalPosition RelativeVerticalPosition { get; set; }
Property RelativeVerticalPosition As ShapeRelativeVerticalPosition
ShapeRelativeVerticalPosition RelativeVerticalPosition { get; set; }
Property RelativeVerticalPosition As ShapeRelativeVerticalPosition

Property Value

Type Description
ShapeRelativeVerticalPosition

A ShapeRelativeVerticalPosition enumeration member.

Property Value

Type Description
ShapeRelativeVerticalPosition

A ShapeRelativeVerticalPosition enumeration member.

Property Value

Type Description
ShapeRelativeVerticalPosition

A ShapeRelativeVerticalPosition enumeration member.

Remarks

Use the Shape.VerticalAlignment property to specify alignment of a shape relative to the item specified by the RelativeVerticalPosition value. If the horizontal alignment is set to ShapeVerticalAlignment.None, use the Shape.Offset property to specify the absolute position of a shape relative to the item specified by the RelativeVerticalPosition value.

This example moves a floating object to a position where its upper left corner is located at 4.5 cm to the right of the left margin and 2 cm below the top margin.

Document document = server.Document;
document.LoadDocument("Documents\\Grimm.docx", DocumentFormat.OpenXml);
document.Unit = DevExpress.Office.DocumentUnit.Centimeter;
Shape myPicture = document.Shapes[1];
// Clear the qualitative positioning to allow positioning by specifying the numerical offset. 
myPicture.HorizontalAlignment = ShapeHorizontalAlignment.None;
myPicture.VerticalAlignment = ShapeVerticalAlignment.None;
// Specify the reference item for positioning.
myPicture.RelativeHorizontalPosition = ShapeRelativeHorizontalPosition.LeftMargin;
myPicture.RelativeVerticalPosition = ShapeRelativeVerticalPosition.TopMargin;
// Specify the offset value.
myPicture.Offset = new System.Drawing.PointF(4.5f, 2.0f);
See Also