PointAnimation クラス

定義

指定した Duration の線形補間を使用して、2 つのターゲット値の間の Point プロパティの値をアニメーション化 します

public ref class PointAnimation 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)]
class PointAnimation 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.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class PointAnimation 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)]
public sealed class PointAnimation : 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.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PointAnimation : Timeline
Public NotInheritable Class PointAnimation
Inherits Timeline
<PointAnimation .../>
継承
Object Platform::Object IInspectable DependencyObject Timeline PointAnimation
属性

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)

次の例は、PointAnimation を使用して EllipseGeometryCenter プロパティをアニメーション化する方法を示しています。

// Start the animation when the object loads
void SampleApp::Page::Start_Animation(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
    myStoryboard->Begin();
}
<Canvas Width="450" Height="350">
    <Canvas.Resources>
        <Storyboard x:Name="myStoryboard">

            <!-- Animate the center point of the ellipse from 100 X, 300 Y
             to 400 X, 100 Y over 5 seconds. -->
            <PointAnimation
             Storyboard.TargetProperty="Center"
             Storyboard.TargetName="MyAnimatedEllipseGeometry"
             Duration="0:0:5" 
             From="100,300"
             To="400,100"
             RepeatBehavior="Forever" EnableDependentAnimation="True"/>

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

注釈

PointAnimation を使用して、 Point 型の依存関係プロパティのプロパティ値をアニメーション化します。

Point の線形補間は、X 値と Y 値が数値として扱われ、補間は単なる数学的演算であることを意味します。

ターゲットのプロパティの値である別のオブジェクトのサブプロパティをターゲットにするには、間接プロパティ ターゲットを使用する必要がある場合があります。 たとえば、 PathGeometry の一部をアニメーション化するには、間接プロパティ パスの最後の手順が実際に Point 値になるまで、中間オブジェクト プロパティ値の一部を参照する必要があります。 間接プロパティのターゲット設定とその他のストーリーボード化されたアニメーションの概念の詳細については、「 ストーリーボード化されたアニメーション 」または 「プロパティ パス構文」を参照してください。

PointAnimation には通常、 FromBy 、または To プロパティの少なくとも 1 つが設定されますが、3 つすべてが設定されることはありません。

  • [From only]\(のみ\): アニメーションは、 From プロパティで指定された値から、アニメーション化されるプロパティの基本値まで進行します。
  • From と To: アニメーションは、 From プロパティで指定された値から To プロパティで指定された値まで進行します。
  • From と By: アニメーションは、From プロパティで指定された値から 、FromプロパティとBy プロパティの合計で指定された値まで進行します。
  • 次の場合のみ: アニメーションは、アニメーション化されたプロパティの基本値または前のアニメーションの出力値から 、To プロパティで指定された値まで進行します。
  • のみ: アニメーション化されているプロパティの基本値または前のアニメーションの出力値から、その値と By プロパティで指定された値の合計までアニメーションが進行します。

PointAnimation の FromBy 、または To プロパティは Point 値ではありません。 代わりに、これらは PointNull 許容です。 これらの既定値は null であり、初期化されていない構造体ではありません。 この null 値は、アニメーション システムが値を具体的に設定していないことを区別する方法です。 Visual C++ コンポーネント拡張機能 (C++/CX) には Nullable 型がないため、代わりに IReference を使います。

コンストラクター

PointAnimation()

PointAnimation クラスの新しいインスタンスを初期化します。

プロパティ

AutoReverse

順方向の反復の完了後に、タイムラインを逆方向に再生するかどうかを示す値を取得または設定します。

(継承元 Timeline)
BeginTime

この タイムライン を開始する時刻を取得または設定します。

(継承元 Timeline)
By

アニメーションの開始値の変化値の総量を取得または設定します。

ByProperty

By 依存関係プロパティを識別します。

Dispatcher

このオブジェクトが関連付けられている CoreDispatcher を取得します。 CoreDispatcher は、コードが UI 以外のスレッドによって開始された場合でも、UI スレッド上の DependencyObject にアクセスできる機能を表します。

(継承元 DependencyObject)
Duration

繰り返しをカウントせずに、このタイムラインの再生に要する時間を取得または設定します。

(継承元 Timeline)
EasingFunction

アニメーションに適用するイージング関数を取得または設定します。

EasingFunctionProperty

EasingFunction 依存関係プロパティを識別します。

EnableDependentAnimation

依存アニメーションと見なされるアニメーション化されたプロパティに、このアニメーション宣言の使用を許可するかどうかを宣言する値を取得または設定します。

EnableDependentAnimationProperty

EnableDependentAnimation 依存関係プロパティを識別します。

FillBehavior

アニメーションがアクティブ期間の終わりに達した後の動作を指定する値を取得または設定します。

(継承元 Timeline)
From

アニメーションの開始値を取得または設定します。

FromProperty

From 依存関係プロパティを識別します。

RepeatBehavior

このタイムラインの繰り返し動作を取得または設定します。

(継承元 Timeline)
SpeedRatio

このタイムラインの進行状況を示す、親に対する相対的なレートを取得または設定 します

(継承元 Timeline)
To

アニメーションの終了値を取得または設定します。

ToProperty

To 依存関係プロパティを識別します。

メソッド

ClearValue(DependencyProperty)

依存関係プロパティのローカル値をクリアします。

(継承元 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

依存関係プロパティに対して確立された基本値を返します。これは、アニメーションがアクティブでない場合に適用されます。

(継承元 DependencyObject)
GetValue(DependencyProperty)

DependencyObject から依存関係プロパティの現在の有効な値を返します。

(継承元 DependencyObject)
ReadLocalValue(DependencyProperty)

ローカル値が設定されている場合は、依存関係プロパティのローカル値を返します。

(継承元 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

この DependencyObject インスタンスの特定の DependencyProperty に対する変更をリッスンするための通知関数を登録します。

(継承元 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject の依存関係プロパティのローカル値を設定します。

(継承元 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

RegisterPropertyChangedCallback を呼び出して以前に登録した変更通知を取り消します。

(継承元 DependencyObject)

イベント

Completed

Storyboard オブジェクトの再生が完了したときに発生します。

(継承元 Timeline)

適用対象

こちらもご覧ください