3

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?

AnjumSKhan
  • 9,647
  • 1
  • 26
  • 38
Golan Kiviti
  • 3,895
  • 7
  • 38
  • 63

1 Answers1

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