GamePadState Members

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

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 Overloaded. 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 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 ReferenceEquals (Inherited from Object.)
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

How to: Detect Whether a Controller Button Is Pressed
How to: Detect Whether a Controller Is Disconnected

Concepts

Input Overview

Reference

GamePadState Structure
Microsoft.Xna.Framework.Input Namespace