GamePadCapabilities.IsConnected Property

Indicates whether the Xbox 360 Controller is connected.

Namespace: Microsoft.Xna.Framework.Input
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public bool IsConnected { get; }

Property Value

true if the controller is connected; false otherwise.

Remarks

When calling GetState or GetCapabilities, check the returned structure's IsConnected property value. If the controller has been disconnected, this value will be false. When a controller is disconnected, values for its state and/or capabilities will not be valid. The controller will also not be able to receive new vibration settings.

See Also

Reference

GamePadCapabilities Structure
GamePadCapabilities Members
Microsoft.Xna.Framework.Input Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista