I am using WPF and I have 2 storyboard animations. I want the second animation to start after the first one is finished. How do I do that in the xaml code?
Asked
Active
Viewed 2,338 times
3
-
1Do you know the duration of the first animation? If you know the duration then you can set BeginTime for the second animation so it will start after the first one. – user2250152 Dec 02 '15 at 08:44
-
Nice idea it works, but it there a better way to do it maybe? – Golan Kiviti Dec 02 '15 at 08:59
1 Answers
1
I don't know if it is possible in Xaml, if you can use some code behind you can do something like this:
<Storyboard x:Name="MyStoryboard" Completed="MyStoryboardCompleted" FillBehavior="Stop">
and in your code behind
private void MyStoryboardCompleted(object sender, EventArgs e)
{
var thing = this.FindResource("MyOtherStorboard");
var OtherSB = (Storyboard)thing;
OtherSB.Begin();
}

Giangregorio
- 1,482
- 2
- 11
- 12