问题
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?
回答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();
}
来源:https://stackoverflow.com/questions/34038088/wpf-starting-animation-after-another-animation-is-finished-in-xaml