Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DoubleKeyFrameCollection Class

Represents a collection of DoubleKeyFrame objects.

Namespace:  System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
public class DoubleKeyFrameCollection : Freezable, 
	IList, ICollection, IEnumerable
<DoubleKeyFrameCollection .../>

XAML Values


One or more DoubleKeyFrame objects, declared using object element syntax.

This collection is used as part of a DoubleAnimationUsingKeyFrames to animate a Double property value along a set of key frames.

The following example demonstrates how to use a DoubleAnimationUsingKeyFrames animation.

<!-- This example shows how to use the DoubleAnimationUsingKeyFrames to create
an animation on the Canvas.Left attached property of a rectangle. -->
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  WindowTitle="KeyFrame Animations">

  <!-- Key frame animations enable you to create complex animations by specifying multiple destination values
      and controlling the animation's interpolation method. -->
    <!-- The position of this rectangle is animated using a key frame animation. -->
    <Rectangle Name="myRectangle"
        <EventTrigger RoutedEvent="Rectangle.Loaded">
            <Storyboard RepeatBehavior="Forever">

              <!-- Animate Canvas.Left attached property using 3 KeyFrames which animates
                the rectangle along a path. This animation repeats indefinitely. -->

                  <!-- Using a LinearDoubleKeyFrame, the rectangle moves steadily from its
                    starting position to 500 over the first 3 seconds.  -->
                  <LinearDoubleKeyFrame Value="500" KeyTime="0:0:3" />

                  <!-- Using a DiscreteDoubleKeyFrame, the rectangle suddenly appears at 500 after
                    the fourth second of the animation. -->
                  <DiscreteDoubleKeyFrame Value="400" KeyTime="0:0:4" />

                  <!-- Using a SplineDoubleKeyFrame, the rectangle moves back to its starting point. The
                    animation starts out slowly at first and then speeds up. This KeyFrame ends after the 6th
                    second. -->
                  <SplineDoubleKeyFrame KeySpline="0.6,0.0 0.9,0.00" Value="10" KeyTime="0:0:6" />
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

© 2014 Microsoft. All rights reserved.