Play Silverlight friend must be with the control ChildWindow impressed, show when as if from a distance to play out, this effect is not complicated to make, the following will introduce this small technique, this article is not a new skill, but the general story board combined with transformation and contraction implementation.
The practice is also very simple, here to make a point of the bar bar:
First prepare a control, then in order to better operate and control, the following is a new card control, decisively put on my self-portrait.
Now do a shrink animation, create a new storyboard animation:
Just add two key points in 0 and 0.5 seconds:
Select the timeline for the keyframe position of the starting point below to set the indent to 0:
At this point can play look at the effect, you will find that the picture from small to large, but the feeling of the pop-up does not matter, the following use easing (buffer) of the elastic out, when the selection of a key frame will appear below the interface, When selected, the oscillations will be 2 and springiness as 1, now play a bit interesting.
Now go to mainpage and then asset the Project tab below to find the control you just created, and if not, you need to compile (ctrl+alt+b).
Then make a few layouts, according to the specific personal ideas to design, I added a button to trigger the animation playback.
Button events do not need to write in the background, only need to select the button, on the right side of the Properties tab select the Event category, double-click the Click event will automatically increase the event to the background code:
This click event appears automatically, and now increases the playback behavior of the corresponding animation for this event.
The effects can be previewed, can also download the code to view, this article is simpler, but this small detail can be for the game or application icing on the cake, it can be in the window, buttons, objects and other places to apply, if the combination of some of the previous such as the effect of dynamic menu, is not more interesting it?
This project source code downloads the address as follows: Click to download directly