I have an IGroupShape object in my slide we are using for a fake “paging” functionality. Basically, it works like this:
- Show the group on page load
- Hide the group on a button click
- Show the group on a different button click
My issue is the third step doesn’t work because I am using the same animation type on the same shape.
Example:
//Step 1: Show the Page on Load
var page = slide.Shapes.FirstOrDefault(shape => shape.Name == “Page00”);
slide.Timeline.MainSequence.AddEffect(page, EffectType.Appear, EffectSubtype.None, EffectTriggerType.WithPrevious);
//Step 2: Build the hide button
var hideTrigger = slide.Shapes.AddAutoShape(ShapeType.Bevel, 10, 10, 20, 20);
hideTrigger.Name = “HideButton”;
ISequence hideSequence = slide.Timeline.InteractiveSequences.Add(hideTrigger);
IEffect dissapear = hideSequence.AddEffect(page, EffectType.Appear, EffectSubtype.None, EffectTriggerType.OnClick);
dissapear.PresetClassType = EffectPresetClassType.Exit;
//Step 3: Build the show button
var showTrigger = slide.Shapes.AddAutoShape(ShapeType.Bevel, 50, 10, 20, 20);
showTrigger.Name = “ShowButton”;
ISequence showSequence = slide.Timeline.InteractiveSequences.Add(showTrigger);
showSequence.AddEffect(page, EffectType.Appear, EffectSubtype.None, EffectTriggerType.OnClick);
When I run the above code, the animation for Step 3 is not in my animation pane in PowerPoint.
From my testing, it seems to be because I am using the “Appear” animation on the same exact shape twice (even though one is for the Exit and one is for the Entrance).
It’s almost like the effect is tied to the shape. So, if I told it to appear once before, I can never tell it to appear in another sequence trigger.
I know I can do this directly in PowerPoint using the Advanced Animation - Add Animation. So, I am curious how this can be done in Aspose?
FYI - I’ve been able to replicate this in other scenarios. For instance: I also have multiple buttons on my page to hide the same section. Once I add an effect to hide the shape to one trigger, it won’t allow me to add the effect to hide the same shape on another trigger.