是否可以在桌面上测试 XYFocus?
Is it possible to test XYFocus on Desktop?
我正在为 Xbox 开发一个应用程序,它使用 XYFocus 导航。有没有办法在桌面上测试它?
我希望箭头键的行为与 Xbox 控制器导航按钮类似,但事实并非如此。
如果您使用 XYFocus 相关属性,例如 XYFocusDown
, XYFocusLeft
等,这些属性仅在 Xbox 设备系列上受支持,并且仅在使用游戏手柄或遥控器时受支持。在这种情况下,您定义的这些 XY 焦点导航行为将不会在带有键盘的桌面上生效。
根据 XY focus navigation and interaction 部分,
If your app supports proper focus navigation for keyboard, this will translate well to gamepad and remote control. Navigation with the arrow keys is mapped to the D-pad (as well as the left stick on gamepad). Many events and properties are used by both keyboard and gamepad—they both fire KeyDown and KeyUp events.
以便使用 XYFocus 导航策略属性 XYFocusDownNavigationStrategy
,XYFocusLeftNavigationStrategy
,
根据箭头键指定哪个控件应获得焦点 pressed.These 导航策略适用于键盘、游戏手柄和遥控器。更多详情请参考Focus navigation with keyboard, gamepad, and accessibility tools.
我正在为 Xbox 开发一个应用程序,它使用 XYFocus 导航。有没有办法在桌面上测试它?
我希望箭头键的行为与 Xbox 控制器导航按钮类似,但事实并非如此。
如果您使用 XYFocus 相关属性,例如 XYFocusDown
, XYFocusLeft
等,这些属性仅在 Xbox 设备系列上受支持,并且仅在使用游戏手柄或遥控器时受支持。在这种情况下,您定义的这些 XY 焦点导航行为将不会在带有键盘的桌面上生效。
根据 XY focus navigation and interaction 部分,
If your app supports proper focus navigation for keyboard, this will translate well to gamepad and remote control. Navigation with the arrow keys is mapped to the D-pad (as well as the left stick on gamepad). Many events and properties are used by both keyboard and gamepad—they both fire KeyDown and KeyUp events.
以便使用 XYFocus 导航策略属性 XYFocusDownNavigationStrategy
,XYFocusLeftNavigationStrategy
,
根据箭头键指定哪个控件应获得焦点 pressed.These 导航策略适用于键盘、游戏手柄和遥控器。更多详情请参考Focus navigation with keyboard, gamepad, and accessibility tools.