Tips for Silverlight game development: dynamic animation

Source: Internet
Author: User

Friends who are playing with Silverlight must be impressed with their own control ChildWindow. It seems that it has been played from a distance during Show. This effect is not complicated. The following describes this tips, this article is not a new technique, but a general story board combined with conversion and contraction implementation.

The practice is also very simple. Here we will make a reference to the following section :)

First, prepare a control. In order to better operate and control the control, the following is a new Card control, which is decisively placed on the self-portraits of the monks.

Now we have a thumbnail animation to create a new storyboard animation.

You only need to add two key locations in the range of 0 and 0.5 seconds.

Next, select the timeline of the Key Frame position at the start point and set the scale-down to 0.

Now you can play the video and check the effect. You will find that the image is small to large, but the pop-up doesn't feel like it doesn't matter. The following uses the Elastic (buffer) Elastic Out, when you select a key frame, the following interface is displayed. After the selection, Oscillations is set to 2 and Springiness to 1. Is it interesting to play it now.

Now in MainPage, find the created control in the Project tag under Asset. If not, compile it (Ctrl + Alt + B ).

Then I made some la S and designed them according to my personal thoughts. I added a button to trigger animation playback.

Button events do not need to be written in the background. You only need to select the button and select the event category under the Properties tab on the upper right. Double-Click the event to automatically add the event to the background code:

This Click Event automatically appears. Now you can add the corresponding animation playing behavior for this event.

You can preview the following results or download the code to view the specific results. This article is relatively simple, but this small detail can be icing on the cake for the game or application, it can be applied in windows, buttons, objects, and other places. Will it be more interesting if combined with the effects of previous menus, such as dynamic menus :)

The source code of this project is as follows: Click to download it directly.

Author of this article: Nowpaper

Recommended Silverlight game development blog: dark blue right hand

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.