Silverlight rotation center is fun

Source: Internet
Author: User

What I want to talk about is about the rotation of an object around a specified point. Generally, a new rotation center in Silverlight under blend has a rotation center, if you want to rotate a rectangle around its own corner ()

Rotate the logon box in this example around the circle in the upper left corner. The procedure is as follows:

In the first Zhen animation State, set the rotation center point position of the rectangular login box to coincide with the rotation center point of the circle, for example:

The last initial animation state is to move the center of rotation of the rectangular logon box to the center of the circular rotation to coincide with it, and set the conversion attribute to rotate and the angle is 360 degrees, for example:

 

In this way, OK. In fact, you only need to move the rotation center of the object to be rotated before and after the two slaves, to the point that you want to rotate around it (for example, the rotation center is O, to rotate around the X point, you only need to relay the O points of the first and last two slaves with the X point ).

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.