Aspose.Slides.Examples.CSharp.Shapes.ChangeShapeOrder.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Shapes();

            Presentation presentation1 = new Presentation(dataDir + "HelloWorld.pptx");
            ISlide slide = presentation1.Slides[0];
            IAutoShape shp3 = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 365, 400, 150);
            shp3.FillFormat.FillType = FillType.NoFill;
            shp3.AddTextFrame(" ");

            ITextFrame txtFrame = shp3.TextFrame;
            IParagraph para = txtFrame.Paragraphs[0];
            IPortion portion = para.Portions[0];
            portion.Text="Watermark Text Watermark Text Watermark Text";
            shp3 = slide.Shapes.AddAutoShape(ShapeType.Triangle, 200, 365, 400, 150);
            slide.Shapes.Reorder(2, shp3);
            presentation1.Save(dataDir + "Reshape_out.pptx", SaveFormat.Pptx);

        }
    }
ChangeShapeOrder