Share via


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

적용 대상