How to reference the Windows.Gaming.Input namespace

We are looking for the namespace Windows.Gaming.Input , but it’s hard for me. What should I refer to in order to access this? MSDN literally did not help in this matter. https://msdn.microsoft.com/en-us/library/windows/apps/windows.gaming.input.aspx

It is worth noting that I already included WindowsBase and System.Windows , thinking that they might be there. Bad luck.

Also tried:

  • C # UWP application
  • C ++ DirectX UWP Application

None of them will resolve the namespace.

+5
source share
1 answer

Windows.Gaming.Input is a UWP namespace, to use it you need to create a UWP application. From your question (you included WindowsBase and System.Windows ), it looks like you created a WPF application, which is not the case.

You can create a UWP project with New -> Project -> Visual C# -> Windows -> Universal for a C # project and Other Languages -> Visual C++ -> Windows -> Universal for a C ++ project.

After that, it should work fine.

enter image description here

0
source

Source: https://habr.com/ru/post/1247364/


All Articles