다음을 통해 공유


Gamepad.GamepadAdded 이벤트

정의

새 게임 패드가 연결되면 신호를 보냅니다.

// Register
static event_token GamepadAdded(EventHandler<Gamepad> const& handler) const;

// Revoke with event_token
static void GamepadAdded(event_token const* cookie) const;

// Revoke with event_revoker
static Gamepad::GamepadAdded_revoker GamepadAdded(auto_revoke_t, EventHandler<Gamepad> const& handler) const;
public static event System.EventHandler<Gamepad> GamepadAdded;
function onGamepadAdded(eventArgs) { /* Your code */ }
Windows.Gaming.Input.Gamepad.addEventListener("gamepadadded", onGamepadAdded);
Windows.Gaming.Input.Gamepad.removeEventListener("gamepadadded", onGamepadAdded);
- or -
Windows.Gaming.Input.Gamepad.ongamepadadded = onGamepadAdded;
Public Shared Custom Event GamepadAdded As EventHandler(Of Gamepad) 

이벤트 유형

설명

이미 추가된 컨트롤러를 식별하려면 Gamepad.Gamepads를 사용하여 연결된 컨트롤러 목록을 쿼리합니다.

적용 대상