Dela via


UserInformation.AccountPictureChanged Event

Definition

Occurs when the user's image or name changes.

Important

The UserInformation class is not supported on Windows 10 or later. Use the User class instead. See Remarks in the UserInformation class documentation.

// Register
static event_token AccountPictureChanged(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void AccountPictureChanged(event_token const* cookie) const;

// Revoke with event_revoker
static UserInformation::AccountPictureChanged_revoker AccountPictureChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")]
// Register
static event_token AccountPictureChanged(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void AccountPictureChanged(event_token const* cookie) const;

// Revoke with event_revoker
static UserInformation::AccountPictureChanged_revoker AccountPictureChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> AccountPictureChanged;
[add: Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")]
[remove: Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")]
public static event System.EventHandler<object> AccountPictureChanged;
function onAccountPictureChanged(eventArgs) { /* Your code */ }
Windows.System.UserProfile.UserInformation.addEventListener("accountpicturechanged", onAccountPictureChanged);
Windows.System.UserProfile.UserInformation.removeEventListener("accountpicturechanged", onAccountPictureChanged);
- or -
Windows.System.UserProfile.UserInformation.onaccountpicturechanged = onAccountPictureChanged;
Public Shared Custom Event AccountPictureChanged As EventHandler(Of Object) 

Event Type

Attributes

Remarks

Important

The UserInformation class is not supported on Windows 10 or later. Use the User class instead. See Remarks in the UserInformation class documentation.

Use this event to monitor changes to the user's account picture.

Access to this event can be blocked by privacy settings. If access is blocked, the AccountPictureChangeEnabled property will be false.

Applies to

See also