WPF Storyboard をいくつかのカスタム WHILE ループに置き換えて、可能かどうかを確認したいと考えています。私が持っているコードは次のとおりです。
public void RestartAnimation(int seconds)
{
da.From = this.ActualWidth;
da.To = -ContentActualWidth;
da.RepeatBehavior = RepeatBehavior.Forever;
da.Duration = new Duration(TimeSpan.FromSeconds(seconds));
Timeline.SetDesiredFrameRate(da, 15);
if (sb.Children.Count == 0)
{
sb.Children.Add(da);
Storyboard.SetTargetProperty(da, new PropertyPath("(Canvas.Left)"));
Storyboard.SetTarget(da, cp);
sb.Begin();
}
}
その中にタイマーとWHILEがあるはずだと思います...
それがどのように行われるかについての手がかりはありますか?
ありがとう!!