Free Support Forum - aspose.com

Shape animations

I have been trying to create animations on a shape but am having trouble finding the correct settings to use.
In the attached ppt, on slide 3, the shape with the 5 bullet points displays the points 1 by 1 as i click (when being viewed as a presentation). How do i do that with aspose.slides?

thanks

buzanonline

Dear buzanonline,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for considering Aspose.Slides.

You need to use two properties of AnimationSettings class namely

AnimationSettings.TextLevelEffect

AnimationSettings. TextUnitEffect

The first specifies, which level of paragraph, the shape is to be animated, while the second one specifies, if the shape is to be animated paragraph by paragraph or word by word etc.

Below is the C# code which illustrates the point, please see its output attached by me.

C#

Presentation pres = new Presentation();

Slide sld = pres.GetSlideByPosition(1);

Shape shp = sld.Shapes.AddRectangle(500, 500, 3000, 2000);

TextFrame tf = shp.AddTextFrame("First\rSecond\rThird");

shp.LineFormat.ShowLines = false;

shp.AnimationSettings.EntryEffect = ShapeEntryEffect.BoxOut;

shp.AnimationSettings.TextLevelEffect = TextLevelEffect.AnimateByFirstLevel;

shp.AnimationSettings.TextUnitEffect = TextUnitEffect.AnimateByParagraph;

pres.Write("c:\\outAnimation.ppt");