PointAnimationBase Class
.NET Framework 3.0
Abstract class that, when implemented, animates a Point value.
Namespace: System.Windows.Media.Animation
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: