public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Slides_Presentations_Transitions();
// ExStart:ManagingBetterSlideTransitions
// Instantiate Presentation class to load the source presentation file
using (Presentation presentation = new Presentation(dataDir + "AccessSlides.pptx"))
{
// Apply circle type transition on slide 1
presentation.Slides[0].SlideShowTransition.Type = TransitionType.Circle;
// Set the transition time of 3 seconds
presentation.Slides[0].SlideShowTransition.AdvanceOnClick = true;
presentation.Slides[0].SlideShowTransition.AdvanceAfterTime = 3000;
// Apply comb type transition on slide 2
presentation.Slides[1].SlideShowTransition.Type = TransitionType.Comb;
// Set the transition time of 5 seconds
presentation.Slides[1].SlideShowTransition.AdvanceOnClick = true;
presentation.Slides[1].SlideShowTransition.AdvanceAfterTime = 5000;
// Write the presentation to disk
presentation.Save("SampleTransition_out.pptx", SaveFormat.Pptx);
// ExEnd:ManagingBetterSlideTransitions
// Write the presentation to disk
presentation.Save(dataDir + "BetterTransitions_out.pptx", SaveFormat.Pptx);
}
}
}