Page 1 of 1

StoryboardCompletedTrigger

Posted: 25 Sep 2020, 21:44
by samc
I'm attempting to get StoryboardCompletedTrigger to work. My setup looks something like this:

User control:
	<UserControl.Resources>
		<ResourceDictionary>
			<Storyboard x:Key="CooldownStoryboard">
				<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Darken" From="1"/>
			</Storyboard>
		</ResourceDictionary>
	</UserControl.Resources>

	<i:Interaction.Triggers>
		<ei:StoryboardCompletedTrigger Storyboard="{StaticResource CooldownStoryboard}">
			<ei:PlaySoundAction Source="play_hud_cooldown_complete.wav"/>
		</ei:StoryboardCompletedTrigger>
	</i:Interaction.Triggers>
	
	<Grid x:Name="Root" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2,0,3,0">
		<VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="AbilityStates">
                <VisualStateGroup.Transitions>
                    <VisualTransition From="Ready" GeneratedDuration="0" To="Cooldown" Storyboard="{StaticResource CooldownStoryboard}">
                        <VisualTransition.GeneratedEasingFunction>
                            <CircleEase EasingMode="EaseOut"/>
                        </VisualTransition.GeneratedEasingFunction>
                    </VisualTransition>
// ....	
The storyboard triggers, my states are hit, everything seems fine, except the StoryboardCompletedTrigger never seems to fire. I turned on binding logging and it seems fine (no error about the binding at least). I'm probably just doing something dumb. Any help?

thanks,
sam

Re: StoryboardCompletedTrigger

Posted: 26 Sep 2020, 00:19
by samc
Turns out, I was just doing something dumb. After starting at it enough and playing around, I found out that I was listening for the wrong storyboard :(

oops.

sam

Re: StoryboardCompletedTrigger

Posted: 28 Sep 2020, 09:59
by sfernandez
Thanks for the update Sam, if there is anything we should improve to help identifying that easier please let us know.