GamePadState Members

The following tables list the members exposed by the GamePadState type.

Public Constructors

Name Description
Public Method GamePadState Overloaded. Initializes a new instance of the GamePadState class.

Public Properties

Name Description
Public Property Buttons Returns a structure that identifies what buttons on the Xbox 360 controller are pressed.
Public Property DPad Returns a structure that identifies what directions of the directional pad on the Xbox 360 Controller are pressed.
Public Property IsConnected Indicates whether the Xbox 360 Controller is connected.
Public Property PacketNumber Gets the packet number associated with this state.
Public Property ThumbSticks Returns a structure that indicates the position of the Xbox 360 Controller sticks (thumbsticks).
Public Property Triggers Returns a structure that identifies the position of triggers on the Xbox 360 controller.

Public Methods

Name Description
Public Method Equals Returns a value that indicates whether the current instance is equal to a specified object.
Public Method GetHashCode Gets the hash code for this instance.
Public Method GetType (Inherited from Object.)
Public Method IsButtonDown Determines whether specified input device buttons are pressed in this GamePadState.
Public Method IsButtonUp Determines whether specified input device buttons are up (not pressed) in this GamePadState.
Public Method Static op_Equality Determines whether two GamePadState instances are equal.
Public Method Static op_Inequality Determines whether two GamePadState instances are not equal.
Public Method ToString Retrieves a string representation of this object.

Protected Methods

Name Description
Protected Method Finalize (Inherited from Object.)
Protected Method MemberwiseClone (Inherited from Object.)

See Also

Tasks

Detecting Xbox 360 Controller Button Presses (Xbox 360, Windows)
Determining If an Xbox 360 Controller Is Disconnected (Xbox 360, Windows)

Concepts

Overview of User Input and Input Devices

Reference

GamePadState Structure
Microsoft.Xna.Framework.Input Namespace