在Xbox UWP中禁用webview的指针模式

时间:2016-07-29 06:31:36

标签: xaml uwp windows-10 windows-10-universal xbox-one

有没有办法在Xbox UWP应用中禁用f1 <- function(n) { g <- sample_smallworld(1, n, 10, 0.05) E(g)$weight <- (runif(n*10)+0.1)*10 system.time(eccentricity(g)) } f2 <- function(n) { g <- sample_smallworld(1, n, 10, 0.05) E(g)$weight <- (runif(n*10)+0.1)*10 system.time(distances(g)) } f3 <- function(n) { g <- sample_smallworld(1, n, 10, 0.05) tmp <- (runif(n*10)+0.1)*10 system.time(eccentricity(g)) } f4 <- function(n) { g <- sample_smallworld(1, n, 10, 0.05) tmp <- (runif(n*10)+0.1)*10 system.time(distances(g)) } t1 <- sapply((10:60)*50, function(x){f1(x)[3]}) t2 <- sapply((10:60)*50, function(x){f2(x)[3]}) t3 <- sapply((10:60)*50, function(x){f3(x)[3]}) t4 <- sapply((10:60)*50, function(x){f4(x)[3]}) d <- data.frame(x = (10:60)*50, t1, t2, t3, t4) ggplot(d, aes(x = x))+ geom_line(aes(y = t1, col = "'Weighted' eccentricity"))+ geom_line(aes(y = t2, col = "Weighted distances"))+ geom_line(aes(y = t3, col = "Unweighted eccentricity"))+ geom_line(aes(y = t4, col = "Unweighted distances")) + scale_x_continuous(name = "Number of Nodes") + scale_y_continuous(name = "Time (s)") 的指针模式?我无法使用WebView属性,因为RequiresPointer已从WebView扩展而非FrameworkElement

这是我的示例XAML:

Control

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

我提供了

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

位于页面级 RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested; App.xaml.cs

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

enter image description here

1 个答案:

答案 0 :(得分:0)

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

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