UINavigationController 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示可用于 UI 导航的任何类型的控制器。 大多数游戏板、街机摇杆和赛车方向盘也可以作为 UINavigationController 进行访问。 建议游戏在玩游戏期间使用特定于控制器的类,对 UI 菜单使用 UINavigationController 类。
public ref class UINavigationController sealed
public ref class UINavigationController sealed : IGameControllerBatteryInfo
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UINavigationController final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UINavigationController final : IGameControllerBatteryInfo
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class UINavigationController
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class UINavigationController : IGameControllerBatteryInfo
Public NotInheritable Class UINavigationController
Public NotInheritable Class UINavigationController
Implements IGameControllerBatteryInfo
- 继承
- 属性
- 实现
Windows 要求
| 要求 | 说明 |
|---|---|
| 设备系列 |
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
|
| API contract |
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)
|
注解
版本历史记录
| Windows 版本 | SDK 版本 | 增值 |
|---|---|---|
| 1703 | 15063 | FromGameController |
| 1703 | 15063 | TryGetBatteryReport |
属性
| 名称 | 说明 |
|---|---|
| Headset |
连接到 UI 导航控制器的音频耳机。 |
| IsWireless |
获取一个值,该值指示 UI 导航控制器的无线状态。 |
| UINavigationControllers |
所有连接的 UI 导航控制器的列表。 |
| User |
与 UI 导航控制器关联的用户。 |
方法
| 名称 | 说明 |
|---|---|
| FromGameController(IGameController) |
返回给定的游戏控制器作为 UI 导航控制器。 |
| GetCurrentReading() |
获取 UI 导航控制器状态的快照。 |
| GetOptionalButtonLabel(OptionalUINavigationButtons) |
检索可选 UI 导航按钮的标签。 |
| GetRequiredButtonLabel(RequiredUINavigationButtons) |
检索所需 UI 导航按钮的标签。 |
| TryGetBatteryReport() |
获取有关 UI 导航控制器的当前电池状态的信息。 |
活动
| 名称 | 说明 |
|---|---|
| HeadsetConnected |
当头戴显示设备连接到 UI 导航控制器时发出信号。 |
| HeadsetDisconnected |
当头戴显示设备与 UI 导航控制器断开连接时发出信号。 |
| UINavigationControllerAdded |
连接新的 UI 导航控制器时发出信号。 |
| UINavigationControllerRemoved |
当 UI 导航控制器断开连接时发出信号。 |
| UserChanged |
与 UI 导航控制器关联的用户发生更改时发出信号。 |