UserInformation.AccountPictureChanged 事件

定义

当用户的图像或名称更改时发生。

重要

Windows 10 或更高版本不支持 UserInformation 类。 请改用 User 类。 请参阅 UserInformation 类文档中的备注。

// 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) 

事件类型

属性

注解

重要

Windows 10 或更高版本不支持 UserInformation 类。 请改用 User 类。 请参阅 UserInformation 类文档中的备注。

使用此事件监视对用户头像所做的更改。

隐私设置可能会阻止对此事件的访问。 如果访问被阻止, AccountPictureChangeEnabled 属性将为 false。

适用于

另请参阅