0

I have been trying to make an Xbox One controller interact with a UWP application and have looked into the Gamepad class (based on the suggestions mentioned in the comments - Controller support for Xbox one in Windows UWP). I have 2 issues:

1) Gamepad.Gamepads.Count returns 0 for me even when I have my Xbox One controller switched on while the application is running on Xbox.

2) I do not know, how exactly can I assess when the A, B, X and Y buttons are pressed and also access the coordinates of the Left and Right Thumbsticks.

Any guidance about the 2 points mentioned above, would be very helpful for me. Thanks!

Edit: I have been getting an exception of type "System.InvalidOperationException" in System.Linq.dll when I use Gamepad.Gamepads.First() in the MainPage method in MainPage.xaml.cs

Community
  • 1
  • 1
Dhruv
  • 117
  • 9
  • If you're building a UWP app, you should get default controller support for free. Are you trying to customize how the controller buttons are handled? – casablanca Jun 03 '16 at 05:01
  • Yes I am. Hence I was trying to figure out how to access the thumbstick coordinates and also how to assess when a particular button is pressed. – Dhruv Jun 03 '16 at 06:14
  • I am getting an exception of type "System.InvalidOperationExeption" in System.Linq.dll when I try to use the Gamepad class in the MainPage method in MainPage.xaml.cs – Dhruv Jun 06 '16 at 15:32

0 Answers0