ShapeBaseRelativeHorizontalPosition Property

Specifies relative to what the shape is positioned horizontally.

Namespace:  Aspose.Words.Drawing
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.4
Syntax
public RelativeHorizontalPosition RelativeHorizontalPosition { get; set; }

Property Value

Type: RelativeHorizontalPosition
Remarks

The default value is Column.

Has effect only for top level floating shapes.

Examples
Shows how to insert a floating image in the middle of a page.
// This creates a builder and also an empty document inside the builder
DocumentBuilder builder = new DocumentBuilder();

// By default, the image is inline
Shape shape = builder.InsertImage(ImageDir + "Logo.jpg");

// Make the image float, put it behind text and center on the page
shape.WrapType = WrapType.None;
shape.BehindText = true;
shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Page;
shape.HorizontalAlignment = HorizontalAlignment.Center;
shape.RelativeVerticalPosition = RelativeVerticalPosition.Page;
shape.VerticalAlignment = VerticalAlignment.Center;

builder.Document.Save(ArtifactsDir + "Image.CreateFloatingPageCenter.doc");
See Also