Reputation: 35
I am trying to enable mouse mode on the root Page element in a Blank App (C++/WinRT) project. I have an Xbox 1 controller attached to a Xbox 1 usb dongle. So far I have coded a small xaml file with a number of different controls. When I run it, the app recognizes the controller for XY Focus Navigation, mouse pointer input from my mouse, and keyboard input (when I press tab, control focus changes from one control to the next).
I have read all the msdn documents for Gamepad control (I think). I have tried implementing mouse mode using the statements provided at https://learn.microsoft.com/en-us/windows/apps/design/input/gamepad-and-remote-interactions#mouse-mode:
this->InitializeComponent();
this->RequiresPointerMode(winrt::Windows::UI::Xaml::ApplicationRequiresPointerMode::WhenRequested);
Suspending({ this, &App::OnSuspending });
as well as adding the proper RequiresPointer property to the Page element in xaml:
RequiresPointer="WhenFocused"
I believe it is simply a matter of changing to mouse mode, but maybe I am wrong. Like I said at top, when the app runs, XY Focus Navigation works. I am hoping to be able to have the xbox controller's left thumbstick move the pointer in the same fashion that the mouse moves the pointer. Am I missing something else?
Upvotes: 0
Views: 42