1

my にあるアニメーションを開始する次のコードがありますResources

 Storyboard _wheelAnimation = FindResource("CircleRotation") as Storyboard;
 if (_wheelAnimation == null) return;
 _wheelAnimation.Begin(this);

これが私のアニメーションです:

<Storyboard x:Key="CircleRotation" RepeatBehavior="Forever">
    <DoubleAnimation 
        Storyboard.TargetName="BigWheelImage"
        Storyboard.TargetProperty="RenderTransform.Angle"
        From="360" To="0" Duration="0:0:35" BeginTime="00:00:00.000" />
    <DoubleAnimation 
        Storyboard.TargetName="SmallWheelImage"
        Storyboard.TargetProperty="RenderTransform.Angle"
        From="0" To="360" Duration="0:0:25" BeginTime="00:00:00.000" />
</Storyboard>

プログラムで停止したいのですが、これを試しました:

_wheelAnimation.Stop();  // and also _wheelAnimation.Stop(this);

運が悪いと...なぜ止まらないのですか?

4

2 に答える 2

-1

_wheelAnimation.SkipToFill(); を試してください。

于 2015-06-17T11:22:49.657 に答える