Skip to main content

Windows Dev Center

PnpObjectWatcher.Added | added event

Occurs when a PnpObject is added to the collection enumerated by the PnpObjectWatcher.

Syntax


function onAdded(eventArgs) { /* Your code */ }
 
// addEventListener syntax
pnpObjectWatcher.addEventListener("added", onAdded);
pnpObjectWatcher.removeEventListener("added", onAdded);
 
- or -

pnpObjectWatcher.onadded = onAdded;

public event TypedEventHandler<PnpObjectWatcher, PnpObject> Added

Public Event Added As TypedEventHandler(Of PnpObjectWatcher, PnpObject)

public:
event TypedEventHandler<PnpObjectWatcher, PnpObject>^ Added {
   Windows::Foundation::EventRegistrationToken add(TypedEventHandler<PnpObjectWatcher, PnpObject>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}

Event information

Delegate TypedEventHandler<PnpObjectWatcher, PnpObject>

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Devices.Enumeration.Pnp
Windows::Devices::Enumeration::Pnp [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.Pnp
Windows::Devices::Enumeration::Pnp [C++]

Metadata

Windows.winmd

See also

PnpObjectWatcher