Gamepad.GamepadAdded Kejadian
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Memberi sinyal ketika gamepad baru terhubung.
// 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)
Jenis Acara
Keterangan
Untuk mengidentifikasi pengontrol yang telah ditambahkan, Anda meminta daftar pengontrol yang terhubung menggunakan Gamepad.Gamepads.