Delen via


HolographicSpace.UserPresenceChanged Event

Definition

Occurs when the user's presence within the headset or ability to view and interact with this HolographicSpace changes.

// Register
event_token UserPresenceChanged(TypedEventHandler<HolographicSpace, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
HolographicSpace::UserPresenceChanged_revoker UserPresenceChanged(auto_revoke_t, TypedEventHandler<HolographicSpace, IInspectable const&> const& handler) const;
public event TypedEventHandler<HolographicSpace,object> UserPresenceChanged;
function onUserPresenceChanged(eventArgs) { /* Your code */ }
holographicSpace.addEventListener("userpresencechanged", onUserPresenceChanged);
holographicSpace.removeEventListener("userpresencechanged", onUserPresenceChanged);
- or -
holographicSpace.onuserpresencechanged = onUserPresenceChanged;
Public Custom Event UserPresenceChanged As TypedEventHandler(Of HolographicSpace, Object) 

Event Type

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)

Remarks

Note that a HolographicSpace's user presence can change when this HolographicSpace is activated or deactivated or when a modal popup appears or disappears, even while the user remains within the headset.

Applies to