ElasticEase.Springiness プロパティ

定義

ばねの剛性を取得または設定します。 ばね性の値が小さいと、ばねが硬くなり、弾性が速いほど各振動の強度が低下します。

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"/>

適用対象