Gamepad.GamepadRemoved 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当游戏板断开连接时发出信号。
// Register
static event_token GamepadRemoved(EventHandler<Gamepad> const& handler) const;
// Revoke with event_token
static void GamepadRemoved(event_token const* cookie) const;
// Revoke with event_revoker
static Gamepad::GamepadRemoved_revoker GamepadRemoved(auto_revoke_t, EventHandler<Gamepad> const& handler) const;
public static event System.EventHandler<Gamepad> GamepadRemoved;
function onGamepadRemoved(eventArgs) { /* Your code */ }
Windows.Gaming.Input.Gamepad.addEventListener("gamepadremoved", onGamepadRemoved);
Windows.Gaming.Input.Gamepad.removeEventListener("gamepadremoved", onGamepadRemoved);
- or -
Windows.Gaming.Input.Gamepad.ongamepadremoved = onGamepadRemoved;
Public Shared Custom Event GamepadRemoved As EventHandler(Of Gamepad)