Home > .net, Silverlight > Silverlight Snow Storm – Merry X-mas & Happy New Year

Silverlight Snow Storm – Merry X-mas & Happy New Year

December 14th, 2009

Here is a small demo with source code of a Silverlight Snow Storm with sticky snow.
The application displays a maximum of 1500 snow flake controls. When the maximum is reached the old snow flakes melt and are reused.
I am using Andy Beaulieu’s Improved HitTest method (again) to test if the snow flakes hit the text (converted to path).

Have fun!

Download the source code

.net, Silverlight

  1. December 14th, 2009 at 09:36 | #1

    Very nice! Great work!

    I wonder if it might be possible to increase the amount of snowflakes (for a blizzard effect!) by implementing each flake as a UIElement each with a transform applied (the path of which gets randomized on load)instead of each flake being a control. I wonder what the difference in memory usage/overheads/performance would be like…

  2. John Bruin
    admin
    December 14th, 2009 at 10:22 | #2

    Thanks Jim! You are welcome to pick up the code and experiment with it…
    You have still 10 days left until X-mas ;)

  3. December 24th, 2009 at 18:46 | #3

    Hey John, this looks very nice. Just one small comment : when I rotate the text (Path) a bit counterclockwise (in Expression Blend), the snow does not ‘stick’ to the top of the letters “New Year”. That’s all. Great work!

  1. December 14th, 2009 at 00:42 | #1
  2. December 14th, 2009 at 08:49 | #2
  3. December 24th, 2009 at 18:41 | #3