ISequenceAddEffect Method (IParagraph, EffectType, EffectSubtype, EffectTriggerType)

Add new animation effect for paragraph to the end of sequence.

Namespace:  Aspose.Slides.Animation
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 20.3.0.0 (20.3)
Syntax
IEffect AddEffect(
	IParagraph paragraph,
	EffectType effectType,
	EffectSubtype subtype,
	EffectTriggerType triggerType
)

Parameters

paragraph
Type: Aspose.SlidesIParagraph
effectType
Type: Aspose.Slides.AnimationEffectType
subtype
Type: Aspose.Slides.AnimationEffectSubtype
triggerType
Type: Aspose.Slides.AnimationEffectTriggerType

Return Value

Type: IEffect
Examples
[C#]
using(Presentation presentation = new Presentation(path + "input.pptx"))
{        
   // select paragraph to add effect
   IAutoShape autoShape = (IAutoShape)presentation.Slides[0].Shapes[0];
   IParagraph paragraph = autoShape.TextFrame.Paragraphs[0];

   // add Fly animation effect to selected paragraph
   IEffect effect = presentation.Slides[0].Timeline.MainSequence.AddEffect(
   paragraph, EffectType.Fly, EffectSubtype.Left, EffectTriggerType.OnClick);
}
See Also