J'ai un storyboard WPF que je veux parcourir image par image (pour un framerate variable). A chaque image, mon intention est d'écrire une image de l'état du storyboard. À cette fin, je suis en train d'employer la méthode suivante:Comment s'entraîner quand WPF Storyboard a terminé une recherche et a été dessiné à l'écran?
this.CurrentStoryboard.Begin(this);
this.CurrentStoryboard.Pause(this);
//call a function (SEEKFUNC) which calls the following method for (increasing "frameNumber"s):
this.CurrentStoryboard.Seek(this, TimeSpan.FromSeconds(((double)frameNumber)/c_FrameRate), TimeSeekOrigin.BeginTime);
//wait for drawing to complete at point
SaveFrame(this.saveCanvas);
//call SEEKFUNC with frameNumber++
Ce que je me bats avec est cependant trouver lorsque le storyboard a terminé et a été rendu. Puis-je supposer que cela aura été complété avec succès par le deuxième appel suivant à CompositionTarget.Rendering? Y a-t-il une autre façon, plus soignée?