I am trying to create an UWP app that uses xinput. Trying to get input from a controller using a WPF app , all good. Trying the same code in a UWP app nothing. Am I doing something wrong or xinput really doesn't work with UWP.
There is a new WinRT API in the Windows.Gaming.Input namespace for universal Windows apps. This API supports both the Xbox 360 Common Controller and the Xbox One controller, including access to the left/right trigger motors. The latest version of GamePad is implemented using this new API when built for Windows 10. You can refer to MSDN for Windows.Gaming.Input namespace.
As about XInput: For UWP, you can continue to use the XInput 1.4 API but need to change from linking to xinput.lib to xinputuap.lib, which is an adapter for the new API for universal Windows apps--this adapter does not exist headset audio either. This blog may help you.