This documentation is archived and is not being maintained.
PointAnimationBase Class
Visual Studio 2008
Abstract class that, when implemented, animates a Point value.
Assembly: PresentationCore (in PresentationCore.dll)
Notes to Inheritors:
See the Custom Animations Overview for information about extending animation classes.
The following code example demonstrates how to use the derived PointAnimationUsingKeyFrames class in Extensible Application Markup Language (XAML).
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <Canvas> <Path Fill="Blue" Margin="15,15,15,15"> <Path.Data> <!-- Describes an ellipse. --> <EllipseGeometry x:Name="MyAnimatedEllipseGeometry" Center="200,100" RadiusX="15" RadiusY="15" /> </Path.Data> <Path.Triggers> <EventTrigger RoutedEvent="Path.Loaded"> <BeginStoryboard Name="MyBeginStoryboard"> <Storyboard> <!-- 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" FillBehavior="HoldEnd" RepeatBehavior="Forever"> <PointAnimationUsingKeyFrames.KeyFrames> <!-- 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"> <LinearPointKeyFrame.Value> <Point X="100" Y="300" /> </LinearPointKeyFrame.Value> </LinearPointKeyFrame> <!-- Using a DiscretePointKeyFrame, the ellipse suddenly changes position after the first second of the animation. --> <DiscretePointKeyFrame KeyTime="0:0:1"> <DiscretePointKeyFrame.Value> <Point X="400" Y="300" /> </DiscretePointKeyFrame.Value> </DiscretePointKeyFrame> <!-- 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"> <SplinePointKeyFrame.Value> <Point X="200" Y="100" /> </SplinePointKeyFrame.Value> </SplinePointKeyFrame> </PointAnimationUsingKeyFrames.KeyFrames> </PointAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> </Path.Triggers> </Path> </Canvas> </Page>
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Freezable
System.Windows.Media.Animation.Animatable
System.Windows.Media.Animation.Timeline
System.Windows.Media.Animation.AnimationTimeline
System.Windows.Media.Animation.PointAnimationBase
System.Windows.Media.Animation.PointAnimation
System.Windows.Media.Animation.PointAnimationUsingKeyFrames
System.Windows.Media.Animation.PointAnimationUsingPath
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Freezable
System.Windows.Media.Animation.Animatable
System.Windows.Media.Animation.Timeline
System.Windows.Media.Animation.AnimationTimeline
System.Windows.Media.Animation.PointAnimationBase
System.Windows.Media.Animation.PointAnimation
System.Windows.Media.Animation.PointAnimationUsingKeyFrames
System.Windows.Media.Animation.PointAnimationUsingPath
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.
Show: