Skip to main content

Windows Dev Center

DeviceWatcher.Updated | updated event

Event that is raised when a device is updated in the collection of enumerated devices.

Syntax


function onUpdated(eventArgs) { /* Your code */ }
 
// addEventListener syntax
deviceWatcher.addEventListener("updated", onUpdated);
deviceWatcher.removeEventListener("updated", onUpdated);
 
- or -

deviceWatcher.onupdated = onUpdated;

public event TypedEventHandler<DeviceWatcher, DeviceInformationUpdate> Updated

Public Event Updated As TypedEventHandler(Of DeviceWatcher, DeviceInformationUpdate)

public:
event TypedEventHandler<DeviceWatcher, DeviceInformationUpdate>^ Updated {
   Windows::Foundation::EventRegistrationToken add(TypedEventHandler<DeviceWatcher, DeviceInformationUpdate>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}

Event information

Delegate TypedEventHandler<DeviceWatcher, DeviceInformationUpdate>

Remarks

Note  An app must subscribe to all of the added, removed, and updated events to be notified when there are device additions, removals or updates. If an app handles only the added event, it will not receive an update if a device is added to the system after the initial device enumeration completes.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Devices.Enumeration
Windows::Devices::Enumeration [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Devices.Enumeration
Windows::Devices::Enumeration [C++]

Metadata

Windows.winmd

See also

DeviceWatcher