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 score gauge showing text

Now, we are going to create a new UserControl to display a score gauge. In this case, we will use 2D gauges. Later, we will have to use this UserControl in the 3D scene.

  1. Open the project 3DInvadersSilverlight in Expression Blend.
  2. Click on 3DInvadersSilverlight in the Projects palette.
  3. Select File | New Item... from the main menu. A dialog box will appear.
  4. Select UserControl in the list, enter the name ScoreGauge for this new UserControl and click on OK. A new item will be added to the 3DInvadersSilverlight project, named ScoreGauge.xaml.
  5. Change the LayoutRoot Grid size properties:
    • Width: 300
    • Height: 49
  6. Draw a rectangle aligned to the LayoutRoot Grid's borders.
  7. Click on Brushes | Fill | Gradient brush ...

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