SequenceAddEffect 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: 21.6.0.0 (21.6)
Syntax
public IEffect AddEffect(
	IParagraph paragraph,
	EffectType effectType,
	EffectSubtype subtype,
	EffectTriggerType triggerType
)

Parameters

paragraph
Type: Aspose.SlidesIParagraph
Paragraph object IParagraph
effectType
Type: Aspose.Slides.AnimationEffectType
Type of an animation effect EffectType
subtype
Type: Aspose.Slides.AnimationEffectSubtype
Subtypes of animation effect EffectSubtype
triggerType
Type: Aspose.Slides.AnimationEffectTriggerType
Trigger type of effect EffectTriggerType

Return Value

Type: IEffect
New effect object IEffect

Implements

ISequenceAddEffect(IParagraph, EffectType, EffectSubtype, EffectTriggerType)
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