Simply set the DoubleAnimation
BeginTime
property to the value you need.
Animation wpf - Show for n seconds then fade out
-
29-06-2022 - |
Question
I have a storyboard with one DoubleAnimation
this animates the opacity from 1 to 0 in one second:
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="NotificationStackPanel"
Storyboard.TargetProperty="Opacity"
From="1"
To="0"
Duration="0:0:1"/>
</Storyboard>
</BeginStoryboard>
The fade-out animation is pretty quick, and that's the purpose. But how can I make an animation to show the control for n seconds then start this fade-out animation?
I tried by making a new DoubleAnimation on top of the current one, with values From="1"
and To="1"
and a Duration="5"
, but that did seems to work. Any ideas?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow