EasingPointKeyFrame Klasse

Definition

Ordnet eine Beschleunigungsfunktion einer PointAnimationUsingKeyFrames-Keyframeanimation zu.

public ref class EasingPointKeyFrame sealed : PointKeyFrame
/// [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 EasingPointKeyFrame final : PointKeyFrame
/// [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 EasingPointKeyFrame final : PointKeyFrame
[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 EasingPointKeyFrame : PointKeyFrame
[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 EasingPointKeyFrame : PointKeyFrame
Public NotInheritable Class EasingPointKeyFrame
Inherits PointKeyFrame
<EasingPointKeyFrame .../>
Vererbung
Object Platform::Object IInspectable DependencyObject PointKeyFrame EasingPointKeyFrame
Attribute

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Beispiele

In diesem XAML-Beispiel wird gezeigt, wie Sie Keyframes verwenden, denen Beschleunigungsfunktionen zugeordnet sind, um eine Animation zu erstellen, die ein Oval simuliert, das in der Luft nach oben geht und nach unten fällt, wo es zu einem Stopp springt.

<Canvas Width="400" Height="300">
    <Canvas.Resources>
        <Storyboard x:Name="myStoryboard">

            <PointAnimationUsingKeyFrames
             Storyboard.TargetProperty="Center"
             Storyboard.TargetName="MyAnimatedEllipseGeometry"
             EnableDependentAnimation="True">

                <!-- This keyframe animates the ellipse up to the crest 
                     where it slows down and stops. -->
                <EasingPointKeyFrame Value="50,20" KeyTime="00:00:02">
                    <EasingPointKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseOut"/>
                    </EasingPointKeyFrame.EasingFunction>
                </EasingPointKeyFrame>
                
                <!-- This keyframe animates the ellipse back down and makes
                     it bounce. -->
                <EasingPointKeyFrame Value="50,200" KeyTime="00:00:06">
                    <EasingPointKeyFrame.EasingFunction>
                        <BounceEase Bounces="5" EasingMode="EaseOut"/>
                    </EasingPointKeyFrame.EasingFunction>
                </EasingPointKeyFrame>

            </PointAnimationUsingKeyFrames>
        </Storyboard>
    </Canvas.Resources>
    <Path PointerPressed="Pointer_Clicked" Fill="Blue">
        <Path.Data>

            <!-- Describes an ellipse. -->
            <EllipseGeometry x:Name="MyAnimatedEllipseGeometry"
             Center="50,200" RadiusX="15" RadiusY="15" />
        </Path.Data>
    </Path>
</Canvas>
// When the user clicks the ellipse, the animation
// begins. 
private void Pointer_Clicked(object sender, PointerRoutedEventArgs e)
{
    myStoryboard.Begin();
}
' When the user clicks the ellipse, the animation
' begins. 
Private Sub Pointer_Clicked(ByVal sender As Object, ByVal e As PointerRoutedEventArgs)
    myStoryboard.Begin()
End Sub

Hinweise

Mit Beschleunigungsfunktionen können Sie benutzerdefinierte mathematische Formeln auf Animationen anwenden. Mathematische Vorgänge eignen sich oft zum Erstellen von Animationen, die ein reales physikalisches Modell in einem 2 D-Koordinatensystem simulieren. Beispielsweise sollte Ihr Objekt realistisch springen oder sich so verhalten, als ob es sich auf einer Feder befinden würde. Eine Liste der Beschleunigungsfunktionen und Informationen zur Verwendung finden Sie unter Keyframeanimationen und Beschleunigungsfunktionsanimationen.

Konstruktoren

EasingPointKeyFrame()

Initialisiert eine neue instance der EasingPointKeyFrame-Klasse.

Eigenschaften

Dispatcher

Ruft den CoreDispatcher ab, dem dieses Objekt zugeordnet ist. CoreDispatcher stellt eine Funktion dar, die auf das DependencyObject im UI-Thread zugreifen kann, auch wenn der Code von einem Nicht-UI-Thread initiiert wird.

(Geerbt von DependencyObject)
EasingFunction

Ruft die Beschleunigungsfunktion ab, die auf den Keyframe angewendet wird, oder legt diese fest.

EasingFunctionProperty

Gibt die EasingFunction-Abhängigkeitseigenschaft an.

KeyTime

Ruft den Zeitpunkt ab, zu dem der Zielwert des Keyframes erreicht werden soll, oder legt diese fest.

(Geerbt von PointKeyFrame)
Value

Ruft den Zielwert des Keyframes ab oder legt ihn fest.

(Geerbt von PointKeyFrame)

Methoden

ClearValue(DependencyProperty)

Löscht den lokalen Wert einer Abhängigkeitseigenschaft.

(Geerbt von DependencyObject)
GetAnimationBaseValue(DependencyProperty)

Gibt einen beliebigen Basiswert zurück, der für eine Abhängigkeitseigenschaft eingerichtet wurde, der in Fällen gilt, in denen eine Animation nicht aktiv ist.

(Geerbt von DependencyObject)
GetValue(DependencyProperty)

Gibt den aktuellen effektiven Wert einer Abhängigkeitseigenschaft aus einem DependencyObject zurück.

(Geerbt von DependencyObject)
ReadLocalValue(DependencyProperty)

Gibt den lokalen Wert einer Abhängigkeitseigenschaft zurück, wenn ein lokaler Wert festgelegt ist.

(Geerbt von DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registriert eine Benachrichtigungsfunktion zum Lauschen auf Änderungen an einer bestimmten DependencyProperty für dieses DependencyObject-instance.

(Geerbt von DependencyObject)
SetValue(DependencyProperty, Object)

Legt den lokalen Wert einer Abhängigkeitseigenschaft für ein DependencyObject fest.

(Geerbt von DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Bricht eine Änderungsbenachrichtigung ab, die zuvor durch Aufrufen von RegisterPropertyChangedCallback registriert wurde.

(Geerbt von DependencyObject)

Gilt für: