I have a storyboard that seems to stop randomly by itself, I cannot for the life of me figure out why.
It seems to stop and random intervals.
private void CreateStoryboard(int from)
{
int? targetTo;
Duration dur;
targetTo = 150;
dur = 150;
Int32Animation element = new Int32Animation();
element.From = from;
element.To = targetTo;
element.Duration = dur;
Storyboard.SetTargetProperty(element, new PropertyPath(CurrentFrameProperty));
_filmstripStoryboard = new Storyboard {SpeedRatio = this.FrameRate};
_filmstripStoryboard.Children.Add(element);
_filmstripStoryboard.Completed += new EventHandler(FilmstripStoryboard_Completed);
_filmstripStoryboard.Begin(this, true);
}
As you can see im affecting the custom "CurrentFrameProperty" DP, which has a callback method that I print out the current frame.
For some reason, and I have just no idea why, the storyboard just stops. The completed event does NOT get fired, and the callback method stops getting called.
And I am sure that I am not calling stop() anywhere.
If anyone has had this issue or can help me debug it, I would be very grateful.