Pointanimation is also very simple. It is similar to the two animation mentioned above and has the same attributes, such as by, from, and to. The difference is that pointanimation is the target value from one point to another.
I have a reason to believe that everyone knows this. So I will not introduce it much. Just give two examples a hot dive.
Example 1: let the line move.
In this example, linegeometry is used as the animation target object to animated the startpoint and Endpoint attributes to make the straight line (actually a line segment) move.
Remember to activate the animation in the loaded event of the page.
// Constructor public mainpage () {initializecomponent (); this. Loaded + = (sender, e) =>{ this. STD. Begin ();};}
Example 2: animated curves.
In this example, three beziersegment points are animated, even if the beziersegment curve is "swimming.
<Grid> <path horizontalalignment = "stretch" verticalignment = "stretch" stroke = "lightgreen" strokethickness = "12"> <path. DATA> <pathgeometry> <pathfigure startpoint = "180,35"> <beziersegment X: name = "PBM" point1 = "28,180" point2 = "200,270" point3 = "412,700"/> </pathfigure> </pathgeometry> </path. DATA> </path> <grid. resources> <storyboard X: Name = "STD" repeatbehavior = "forever" autoreverse = "true"> <pointanimation duration = "0: 0: 3" storyboard. targetname = "PBM" storyboard. targetproperty = "point1" from = "27,162" to = "415,145"/> <pointanimation duration = "" storyboard. targetname = "PBM" storyboard. targetproperty = "point2" to = "600,400"/> <pointanimation duration = "" storyboard. targetname = "PBM" storyboard. targetproperty = "point3" to = "10,700" type = "codeph" text = "codeph"/> </storyboard> </grid. resources> </GRID>
BackgroundCodeActivate the animation in the loaded event.
Well, this lesson is easy to pass.