共用方式為


ArcadeStick.ArcadeStickAdded 事件

定義

當新的電動搖桿連線時發出訊號。

// Register
static event_token ArcadeStickAdded(EventHandler<ArcadeStick> const& handler) const;

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

// Revoke with event_revoker
static ArcadeStick::ArcadeStickAdded_revoker ArcadeStickAdded(auto_revoke_t, EventHandler<ArcadeStick> const& handler) const;
public static event System.EventHandler<ArcadeStick> ArcadeStickAdded;
function onArcadeStickAdded(eventArgs) { /* Your code */ }
Windows.Gaming.Input.ArcadeStick.addEventListener("arcadestickadded", onArcadeStickAdded);
Windows.Gaming.Input.ArcadeStick.removeEventListener("arcadestickadded", onArcadeStickAdded);
- or -
Windows.Gaming.Input.ArcadeStick.onarcadestickadded = onArcadeStickAdded;
Public Shared Custom Event ArcadeStickAdded As EventHandler(Of ArcadeStick) 

事件類型

備註

若要識別已新增的控制器,您可以使用 ArcadeStick.ArcadeSticks查詢連線控制器清單。

適用於