ApiExamples.ExImage.CreateFloatingPositionSize C# (CSharp) Метод

CreateFloatingPositionSize() приватный Метод

private CreateFloatingPositionSize ( ) : void
Результат void
        public void CreateFloatingPositionSize()
        {
            //ExStart
            //ExFor:ShapeBase.Left
            //ExFor:ShapeBase.Top
            //ExFor:ShapeBase.Width
            //ExFor:ShapeBase.Height
            //ExFor:DocumentBuilder.CurrentSection
            //ExFor:PageSetup.PageWidth
            //ExSummary:Shows how to insert a floating image and specify its position and size.
            // 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 + @"\Artifacts\Image.CreateFloatingPositionSize.doc");
            //ExEnd
        }