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