Time for action—solving navigation problemsTime for action—solving navigation problems
When the game starts, there is an undesired side effect. The projected video appears in the right background, as shown in the following screenshot:
This usually happens when working with projections. Now, we are going to solve this small problem:
1. Stay in the 3DInvadersSilverlight
project.
2. Open MainPage.xaml.cs
and add the following line before the first one in the medIntroduction_MediaEnded
method:
3. Build and run the solution. Click on the button and after the video reproduction and animation, the game will start without the undesired background, as shown in the following screenshot:
Now, once the video finishes its reproduction and associated animation, we have hidden the Canvas
that contains it. Hence, there are no parts of the previous animation visible when the game starts.