ElasticEase.Springiness プロパティ

定義

スプリングの硬さを取得または設定します。 Springiness の値が小さいほど、スプリングが硬くなり、弾性の強さが 1 回の振動で速く衰えます。

public:
 property double Springiness { double get(); void set(double value); };
public double Springiness { get; set; }
member this.Springiness : double with get, set
Public Property Springiness As Double

プロパティ値

スプリングの硬さを指定する正の数値。 既定値は、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>

注釈

値が Springiness 小さいと、スプリングが硬くなり、各振動の強度が速くなります。

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

次の図は、 のさまざまな値の効果を Springiness示しています。

さまざまな Springiness 値を示します。

XAML 属性の使用方法

<ElasticEase Springiness="double"/>  

適用対象