Your project manager brings you a new USB gamepad, similar to the one used by Sony Playstation 3 game console. He wants to control the Invaders 2D game using the gamepad's right mini stick.
Note
We cannot use DirectX to access DirectInput in Silverlight. We cannot access the gamepad driver either. Therefore, we have to use a feature provided by most gamepad drivers, the keyboard and mouse mode.
We have to configure the gamepad driver to map four gamepad keys to the keyboard's cursor movement keys:
Note
You need a USB gamepad with 4 axis and 2 mini sticks in order to complete the following exercises.
1. Connect the USB gamepad to the computer and install its driver if you have not already done so.
2. Go to Control Panel | Game Controllers. Select the gamepad in the game controllers list and click on Properties (some drivers show the generic name USB Network Joystick). A dialog box will show the buttons for the gamepad, the mini sticks axis, and...