Skip to main content
UserInformation.SetAccountPictureFromStreamAsync | setAccountPictureFromStreamAsync method

Sets the picture for the user's account using an IRandomAccessStream object.

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


Windows.System.UserProfile.UserInformation.setAccountPictureFromStreamAsync(image).done( /* Your success and error handlers */ );

public static IAsyncOperation<SetAccountPictureResult> SetAccountPictureFromStreamAsync(
  IRandomAccessStream image
)

Public Shared Function SetAccountPictureFromStreamAsync(
  image As IRandomAccessStream 
) As IAsyncOperation(Of SetAccountPictureResult)

public:
static IAsyncOperation<SetAccountPictureResult>^ SetAccountPictureFromStreamAsync(
  IRandomAccessStream^ image
)

Parameters

image

Type: IRandomAccessStream

The image.

Return value

Type: IAsyncOperation<SetAccountPictureResult>

A value that indicates the success or failure of the operation.

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.
 

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