Udostępnij za pośrednictwem


UserWatcher Class

Definition

Provides events that fire during enumeration of users, when the collection of users changes, or when a user's authentication status changes.

public ref class UserWatcher sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class UserWatcher final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class UserWatcher
Public NotInheritable Class UserWatcher
Inheritance
Object Platform::Object IInspectable UserWatcher
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

Status

Gets the status of a user watcher.

Methods

Start()

Starts the user watcher.

Stop()

Stops the user watcher.

Events

Added

Fires when a user is added to the collection of users returned by User.FindAllAsync.

AuthenticationStatusChanged

Fires when a user's authentication status has changed.

AuthenticationStatusChanging

Fires when a user's authentication status is about to change.

EnumerationCompleted

Fires when the initial pass of watcher events has been processed and the collection of users is complete.

Removed

Fires when a user is removed from the collection of users returned by User.FindAllAsync.

Stopped

Fires when the user watcher has stopped.

Updated

Fires when the data associated with a user has changed.

Applies to