1

有没有办法WebView在 Xbox UWP 应用中禁用指针模式?我不能使用该RequiresPointer属性,因为它是从而不是从WebView扩展的。FrameworkElementControl

这是我的示例 XAML:

  <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <WebView Source="http://stackoverflow.com/" Height="300" Width="500" />
  </Grid>

请找到下图中标记的指针。

我提供了

 RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested;

App.xaml.cs页面RequiresPointer = RequiresPointer.Never;级别。

如何避免指针并使用控制器按钮进行滚动?

在此处输入图像描述

4

1 回答 1

2

WebView 的内容需要说它支持游戏手柄控制而不是默认为鼠标仿真(docs):
navigator.gamepadInputEmulation = "gamepad";

然后您需要使用 Gamepad API:
https ://docs.microsoft.com/en-us/microsoft-edge/dev-guide/dom/gamepad-api

于 2017-03-27T16:46:11.463 回答