VerticalAlignment Enumeration

Specifies vertical alignment of a floating shape, text frame or a floating table.

Namespace:  Aspose.Words.Drawing
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.2
Syntax
public enum VerticalAlignment
Members
  Member nameValueDescription
None0 The object is explicitly positioned, usually using its Top property.
Top1 Specifies that the object shall be at the top of the vertical alignment base.
Center2 Specifies that the object shall be centered with respect to the vertical alignment base.
Bottom3 Specifies that the object shall be at the bottom of the vertical alignment base.
Inside4 Specifies that the object shall be inside of the horizontal alignment base.
Outside5 Specifies that the object shall be outside of the vertical alignment base.
Inline-1 Not documented. Seems to be a possible value for floating paragraphs and tables.
Default0 Same as None.
Remarks
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 + "Aspose.Words.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