Contents[ Hide ]
Specifies vertical alignment of a floating shape, text frame or a floating table.
public enum VerticalAlignment
|None||The object is explicitly positioned, usually using its Top property.|
|Top||Specifies that the object shall be at the top of the vertical alignment base.|
|Center||Specifies that the object shall be centered with respect to the vertical alignment base.|
|Bottom||Specifies that the object shall be at the bottom of the vertical alignment base.|
|Inside||Specifies that the object shall be inside of the horizontal alignment base.|
|Outside||Specifies that the object shall be outside of the vertical alignment base.|
|Inline||Not documented. Seems to be a possible value for floating paragraphs and tables.|
|Default||Same as None.|
Shows how to insert a floating image to the center of a page.
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Insert a floating image that will appear behind the overlapping text and align it to the page's center. Shape shape = builder.InsertImage(ImageDir + "Logo.jpg"); shape.WrapType = WrapType.None; shape.BehindText = true; shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Page; shape.RelativeVerticalPosition = RelativeVerticalPosition.Page; shape.HorizontalAlignment = HorizontalAlignment.Center; shape.VerticalAlignment = VerticalAlignment.Center; doc.Save(ArtifactsDir + "Image.CreateFloatingPageCenter.docx");