PnpObjectWatcher.Stopped 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重要
我们不再建议使用 Windows.Devices.Enumeration.Pnp 命名空间中的类型。 相反,Windows.Devices.Enumeration 命名空间中的类型实现了 Windows.Devices.Enumeration.Pnp 功能的新式且维护得更好的超集。
PnpObjectType 的替代方法是 Windows.Devices.Enumeration.DeviceInformationKind 枚举,你可以将其作为参数传递给 Windows.Devices.Enumeration API。 例如,创建 PnpObjectWatcher 时不使用 PnpObjectType,而是在创建 DeviceWatcher 时使用 DeviceInformationKind。
当 PnpObjectWatcher 已停止监视对 Pnp 设备对象集合的更改时发生。
// Register
event_token Stopped(TypedEventHandler<PnpObjectWatcher, IInspectable const&> const& handler) const;
// Revoke with event_token
void Stopped(event_token const* cookie) const;
// Revoke with event_revoker
PnpObjectWatcher::Stopped_revoker Stopped(auto_revoke_t, TypedEventHandler<PnpObjectWatcher, IInspectable const&> const& handler) const;
public event TypedEventHandler<PnpObjectWatcher,object> Stopped;
function onStopped(eventArgs) { /* Your code */ }
pnpObjectWatcher.addEventListener("stopped", onStopped);
pnpObjectWatcher.removeEventListener("stopped", onStopped);
- or -
pnpObjectWatcher.onstopped = onStopped;
Public Custom Event Stopped As TypedEventHandler(Of PnpObjectWatcher, Object)
事件类型
TypedEventHandler<PnpObjectWatcher,IInspectable>
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈