Skip to main content
UserInformation.GetAccountPicture | getAccountPicture method

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.
 

Syntax


var iStorageFile = Windows.System.UserProfile.UserInformation.getAccountPicture(kind);

public static IStorageFile GetAccountPicture(
  AccountPictureKind kind
)

Public Shared Function GetAccountPicture(
  kind As AccountPictureKind 
) As IStorageFile

public:
static IStorageFile^ GetAccountPicture(
  AccountPictureKind kind
)

Parameters

kind

Type: AccountPictureKind

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

Return value

Type: IStorageFile

An object that contains the image.

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.

Requirements (Windows 10 device family)

Device family

Desktop, introduced version 10.0.10240.0
Mobile, introduced version 10.0.10240.0

API contract

Windows.System.UserProfile.UserProfileContract, introduced version 1.0

Namespace

Windows.System.UserProfile
Windows::System::UserProfile [C++]

Metadata

Windows.System.UserProfile.UserProfileContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.System.UserProfile
Windows::System::UserProfile [C++]

Metadata

Windows.winmd

See also

UserInformation
User