Triggering the Animation With Code
If you were to build your application right now you still would not see the animation. This is because in Blend, you need to specifically trigger animations to see them. Luckily, this is fairly easy. You will now create event handlers for two events, the first is when the page is loaded; you want the storyboard with the fade-in/Fade-out text to play. The second event is when the user clicks on the ball to start the game; you want the storyboard to stop.
In the Objects and Timeline Panel, click the UserControl element. Then in the Properties panel, click the Events icon to view the list of events.
Double-click inside the Loaded event and you will be sent to the code-behind file for the page.
It is here you will need to add the necessary code to play the animation.
In the constructor that appears, type the following code (or follow the cues from the Intellisense) this.GameBegin.Begin();
Return to Mainpage.xaml and click the ball to select it. In the Properties panel, click the Events icon and double-click in the MouseLeftButtonDown field to open the Code-Behind file.
Here type the following code (or follow the cues from Intellisense) this.gameBegin.Stop();
Press f5 to build your project. The beginning animation will loop continuously until you click the ball, then it disappears.