Timeline represents the extension of time. It usually also describes one or more of the things that have happened during this time period. For example, the type of animation described in the previous section is timeline. But oh rate of such doubleanimation:
<doubleanimation from= "to=" duration= "0:0:5"/>
As the duration attribute points out, this represents a 5-second length of time. All types of timeline always have a start time and a duration. If you do not specify a start time in detail, it defaults to 0:0:0, but it can be set using the BeginTime property. The start time can be relative to various reference frames, such as when a page is parsed, or relative to another timeline, depending on where the timeline is defined.
You can also set BeginTime to null. (in XAML, this is done through the {x:null} tag.) This indicates that timeline does not have a fixed start time, but can be triggered by an event. Later we will see any triggering of a Timeline.
Not only represents a specific time extension, a particular timeline also represents a change in a value over a period of time. At the beginning of the timeline, the value is 10, and at the end, the value is 300. DoubleAnimation is one of many built-in animation types.
8.2.1 Animation Time Line type
WPF provides a set of animated classes that conform to the same basic style. So when you have to choose an animation type--this type of match is set for the animated property type, the animation type behavior is quite consistent.
For example, a double type property can be animated-by using DoubleAnimation, and for a color property, you can use ColorAnimation. These types are allowed to follow the same typeanimation naming transformation, as you can see from table 8-1.
Table 8-1. Animation types
int64animation |
byteanimation |
|
point3danimation |
coloranimation |
|
rect3danimation |
thicknessanimation |
doubleanimation |
rectanimati On |
int16animation |
vectoranimation |