Syncfusion Feedback

Create PowerPoint Transitions with Syncfusion .NET PowerPoint Library

Slide transitions are the motion effects that occur when you move from one slide to the next during a slide show presentation. The Syncfusion® .NET PowerPoint Library allows you to add transitions in PowerPoint presentations in C#, without relying on Microsoft PowerPoint or interop dependencies.

Add transitions to PowerPoint using C#

Learn how to add transitions to PowerPoint presentations programmatically using C# with the Syncfusion .NET PowerPoint library. This guide demonstrates applying various transition effects to slides to enhance visual flow and create engaging slide shows effectively.

Step 1: Create a new project

Start by creating a new C# Console Application project.

Step 2: Install the NuGet package

Add the Syncfusion.Presentation.Net.Core package to your project from NuGet.org.

Step 3: Add required namespaces to add PowerPoint transitions

Add the following namespaces to your Program.cs file:

using Syncfusion.Presentation;

Step 4: Create a PowerPoint presentation

Create a new presentation and add a blank slide with a shape.

//Create a new instance of PowerPoint Presentation file
IPresentation pptxDoc = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Add a shape to the slide
IShape cubeShape = slide.Shapes.AddShape(AutoShapeType.Cube, 100, 100, 300, 300);

Step 5: Add a shape to the slide

Add a cube shape to the slide.

//Add a shape to the slide
IShape cubeShape = slide.Shapes.AddShape(AutoShapeType.Cube, 100, 100, 300, 300);

Step 6: Apply transition effects

Apply a checkerboard transition effect to the slide.

Run

//Set the transition effect type
slide.SlideTransition.TransitionEffect = TransitionEffect.Checkerboard;
//Set the transition effect options
slide.SlideTransition.TransitionEffectOption = TransitionEffectOption.Across;

Step 7: Save the PowerPoint presentation

Save the presentation with transitions to a file stream.

//Save the PowerPoint Presentation as stream
FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
pptxDoc.Save(outputStream);
//Close streams and presentation
outputStream.Close();
pptxDoc.Close();

Get started quickly by downloading the installer and checking license information on the Downloads page.

Syncfusion .NET PowerPoint Library Resources

Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.