WPF StoryBoard.Completed event not firing
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an animation before closing the main window, like the following code shows. Problem is the StoryBoard.Completed is not firing. Any clues what is causing this? Code DoubleAnimation dblAnimX = new DoubleAnimation(1.0, 0.0, new Duration(TimeSpan.FromSeconds(0.5))); dblAnimX.SetValue(Storyboard.TargetProperty, this); DoubleAnimation dblAnimY = new DoubleAnimation(1.0, 0.0, new Duration(TimeSpan.FromSeconds(0.5))); dblAnimY.SetValue(Storyboard.TargetProperty, this); Storyboard story = new Storyboard(); Storyboard.SetTarget(dblAnimX, this);