ElasticEase.Oscillations プロパティ

定義

アニメーションが最終的に停止するまでの間に、ターゲットが前後運動する回数を取得または設定します。

public:
 property int Oscillations { int get(); void set(int value); };
public int Oscillations { get; set; }
member this.Oscillations : int with get, set
Public Property Oscillations As Integer

プロパティ値

アニメーションが最終的に停止するまでの間に、ターゲットが前後運動する回数。 この値は、0 以上である必要があります。 既定値は 3 です。

次の例では、 ElasticEase にイージング関数を DoubleAnimation 適用して、静止するまで前後に振動するスプリングに似たアニメーションを作成します。

<Rectangle Name="myRectangle" Width="200" Height="30" Fill="Blue">
    <Rectangle.Triggers>
        <EventTrigger RoutedEvent="Rectangle.MouseDown">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation From="30" To="200" Duration="00:00:4" 
                     Storyboard.TargetName="myRectangle" 
                     Storyboard.TargetProperty="Height">
                        <DoubleAnimation.EasingFunction>
                            
                            <!-- Elastic easing function assigned to From/To animation -->
                            <ElasticEase x:Name="myElasticEase" Oscillations="3" 
                             Springiness="1" EasingMode="EaseOut"/>
                        </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>

                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Rectangle.Triggers>

</Rectangle>

注釈

依存関係プロパティ識別子フィールド: OscillationsProperty

XAML 属性の使用方法

<ElasticEase Oscillations="int"/>  

適用対象