Windows Phone development (38): animation pointanimation

Source: Internet
Author: User

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.

 

Related Article

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.