Wp8.1 UI programming VII. Animation

Source: Internet
Author: User

1. Target attributes of a normal Animation:

General UI control attributes, such as width and height; transform special effect attributes; and three-dimensional transform special effect attributes.

Common UI control attributes will trigger the layout system to re-work, so the first two attributes are preferred for animation.

 

The animation class is located in the namespace of windows. UI. XAML. Media. animation.

Based on timeline animation, inherited from timeline:

Linear interpolation animation, that is, from/to/by animation, reflects the continuous gradient of an object within a specified time range.

Key Frame Animation is more powerful. You can specify any number of target values and control the interpolation methods between them.

Frame-based animation:

Some animations cannot be implemented using the above methods. They are usually complex animations, such as simulating snow falling. Each frame is re-painted through the event interface.

 

Linear interpolation animations include doubleanimation, coloranimation, and pointanimation, which are used to animation double, color, and point attributes.

From: start value

To: target value. If the by parameter is set at the same time, it takes precedence over the by parameter.

By: variable value, which has no significance for non-numerical type.

Duration: the duration of a complete playback of an animation. The default value is 1 second. The format is "hour: minute: Second" (timespan object). If this parameter is set in the code, use timespan to implicitly convert to duration. Duration provides two attributes: automatic and forever.

Autoreverse: whether the timeline is automatically regressed. The default value is false.

Repeatbehavior: the number of times the timeline is played repeatedly.

Repeatbehavior has three syntaxes:

If it is set to "forever", it indicates unlimited repetition;

The number of repeated runs, which consists of an integer number of iterations and character X. For example, "3x" indicates three times;

Time span, in the format of [day.] hour: minute: Second [. second decimal part].

 

Doubleanimation can be combined with transform to implement the transformation animation. You only need to specify the targetname and targetproperty attributes of the storyboard and associate them with the transform used.

Coloranimation is essentially a linear processing of RGB color values. Usage is similar. Pay attention to setting the targetproperty, such as: (button. Background). (solidcolorbrush. color ).

Pointanimation is a linear movement of point, which can be used to animation the path.

 

3. Key Frame Animation

 

Wp8.1 UI programming VII. Animation

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.