SystemSetupInfo.OutOfBoxExperienceStateChanged 事件

定义

当现成体验生命周期的当前阶段 (OOBE) 更改时引发。

// Register
static event_token OutOfBoxExperienceStateChanged(EventHandler<IInspectable> const& handler) const;

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

// Revoke with event_revoker
static SystemSetupInfo::OutOfBoxExperienceStateChanged_revoker OutOfBoxExperienceStateChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> OutOfBoxExperienceStateChanged;
function onOutOfBoxExperienceStateChanged(eventArgs) { /* Your code */ }
Windows.System.Profile.SystemSetupInfo.addEventListener("outofboxexperiencestatechanged", onOutOfBoxExperienceStateChanged);
Windows.System.Profile.SystemSetupInfo.removeEventListener("outofboxexperiencestatechanged", onOutOfBoxExperienceStateChanged);
- or -
Windows.System.Profile.SystemSetupInfo.onoutofboxexperiencestatechanged = onOutOfBoxExperienceStateChanged;
Public Shared Custom Event OutOfBoxExperienceStateChanged As EventHandler(Of Object) 

事件类型

示例

请参阅 SystemSetupInfo

注解

可以保证订阅者在注册时至少引发一次事件,即使 OOBE 状态永远不会更改。 这避免了在查询状态和注册状态更改之间可能会丢失事件的时间窗口。

适用于

另请参阅