DeviceWatcher.Removed 事件

定義

從列舉裝置集合中移除裝置時所引發的事件。

// Register
event_token Removed(TypedEventHandler<DeviceWatcher, DeviceInformationUpdate const&> const& handler) const;

// Revoke with event_token
void Removed(event_token const* cookie) const;

// Revoke with event_revoker
DeviceWatcher::Removed_revoker Removed(auto_revoke_t, TypedEventHandler<DeviceWatcher, DeviceInformationUpdate const&> const& handler) const;
public event TypedEventHandler<DeviceWatcher,DeviceInformationUpdate> Removed;
function onRemoved(eventArgs) { /* Your code */ }
deviceWatcher.addEventListener("removed", onRemoved);
deviceWatcher.removeEventListener("removed", onRemoved);
- or -
deviceWatcher.onremoved = onRemoved;
Public Custom Event Removed As TypedEventHandler(Of DeviceWatcher, DeviceInformationUpdate) 

事件類型

備註

注意

當有裝置新增、移除或更新時,應用程式必須訂閱所有 新增、移除和 更新 的事件。 如果應用程式只處理 新增 的事件,如果在初始裝置列舉完成之後將裝置新增至系統,它就不會收到更新。

適用於

另請參閱