Using the Same Animation Type on the Same Presentation Shape in C#

I have an IGroupShape object in my slide we are using for a fake “paging” functionality. Basically, it works like this:

  1. Show the group on page load
  2. Hide the group on a button click
  3. 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.

@ggalipeau1,
Welcome to our community! Thank you for the issue description. I will answer you later.

@ggalipeau1,
Could you share a presentation created by PowerPoint with your desired animation example, please?

Sure. It’s basically the paging (i.e.: numbers 1, 2 and 3) in the Grouping. I color coded the backgrounds to make it obvious they are paging.

Thanks in advance for your help.

Attached is the demo.

.PagingDemo.zip (73.2 KB)

@ggalipeau1,
I added a ticket with ID SLIDESNET-42670 in our tracking system. Our development team will investigate this case. I will inform you of any progress.

Hi Andrey,
Just checking if you have any update on this?

@ggalipeau1,
Investigation of this issue will begin next week.

The issues you have found earlier (filed as SLIDESNET-42670) have been fixed in this update.