Share via


UserInformation.GetAccountPicture(AccountPictureKind) Method

Definition

Gets the account picture for the user.

Important

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

public:
 static IStorageFile ^ GetAccountPicture(AccountPictureKind kind);
 static IStorageFile GetAccountPicture(AccountPictureKind const& kind);
/// [Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")]
 static IStorageFile GetAccountPicture(AccountPictureKind const& kind);
public static IStorageFile GetAccountPicture(AccountPictureKind kind);
[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 IStorageFile GetAccountPicture(AccountPictureKind kind);
function getAccountPicture(kind)
Public Shared Function GetAccountPicture (kind As AccountPictureKind) As IStorageFile

Parameters

kind
AccountPictureKind

An enumeration that you can use to determine what type of image you want (small, large, and so on).

Returns

An object that contains the image.

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.

Access to the account picture can be blocked by privacy settings (for example, if the UserInformation.NameAccessAllowed property is false). If access is blocked, this method returns a null value.

This method does not throw an exception.

Applies to

See also