How to customize the control template in blend to implement the "Vista button animation effect" (as shown in the figure below)

Source: Internet
Author: User

Vista has been officially launched, and the brand new interface visual effects have impressed everyone. Here I will introduce how to implement this vista button effect in blend. First, open blend to create a new project. Then, select Add existing item in the project menu to import an image as the background, and then select the button in the toolbox, drag a button control in the main window and select the object menu/edit control parts (complate)/edit complate copy ..., In the create style resource dialog box that appears, name the template style (such as buttonstyle), select apply to Windows, and click OK. Next, enter the template editing mode, in Timeline panel, you can create a new layer under chrome, and then use the drawing tool in toolbox to draw a crystal button effect, (You can create a grid that can contain multiple child elements to achieve the desired effect ), after drawing, remember to create a new content Presenter (text content above the button) in the toolbox/Asset Library ); after the button is drawn, we start to create a new timeline1 (when the window is displayed in red, the animation effect is automatically recorded) we create a new layer in timeline1 to create a light-emitting effect when the mouse is over. During this process, if you do not change an attribute, the system will automatically record the key records, you can also click the record button to manually set the key secret, And then trigger the event with the mouse, in triggers panle, click event to select the trigger object element, event mouse enter, and the Status "begin" of timeline1 and timeline to be played after the event is triggered ", we can create multiple timelines to achieve complex animation effects. Both animations and events are well written, click the scope up button at the top of the layer in the timeline panel to return to the main scene (currently in complate editing mode ); in this case, we open the resources attribute plane and find that there is an additional source named "buttonstyle". Now we can define the style for the button, after selecting the button, find the style item under the Miscellaneous attribute in the properties panel and click the small square icon on the right. In the pop-up menu, select local resources/"buttonstyle ", this is our button and we have added the custom style. Let's take a look at the effect. This style resource can be reused; therefore, by learning custom templates, we can make a lot of colorful animation effects.Program It is not easy to write it out, but it is easy to implement the animation effect we want in blend.

Legend 1

Example 2

Legend 3

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.