Gets or sets the position of the top edge of the containing block of the shape.
[Visual Basic]Public Property Top As
Double [C#]public
double Top {get; set;}
Remarks
For a top-level shape, the value is in points and relative to the shape anchor.
For shapes in a group, the value is in the coordinate space and units of the parent group.
The default value is 0.
Has effect only for floating shapes.
Example
Shows how to insert a floating image and specify its position and size.
[C#]
// 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(MyDir + "Hammer.wmf");
// Make the image float, put it behind text and center on the page.
shape.WrapType = WrapType.None;
// Make position relative to the page.
shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Page;
shape.RelativeVerticalPosition = RelativeVerticalPosition.Page;
// Make the shape occupy a band 50 points high at the very top of the page.
shape.Left = 0;
shape.Top = 0;
shape.Width = builder.CurrentSection.PageSetup.PageWidth;
shape.Height = 50;
builder.Document.Save(MyDir + "Image.CreateFloatingPositionSize Out.doc");
[Visual Basic]
' This creates a builder and also an empty document inside the builder.
Dim builder As DocumentBuilder = New DocumentBuilder()
' By default, the image is inline.
Dim shape As Shape = builder.InsertImage(MyDir & "Hammer.wmf")
' Make the image float, put it behind text and center on the page.
shape.WrapType = WrapType.None
' Make position relative to the page.
shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Page
shape.RelativeVerticalPosition = RelativeVerticalPosition.Page
' Make the shape occupy a band 50 points high at the very top of the page.
shape.Left = 0
shape.Top = 0
shape.Width = builder.CurrentSection.PageSetup.PageWidth
shape.Height = 50
builder.Document.Save(MyDir & "Image.CreateFloatingPositionSize Out.doc")
See Also
ShapeBase Class | Aspose.Words.Drawing Namespace