PointAnimationUsingKeyFrames 클래스

정의

KeyFrames 집합을 따라 Point 속성의 값에 애니메이션 효과를 줍니다.

public ref class PointAnimationUsingKeyFrames sealed : Timeline
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="KeyFrames")]
class PointAnimationUsingKeyFrames final : Timeline
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="KeyFrames")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class PointAnimationUsingKeyFrames final : Timeline
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="KeyFrames")]
public sealed class PointAnimationUsingKeyFrames : Timeline
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="KeyFrames")]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PointAnimationUsingKeyFrames : Timeline
Public NotInheritable Class PointAnimationUsingKeyFrames
Inherits Timeline
<PointAnimationUsingKeyFrames>
  oneOrMorePointKeyFrames
</PointAnimationUsingKeyFrames>
상속
Object Platform::Object IInspectable DependencyObject Timeline PointAnimationUsingKeyFrames
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

다음 예제에서는 삼각형 경로를 따라 타원을 이동합니다. 이 예제에서는 PointAnimationUsingKeyFrames 클래스를 사용하여 EllipseGeometryCenter 속성에 애니메이션 효과를 줍니다. 이 애니메이션은 다음과 같은 방식으로 세 가지 키 프레임을 사용합니다.

  1. 첫 번째 반초 동안 LinearPointKeyFrame 클래스의 instance 사용하여 시작 위치에서 일정한 속도로 경로를 따라 타원을 이동합니다. LinearPointKeyFrame과 같은 선형 키 프레임은 값 간에 부드러운 선형 보간을 만듭니다.
  2. 다음 반초가 끝날 때 DiscretePointKeyFrame 클래스의 instance 사용하여 경로를 따라 타원을 갑자기 다음 위치로 이동합니다. DiscretePointKeyFrame과 같은 불연속 키 프레임은 값 간에 갑작스런 점프를 만듭니다.
  3. 마지막 2초 동안 SplinePointKeyFrame 클래스의 instance 사용하여 타원을 다시 시작 위치로 이동합니다. SplinePointKeyFrame과 같은 스플라인 키 프레임은 KeySpline 속성의 값에 따라 값 간에 변수 전환을 만듭니다. 이 예제에서 애니메이션은 느리게 시작하다가 시간 세그먼트의 끝에 다가가면 기하급수적으로 빨라집니다.
<Canvas Width="400" Height="300">
    <Canvas.Resources>
        <Storyboard x:Name="myStoryboard">

            <!-- Animating the Center property uses 3 KeyFrames, which animate
             the ellipse allong a triangular path. -->
            <PointAnimationUsingKeyFrames
          Storyboard.TargetProperty="Center"
          Storyboard.TargetName="MyAnimatedEllipseGeometry"
          Duration="0:0:5" RepeatBehavior="Forever" EnableDependentAnimation="True">

                <!-- Over the first half second, Using a LinearPointKeyFrame, the ellipse 
               moves steadily from its starting position along the first line of the 
               trianglar path.  -->
                <LinearPointKeyFrame KeyTime="0:0:0.5" Value="100,300" />

                <!-- Using a DiscretePointKeyFrame, the ellipse suddenly changes position
               after the first second of the animation. -->
                <DiscretePointKeyFrame KeyTime="0:0:1" Value="400,300" />

                <!-- Using a SplinePointKeyFrame, the ellipse moves back to its starting
               position. It moves slowly at first and then speeds up. This key frame 
               takes 2 seconds to complete. -->
                <SplinePointKeyFrame KeySpline="0.6,0.0 0.9,0.00" 
                 KeyTime="0:0:3" Value="200,100" />
            </PointAnimationUsingKeyFrames>
        </Storyboard>
    </Canvas.Resources>
    <Path Fill="Blue" Loaded="Start_Animation">
        <Path.Data>

            <!-- Describes an ellipse. -->
            <EllipseGeometry x:Name="MyAnimatedEllipseGeometry"
             Center="200,100" RadiusX="15" RadiusY="15" />
        </Path.Data>
    </Path>
</Canvas>
// Start the animation when the object loads
private void Start_Animation(object sender, RoutedEventArgs e)
{
    myStoryboard.Begin();
}
' Start the animation when the object loads
Private Sub Start_Animation(ByVal sender As Object, ByVal e As EventArgs)
    myStoryboard.Begin()
End Sub

생성자

PointAnimationUsingKeyFrames()

PointAnimationUsingKeyFrames 클래스의 새 instance 초기화합니다.

속성

AutoReverse

타임라인이 앞으로 반복을 완료한 후 반대 방향으로 재생되는지 여부를 나타내는 값을 가져오거나 설정합니다.

(다음에서 상속됨 Timeline)
BeginTime

타임라인 이 시작될 시간을 가져오거나 설정합니다.

(다음에서 상속됨 Timeline)
Dispatcher

이 개체가 연결된 CoreDispatcher 를 가져옵니다. CoreDispatcher는 코드가 비 UI 스레드에서 시작되더라도 UI 스레드에서 DependencyObject에 액세스할 수 있는 기능을 나타냅니다.

(다음에서 상속됨 DependencyObject)
Duration

반복을 제외하고 이 Timeline이 재생되는 시간을 가져오거나 설정합니다.

(다음에서 상속됨 Timeline)
EnableDependentAnimation

종속 애니메이션으로 간주되는 애니메이션 속성에서 이 애니메이션 선언을 사용할 수 있는지 여부를 선언하는 값을 가져오거나 설정합니다.

EnableDependentAnimationProperty

EnableDependentAnimation 종속성 속성을 식별합니다.

FillBehavior

애니메이션이 활성 기간의 끝에 도달한 후 동작하는 방식을 지정하는 값을 가져오거나 설정합니다.

(다음에서 상속됨 Timeline)
KeyFrames

애니메이션을 정의하는 PointKeyFrame 개체의 컬렉션을 가져옵니다.

RepeatBehavior

이 타임라인의 반복 동작을 가져오거나 설정합니다.

(다음에서 상속됨 Timeline)
SpeedRatio

해당 부모를 기준으로 이 타임라인에 대해 진행되는 속도를 가져오거나 설정합니다.

(다음에서 상속됨 Timeline)

메서드

ClearValue(DependencyProperty)

종속성 속성의 로컬 값을 지웁니다.

(다음에서 상속됨 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

애니메이션이 활성화되지 않은 경우에 적용되는 종속성 속성에 대해 설정된 기본 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
GetValue(DependencyProperty)

DependencyObject에서 종속성 속성의 현재 유효 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
ReadLocalValue(DependencyProperty)

로컬 값이 설정된 경우 종속성 속성의 로컬 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

DependencyObject instance 특정 DependencyProperty에 대한 변경 내용을 수신 대기하기 위한 알림 함수를 등록합니다.

(다음에서 상속됨 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject에 대한 종속성 속성의 로컬 값을 설정합니다.

(다음에서 상속됨 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

RegisterPropertyChangedCallback을 호출하여 이전에 등록된 변경 알림을 취소합니다.

(다음에서 상속됨 DependencyObject)

이벤트

Completed

Storyboard 개체 재생이 완료되면 발생합니다.

(다음에서 상속됨 Timeline)

적용 대상

추가 정보