O'Reilly logo

3D Game Development with Microsoft Silverlight 3 Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action—building and running Silverlight applications

Now, you want to see the ghost moving on the screen while the mouse pointer changes its position. In order to do this, we must add some code to show the ghost and to move it. We will add both XAML and C# code as follows:

  1. Stay in the SilverlightMonster project.
  2. Open the XAML code for MainPage.xaml (double-click on it in the Solution Explorer) and replace the existing code with the following:
    <UserControl x:Class="SilverlightMonster.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml /presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Cursor="None" Width="1366" Height="768" MouseMove="Ghost_MouseMove" xmlns:SilverlightMonster="clr-namespace:SilverlightMonster"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required