I have three storyboards in a wpf application.
begin - single animation progress - repeating animation end - also animation.
All storyboards animating the same image are repeated “progressive” storyboards (while the request in another thread is running), the “start” storyboard exceeded it, followed by the “end” animation. I suggested that this is a simple problem: when the application starts, run the "begin" animation, then into the processed event handler, start the progress animation, etc.
But it does not work: the progress animation starts, but it does not display correctly (blinks strangely).
I made “button1” to analyze this, and I noticed that the same method in the onclick eventhandler button works (after the initial storyboard ended, I pressed it and the initial version of the progress started and appeared perfectly). (FillBehavior of the initial animation - “Stop”: the button does not work without this setting, but the event handler remains wrong after installation)
private void Window_Loaded(object sender, RoutedEventArgs e) { begin = (Storyboard)FindResource("startanimation"); progress = (Storyboard)FindResource("progressanimation"); end = (Storyboard)FindResource("stopanimation"); begin.Completed += new EventHandler(begin_Completed); begin.Begin(); } void begin_Completed(object sender, EventArgs e) { progress.Begin();
Any idea?
source share