"Programming WPF" translation 8th Chapter 2.Timeline

Source: Internet
Author: User
Tags relative

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.