Abstract class that, when implemented, animates a Rect value.
Assembly: PresentationCore (in PresentationCore.dll)
Gets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration. (Inherited from Timeline.)
Gets a value that indicates whether the object can be made unmodifiable. (Inherited from Freezable.)
Gets or sets the length of time for which this timeline plays, not counting repetitions. (Inherited from Timeline.)
Gets a value that indicates whether the object is currently modifiable. (Inherited from Freezable.)
Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject.)
Gets or sets the repeating behavior of this timeline. (Inherited from Timeline.)
Gets the type of value this animation generates.(Overrides AnimationTimeline.TargetPropertyType.)
Occurs when this timeline has completely finished playing: it will no longer enter its active period. (Inherited from Timeline.)
Occurs when the rate at which time progresses for the timeline's clock changes.(Inherited from Timeline.)
Occurs when the clock created for this timeline or one of its parent timelines is removed.(Inherited from Timeline.)
Notes to Inheritors:
See the Custom Animations Overview for information about extending animation classes.
The following code example demonstrates how to use the derived RectAnimationUsingKeyFrames 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" Name="myRootElement" WindowTitle="ThicknessAnimationUsingKeyFrames Example"> <StackPanel Orientation="Vertical" HorizontalAlignment="Center"> <Path Stroke="Black" StrokeThickness="1" Fill="LemonChiffon"> <Path.Data> <RectangleGeometry x:Name="myRectangleGeometry" Rect="0,200,100,100" /> </Path.Data> <Path.Triggers> <EventTrigger RoutedEvent="Path.Loaded"> <BeginStoryboard> <Storyboard> <!-- Animate the Rect property of the RectangleGeometry which causes the rectangle to animate its position as well as its width and height. --> <RectAnimationUsingKeyFrames Storyboard.TargetName="myRectangleGeometry" Storyboard.TargetProperty ="Rect" Duration="0:0:6" FillBehavior="HoldEnd" RepeatBehavior="Forever"> <!-- Animate position, width, and height in first 2 seconds. LinearRectKeyFrame creates a smooth, linear animation between values. --> <LinearRectKeyFrame Value="600,50,200,50" KeyTime="0:0:2" /> <!-- In the next half second, change height to 10. DiscreteRectKeyFrame creates a sudden "jump" between values. --> <DiscreteRectKeyFrame Value="600,50,200,10" KeyTime="0:0:2.5" /> <!-- In the final 2 seconds of the animation, go back to the starting position, width, and height. Spline key frames like SplineRectKeyFrame creates a variable transition between values depending on the KeySpline property. In this example, the animation starts off slow but toward the end of the time segment, it speeds up exponentially.--> <SplineRectKeyFrame Value="0,200,100,100" KeyTime="0:0:4.5" KeySpline="0.6,0.0 0.9,0.00" /> </RectAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> </Path.Triggers> </Path> </StackPanel> </Page>
Available since 3.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.