
I have to admit right from the start that the idea is not originally mine, however the source code is not provided by the original author. You can go and read Jose Fajardo's article here. I have made some changes and I will be discussing those here.
I have always tried to create better backgrounds with each Silverlight application that I have done. This is the first one that I have created that uses more than Dispatch Timers and Storyboards, this one reacts to the movements that the user is doing with his/her mouse.
Being the World Cup 2010, I have made a XAML copy of Zakumi which is used in this sample.
The changes I have made, from what I understood the original author was saying in his article, were to enable me to reuse the background components in a more managable way. This included creating a base class for the shapes that are displayed in the layered background so that I can change the shape that is displayed on the background by changing a parameter, instead of having to create a whole page for each set of shapes.
I intend to use this mechanism for the backgrounds in the public release of the Genesis Smart Client Framework v2.0 (Project Ruby) which I am currently busy developing. It is being developed using PRISM and is available here, it is currently still in early development and all that is available is the base Shell implementation required by PRISM before you can start developing modules. I recommend anybody to have a look at changeset 46607 if you are interested in learning about PRISM, or if you want a standard PRISM shell so that you can get on with developing modules.
I have also created a storyboard to animate the gradient colour of the background flashing the 6 colours of the South African Flag in honour of the World Cup 2010.
This sample was developed using Visual Studio 2010, Expression Blend 4 RC, Silverlight 4, C# and XAML.
Read the whole article here