Happy New Year, Happy New Year 365dvd
Members of the park and the staff of the blog Park
Happy New Year!
We specially made a simple animation, put in the blog Park uap wp App inside, no WP mobile phone to see youku: http://v.youku.com/v_show/id_XODYxMTM4ODM2.html
(Audible)
This animation is completely developed and produced using the Win rt sdk. Its interface elements include:
1) Page, standard Windows Phone Page
2) title-New Year
3) Progress bar-the horizontal bar under the title that updates the Progress every second
4) Snowflake-a snowflake is generated every 100 ms at random horizontal positions and has three types of sizes (, 30). The snowflake itself is a Segoe UI Symbol character with a total of snowflakes.
5) Star-Segoe UI Symbol characters, three types in total
6) snowman-Segoe UI Symbol character, FontSize = 200. Because it is a vector character, it is no longer afraid
7) Snow heaps-Rectangle, fill = white
8) pine tree, which is a static image, png
9) Language card (MS-UAP words), the animation can finally see, is a combination of Border/TextBlock/Rectangle
10) the word "Happy New Year" is displayed at the end of the animation. TextBlock
11) Happy new year, at the end of the animation, TextBlock
12) command bar. Check the button again.
The animation is as follows:
How is animation implemented?
Today, I will give a brief introduction to it. The main purpose is to make everyone happy and entertain you. I will repeat it in my blog next year.
1) generate a timer, ThreadPoolTimer. CreatePeriodicTimer, which is used to generate snow. The interval is ms. After generation, put it in a List <Snow>.
2) generate the second timer, which is used to move the snowflake and let it fall. The interval is 50 ms. When timer trigger each time, check all the Snow in List <Snow>, move its position (Y + = 5, X does not move), so that it can land vertically.
3) In the second timer, check the Snow (Y coordinate is greater than or equal to that on the rectangle of the Snow pile), delete it from List <Snow>, and make the thickness of the Snow pile ++
4) generate the third timer for updating the progress bar.
5) Use Storyboard to update the Opacity of the three stars, from 0 to 1, and then return 0 to create a flickering effect.
6) The recording Board (ms-uap) uses Storyboar to move up first and then backward to one side, which is an animation of two key frames.
7) the words "Happy New Year" and "Happy New Year" are updated Opacity, from 0 to 1, and the other is to rotate it 360 degrees.
Here:
Windows Phone Store App link:
Bytes
Windows Store App link:
Http://apps.microsoft.com/windows/zh-cn/app/c76b99a0-9abd-4a4e-86f0-b29bfcc51059
GitHub open source link:
Https://github.com/MS-UAP/cnblogs-UAP
MSDN Sample Code:
Https://code.msdn.microsoft.com/CNBlogs-Client-Universal-9c9692d1
I hope you can learn more, work hard, share code, and change the world in the next year!
MS-UAP
March 31