GamePad Class (Microsoft.Xna.Framework.Input)

Supports querying the game controllers and setting the vibration motors.
System.Object
   Microsoft.Xna.Framework.Input.GamePad

Namespace: Microsoft.Xna.Framework.Input
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public static class GamePad

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The GamePad type exposes the following members.

  Platforms Name Description
MaximumGamePadCount The maximum number of game pads supported on this system. Attempting to access a gamepad index higher than this number will result in an System.InvalidOperationException being thrown by the API. 
Top
  Platforms Name Description
GetCapabilities(PlayerIndex) Returns the capabilites of the connected controller. 
GetCapabilities(int) Returns the capabilites of the connected controller. 
GetState(PlayerIndex) Gets the current state of a game pad controller with an independent axes dead zone. 
GetState(int) Gets the current state of a game pad controller with an independent axes dead zone. 
GetState(PlayerIndex, GamePadDeadZone) Gets the current state of a game pad controller, using a specified dead zone on analog stick positions. 
GetState(int, GamePadDeadZone) Gets the current state of a game pad controller, using a specified dead zone on analog stick positions. 
GetState(PlayerIndex, GamePadDeadZone, GamePadDeadZone) Gets the current state of a game pad controller, using a specified dead zone on analog stick positions. 
GetState(int, GamePadDeadZone, GamePadDeadZone) Gets the current state of a game pad controller, using a specified dead zone on analog stick positions. 
InitDatabase  
SetVibration(PlayerIndex, float, float) Sets the vibration motor speeds on the controller device if supported. 
SetVibration(PlayerIndex, float, float, float, float) Sets the vibration motor speeds on the controller device if supported. 
SetVibration(int, float, float) Sets the vibration motor speeds on the controller device if supported. 
SetVibration(int, float, float, float, float) Sets the vibration motor speeds on the controller device if supported. 
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web