Now, we are going to create a new
UserControl to display the remaining lives in a gauge. We will use the previously created
ScoreGauge as a baseline to create this new gauge, making many changes. We will use our well-known blue alien as an icon to specify the remaining lives.
3DInvadersSilverlightin Visual Studio or Visual C#.
ScoreGauge.xaml. Instead of using
BonusGaugeas the new name, use
LifeGauge.xaml.cs(the C# code for
LifeGauge.xaml) and replace the text
LifeGaugein the first lines that define the class and the constructor, as shown in the following:
public partial class LifeGauge ...