У меня есть очень простая раскадровка с Int32Animation, которая нацелена на пользовательский DP в моем классе.
У меня есть обратный вызов OnChanged для моего DP, который выполняет Console.WriteLine("Current Value: " + MyDP).
Когда я запускаю раскадровку, я прекрасно вижу вывод консоли, и когда я приостанавливаю раскадровку, вывод консоли останавливается, НО, когда я возобновляю раскадровку, DP НЕ является следующим значением, которое должно быть. Он продолжает увеличиваться, хотя раскадровка остановилась.
У кого-нибудь было что-то подобное с ними?
вот фрагмент кода того, что я делаю
Int32Animation element = new Int32Animation();
element.From = 0;
element.To = targetTo;
element.Duration = dur;
Storyboard.SetTargetProperty(element, new PropertyPath(CurrentFrameProperty));
_filmstripStoryboard = new Storyboard {SpeedRatio = this.FrameRate};
_filmstripStoryboard.Children.Add(element);
public void Start()
{
_filmstripStoryboard.Begin(this, true);
}
public void Pause()
{
_filmstripStoryboard.Pause(this);
}
public void Unpause()
{
_filmstripStoryboard.Resume(this);
}