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—creating a bonus gauge showing text

Now, we are going to create a new UserControl to display a bonus gauge. In this case, we will use the previously created ScoreGauge as a baseline to create this new gauge, making a few small changes.

  1. Open the project 3DInvadersSilverlight in Visual Studio or Visual C#.
  2. Select ScoreGauge.xaml in the Solution Explorer.
  3. Copy and paste the ScoreGauge.xaml. The IDE will add an item named Copy of ScoreGauge.xaml.
  4. Select the new item (Copy of ScoreGauge.xaml) in the Solution Explorer.
  5. Rename it to BonusGauge.xaml.
  6. Open BonusGauge.xaml (the XAML code) and replace the text ScoreGauge with BonusGauge, as shown in the following line:
    x:Class="_3DInvadersSilverlight.BonusGauge"
    
  7. Replace the text tbkScore with ...

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