I am wondering how I am supposed to handle input for UWP apps targeting Xbox One. I have noticed DirectInput, but I see two issues with it for my use cases:
Take a look at the Windows.Gaming.Input namespace. Its GamePad class is in the Universal API contract and available on all device families and languages.
To back @Rob Caplan - MSFT with a source, this blog from the Microsoft Developer Network states:
Windows 10: 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. Note that existing XInput-based Windows Store applications can link against xinputuap.lib which is an adapter for the new API for universal Windows apps--this adapter does not exist headset audio either.
DirectX and all of its API's (Direct2d, Direct3D, Xinput, etc...) are only supported on C / C++
Only natively supported, yes, but implementing DirectInput from C# is trivial using SharpDX
However, DirectInput is not much use for reading XB controllers as the trigger axes are merged into one, and it's impossible to differentiate between no triggers held and both triggers held.