EasingPointKeyFrame class

Applies to Windows and Windows Phone

Associates an easing function with a PointAnimationUsingKeyFrames key-frame animation.

Inheritance

Object
  DependencyObject
    PointKeyFrame
      EasingPointKeyFrame

Syntax


public ref class EasingPointKeyFrame sealed : PointKeyFrame


<EasingPointKeyFrame .../>

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The EasingPointKeyFrame class has these types of members:

Constructors

The EasingPointKeyFrame class has these constructors.

ConstructorDescription
EasingPointKeyFrame Initializes a new instance of the EasingPointKeyFrame class.

 

Methods

The EasingPointKeyFrame class has these methods. It also inherits methods from the Object class.

MethodDescription
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)

 

Properties

The EasingPointKeyFrame class has these properties.

PropertyAccess typeDescription

Dispatcher

Read-onlyGets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)

EasingFunction

Read/writeGets or sets the easing function that is applied to the key frame.

EasingFunctionProperty

Read-onlyIdentifies the EasingFunction dependency property.

KeyTime

Read/writeGets or sets the time at which the key frame's target Value should be reached. (Inherited from PointKeyFrame)

Value

Read/writeGets or sets the key frame's target value. (Inherited from PointKeyFrame)

 

Remarks

Easing functions allow you to apply custom mathematical formulas to your animations. Mathematical operations are often useful to produce animations that simulate real-world physics in a 2-D coordinate system. For example, you may want an object to realistically bounce or behave as though it were on a spring. For a list of easing functions and info on how to use them, see Key-frame animations and easing function animations.

Examples

This XAML example shows how to use key frames that have easing functions associated with them to create an animation that simulates an oval going up in the air and falling back down, where it bounces to a stop.


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


No code example is currently available or this language may not be supported.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media.Animation
Windows::UI::Xaml::Media::Animation [C++]

Metadata

Windows.winmd

See also

Storyboarded animations
Key-frame animations and easing function animations
XAML animation sample
PointKeyFrame
EasingPointKeyFrame
EasingDoubleKeyFrame
KeyTime
Value

 

 

Show:
© 2014 Microsoft