Animations grab and keep the attention of your audience by emphasizing key points, controlling the focus of discussion, and entertaining in ways that will make your message memorable. Slide transitions are the motion effects that occur when you move from one slide to the next during a slide show presentation. The Syncfusion PowerPoint Library allows you to add animation effects and transitions in PowerPoint presentations in C#.
The Syncfusion PowerPoint Library supports the following options when applying animation effects:
Entrance
Emphasis
Exit
Motion paths
Effects can make an object appear, disappear, or move. They can change an object’s size, position, or color.
A grand total of 149 animation effects are available. For a slide element, you can apply an animation effect for each animation type (entrance, emphasis, exit, and motion paths).
The speed of the animation effect is determined by the duration property. It is used to determine how long an animation effect should remain in a slideshow.
The library allows you to trigger custom animations in one of the following actions:
On clicking
With another animation
After previous animation
The library allows text to be animated in the following ways:
Animation effects can be easily added to shapes, images, tables, charts, and SmartArt diagrams using a few simple lines of C# code, as demonstrated in the following example. Also explore this .NET PowerPoint Library example, which shows how to create and modify PowerPoints on different platforms.
//Create an instance for PowerPoint.
using (IPresentation pptxDoc = Presentation.Create())
{
//Add a blank slide to presentation.
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Add normal shape to slide.
IShape cubeShape = slide.Shapes.AddShape(AutoShapeType.Cube, 50, 200, 300, 300);
//Access the animation sequence to create effects.
ISequence sequence = slide.Timeline.MainSequence;
//Add bounce effect to the shape.
IEffect bounceEffect = sequence.AddEffect(cubeShape, EffectType.Bounce, EffectSubtype.None, EffectTriggerType.OnClick);
//Save the presentation.
pptxDoc.Save("Sample.pptx");
}
Slide transitions are the motion effects that occur when you move from one slide to the next during a slide show presentation. A transition can be as simple as the push type, which pushes to the next slide with an eye-catching effect. You can control the speed, add sound, and customize the properties of transition effects using the .NET PowerPoint Library.
Here is an example of how to add a transition to a PowerPoint slide in C# using the Syncfusion .NET PowerPoint Library.
//Create a PowerPoint presentation.
using IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add a shape to the slide.
IShape cubeShape = slide.Shapes.AddShape(AutoShapeType.Cube, 50, 100, 200, 200);
//Set the transition effect type.
slide.SlideTransition.TransitionEffect = TransitionEffect.Checkerboard;
//Set the transition effect options.
slide.SlideTransition.TransitionEffectOption = TransitionEffectOption.Across;
//Save the PowerPoint presentation as stream.
using FileStream outputStream = new FileStream("Sample.pptx", FileMode.Create, FileAccess.ReadWrite);
presentation.Save(outputStream);
Set the transition duration value to up to 59 seconds. This specifies the length of the slide transition.
Set a transition delay to delay the next transition for a certain number of seconds.
Decide whether slides progress through manual mouse clicks or automated time triggers. This flexibility ensures dynamic presentations that align with your speaking pace or predefined schedules.
By default, each transition will happen for two seconds. Users can change the speed of transitions to fast, slow, or medium.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.