GameList.GameAdded 事件

定义

指示已将新的 GameListEntry 添加到 GameList

public:
 static event GameListChangedEventHandler ^ GameAdded;
// Register
static event_token GameAdded(GameListChangedEventHandler const& handler) const;

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

// Revoke with event_revoker
static GameList::GameAdded_revoker GameAdded(auto_revoke_t, GameListChangedEventHandler const& handler) const;
public static event GameListChangedEventHandler GameAdded;
function onGameAdded(eventArgs) { /* Your code */ }
Windows.Gaming.Preview.GamesEnumeration.GameList.addEventListener("gameadded", onGameAdded);
Windows.Gaming.Preview.GamesEnumeration.GameList.removeEventListener("gameadded", onGameAdded);
- or -
Windows.Gaming.Preview.GamesEnumeration.GameList.ongameadded = onGameAdded;
Public Shared Custom Event GameAdded As GameListChangedEventHandler 

事件类型

Windows 要求

应用功能
gameList

注解

此 API 并非适用于所有应用。 除非你的开发人员帐户由 Microsoft 专门预配,否则对这些 API 的调用将在运行时失败。

适用于