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—displaying images and sprites

First, we are going to display the raster images and give them life by transforming them into our first sprites. We are going to add some code, which we will improve later:

  1. Stay in the SilverlightInvaders2D project.
  2. Open the XAML code for MainPage.xaml and replace the existing code with the following. (You will see a button and the aliens aligned in five rows in the preview, as shown in the screenshot after the code.)
    <UserControl x:Class="SilverlightInvaders2D.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml /presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="1366" Height="768" xmlns:SilverlightInvaders2D= "clr-namespace:SilverlightInvaders2D"> <Canvas x:Name="LayoutRoot" ...

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